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.
497 lines
1.3 MiB
497 lines
1.3 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[223,5,7,8,9,18],{"+M/w":function(ft,Oe,K){ft.exports={flexRow:"flexRow___1Kwk7",flexColumn:"flexColumn___1x58l",action:"action___osaCD",setScore:"setScore___kmMlR",delete:"delete___XpFlx",content:"content___9Naj3",titleWrap:"titleWrap___32PZL",titleNumber:"titleNumber___3HPb0",score:"score___3zGYh",titleHtml:"titleHtml___2vgPo",answerWrap:"answerWrap___2vM8f",answer:"answer___1Q0Tc",answerText:"answerText___5UVSF"}},"+ua5":function(ft,Oe,K){},"/cxE":function(ft,Oe,K){"use strict";K.d(Oe,"f",function(){return L}),K.d(Oe,"g",function(){return V}),K.d(Oe,"h",function(){return U}),K.d(Oe,"e",function(){return q}),K.d(Oe,"b",function(){return k}),K.d(Oe,"c",function(){return e}),K.d(Oe,"d",function(){return I}),K.d(Oe,"a",function(){return d});class fe{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(p){setTimeout(()=>{throw p.stack?new Error(p.message+`
|
|
|
|
`+p.stack):p},0)}}emit(p){this.listeners.forEach(A=>{A(p)})}onUnexpectedError(p){this.unexpectedErrorHandler(p),this.emit(p)}onUnexpectedExternalError(p){this.unexpectedErrorHandler(p)}}const W=new fe;function L(p){q(p)||W.onUnexpectedError(p);return}function V(p){q(p)||W.onUnexpectedExternalError(p);return}function U(p){if(p instanceof Error){let{name:A,message:s}=p;const i=p.stacktrace||p.stack;return{$isError:!0,name:A,message:s,stack:i}}return p}const O="Canceled";function q(p){return p instanceof Error&&p.name===O&&p.message===O}function k(){const p=new Error(O);return p.name=p.message,p}function e(p){return p?new Error(`Illegal argument: ${p}`):new Error("Illegal argument")}function I(p){return p?new Error(`Illegal state: ${p}`):new Error("Illegal state")}class d extends Error{constructor(p){super("NotSupported");p&&(this.message=p)}}},"24hK":function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return W});class fe{constructor(L){this.element=L,this.next=fe.Undefined,this.prev=fe.Undefined}}fe.Undefined=new fe(void 0);class W{constructor(){this._first=fe.Undefined,this._last=fe.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===fe.Undefined}clear(){let L=this._first;for(;L!==fe.Undefined;){const V=L.next;L.prev=fe.Undefined,L.next=fe.Undefined,L=V}this._first=fe.Undefined,this._last=fe.Undefined,this._size=0}unshift(L){return this._insert(L,!1)}push(L){return this._insert(L,!0)}_insert(L,V){const U=new fe(L);if(this._first===fe.Undefined)this._first=U,this._last=U;else if(V){const q=this._last;this._last=U,U.prev=q,q.next=U}else{const q=this._first;this._first=U,U.next=q,q.prev=U}this._size+=1;let O=!1;return()=>{O||(O=!0,this._remove(U))}}shift(){if(this._first===fe.Undefined)return;{const L=this._first.element;return this._remove(this._first),L}}pop(){if(this._last===fe.Undefined)return;{const L=this._last.element;return this._remove(this._last),L}}_remove(L){if(L.prev!==fe.Undefined&&L.next!==fe.Undefined){const V=L.prev;V.next=L.next,L.next.prev=V}else L.prev===fe.Undefined&&L.next===fe.Undefined?(this._first=fe.Undefined,this._last=fe.Undefined):L.next===fe.Undefined?(this._last=this._last.prev,this._last.next=fe.Undefined):L.prev===fe.Undefined&&(this._first=this._first.next,this._first.prev=fe.Undefined);this._size-=1}*[Symbol.iterator](){let L=this._first;for(;L!==fe.Undefined;)yield L.element,L=L.next}}},"3/fG":function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return W});function fe(L,V){let U;return V.length===0?U=L:U=L.replace(/\{(\d+)\}/g,function(O,q){const k=q[0];return typeof V[k]!="undefined"?V[k]:O}),U}function W(L,V,...U){return fe(V,U)}},"3pxb":function(ft,Oe,K){ft.exports=K.p+"static/refresh.c0b88523.png"},"49sm":function(ft,Oe){var K={}.toString;ft.exports=Array.isArray||function(fe){return K.call(fe)=="[object Array]"}},"5VLF":function(ft,Oe,K){"use strict";var fe,W;function L(V,U,O){var q=function(k,e){return V.js_beautify(k,e)};return q.js=V.js_beautify,q.css=U.css_beautify,q.html=O.html_beautify,q.js_beautify=V.js_beautify,q.css_beautify=U.css_beautify,q.html_beautify=O.html_beautify,q}!(fe=[K("6UM0"),K("TXwP"),K("psGv")],W=function(V,U,O){return L(V,U,O)}.apply(Oe,fe),W!==void 0&&(ft.exports=W))},"5Y4S":function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return L});var fe=K("MNsG");const W=fe.b.performance&&typeof fe.b.performance.now=="function";class L{constructor(V){this._highResolution=W&&V,this._startTime=this._now(),this._stopTime=-1}static create(V=!0){return new L(V)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?fe.b.performance.now():Date.now()}}},"5jaM":function(ft,Oe,K){ft.exports=K.p+"static/dui.b74348bd.svg"},"6+eU":function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return E});var fe=K("wx14"),W=K("rePB"),L=K("VTBJ"),V=K("1OyB"),U=K("vuIU"),O=K("Ji7U"),q=K("LK+K"),k=K("q1tI"),e=K.n(k),I=K("TSYQ"),d=K.n(I),p=function(C){var h,c="".concat(C.rootPrefixCls,"-item"),l=d()(c,"".concat(c,"-").concat(C.page),(h={},Object(W.a)(h,"".concat(c,"-active"),C.active),Object(W.a)(h,C.className,!!C.className),Object(W.a)(h,"".concat(c,"-disabled"),!C.page),h)),u=function(){C.onClick(C.page)},_=function(m){C.onKeyPress(m,C.onClick,C.page)};return e.a.createElement("li",{title:C.showTitle?C.page:null,className:l,onClick:u,onKeyPress:_,tabIndex:"0"},C.itemRender(C.page,"page",e.a.createElement("a",{rel:"nofollow"},C.page)))},A=p,s={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},i=function(T){Object(O.a)(h,T);var C=Object(q.a)(h);function h(){var c;Object(V.a)(this,h);for(var l=arguments.length,u=new Array(l),_=0;_<l;_++)u[_]=arguments[_];return c=C.call.apply(C,[this].concat(u)),c.state={goInputText:""},c.buildOptionText=function(g){return"".concat(g," ").concat(c.props.locale.items_per_page)},c.changeSize=function(g){c.props.changeSize(Number(g))},c.handleChange=function(g){c.setState({goInputText:g.target.value})},c.handleBlur=function(g){var m=c.props,F=m.goButton,H=m.quickGo,B=m.rootPrefixCls,Q=c.state.goInputText;if(F||Q==="")return;if(g.relatedTarget&&(g.relatedTarget.className.indexOf("".concat(B,"-prev"))>=0||g.relatedTarget.className.indexOf("".concat(B,"-next"))>=0))return;c.setState({goInputText:""}),H(c.getValidValue())},c.go=function(g){var m=c.state.goInputText;if(m==="")return;(g.keyCode===s.ENTER||g.type==="click")&&(c.setState({goInputText:""}),c.props.quickGo(c.getValidValue()))},c}return Object(U.a)(h,[{key:"getValidValue",value:function(){var l=this.state,u=l.goInputText,_=l.current;return!u||isNaN(u)?_:Number(u)}},{key:"getPageSizeOptions",value:function(){var l=this.props,u=l.pageSize,_=l.pageSizeOptions;return _.some(function(g){return g.toString()===u.toString()})?_:_.concat([u.toString()]).sort(function(g,m){var F=isNaN(Number(g))?0:Number(g),H=isNaN(Number(m))?0:Number(m);return F-H})}},{key:"render",value:function(){var l=this,u=this.props,_=u.pageSize,g=u.locale,m=u.rootPrefixCls,F=u.changeSize,H=u.quickGo,B=u.goButton,Q=u.selectComponentClass,z=u.buildOptionText,N=u.selectPrefixCls,ee=u.disabled,le=this.state.goInputText,Be="".concat(m,"-options"),Ce=Q,Me=null,Le=null,je=null;if(!F&&!H)return null;var He=this.getPageSizeOptions();if(F&&Ce){var Je=He.map(function(Se,$){return e.a.createElement(Ce.Option,{key:$,value:Se.toString()},(z||l.buildOptionText)(Se))});Me=e.a.createElement(Ce,{disabled:ee,prefixCls:N,showSearch:!1,className:"".concat(Be,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(_||He[0]).toString(),onChange:this.changeSize,getPopupContainer:function($){return $.parentNode}},Je)}return H&&(B&&(je=typeof B=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:ee,className:"".concat(Be,"-quick-jumper-button")},g.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},B)),Le=e.a.createElement("div",{className:"".concat(Be,"-quick-jumper")},g.jump_to,e.a.createElement("input",{disabled:ee,type:"text",value:le,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),g.page,je)),e.a.createElement("li",{className:"".concat(Be)},Me,Le)}}]),h}(e.a.Component);i.defaultProps={pageSizeOptions:["10","20","50","100"]};var o=i,n=K("N2Kk");function a(){}function r(T){return typeof T=="number"&&isFinite(T)&&Math.floor(T)===T}function t(T,C,h){return h}function y(T,C,h){var c=typeof T=="undefined"?C.pageSize:T;return Math.floor((h.total-1)/c)+1}var b=function(T){Object(O.a)(h,T);var C=Object(q.a)(h);function h(c){var l;Object(V.a)(this,h),l=C.call(this,c),l.getJumpPrevPage=function(){return Math.max(1,l.state.current-(l.props.showLessItems?3:5))},l.getJumpNextPage=function(){return Math.min(y(void 0,l.state,l.props),l.state.current+(l.props.showLessItems?3:5))},l.getItemIcon=function(F,H){var B=l.props.prefixCls,Q=F||e.a.createElement("button",{type:"button","aria-label":H,className:"".concat(B,"-item-link")});return typeof F=="function"&&(Q=e.a.createElement(F,Object(L.a)({},l.props))),Q},l.savePaginationNode=function(F){l.paginationNode=F},l.isValid=function(F){return r(F)&&F!==l.state.current},l.shouldDisplayQuickJumper=function(){var F=l.props,H=F.showQuickJumper,B=F.pageSize,Q=F.total;return Q<=B?!1:H},l.handleKeyDown=function(F){(F.keyCode===s.ARROW_UP||F.keyCode===s.ARROW_DOWN)&&F.preventDefault()},l.handleKeyUp=function(F){var H=l.getValidValue(F),B=l.state.currentInputValue;H!==B&&l.setState({currentInputValue:H}),F.keyCode===s.ENTER?l.handleChange(H):F.keyCode===s.ARROW_UP?l.handleChange(H-1):F.keyCode===s.ARROW_DOWN&&l.handleChange(H+1)},l.changePageSize=function(F){var H=l.state.current,B=y(F,l.state,l.props);H=H>B?B:H,B===0&&(H=l.state.current),typeof F=="number"&&("pageSize"in l.props||l.setState({pageSize:F}),"current"in l.props||l.setState({current:H,currentInputValue:H})),l.props.onShowSizeChange(H,F),"onChange"in l.props&&l.props.onChange&&l.props.onChange(H,F)},l.handleChange=function(F){var H=l.props.disabled,B=F;if(l.isValid(B)&&!H){var Q=y(void 0,l.state,l.props);B>Q?B=Q:B<1&&(B=1),"current"in l.props||l.setState({current:B,currentInputValue:B});var z=l.state.pageSize;return l.props.onChange(B,z),B}return l.state.current},l.prev=function(){l.hasPrev()&&l.handleChange(l.state.current-1)},l.next=function(){l.hasNext()&&l.handleChange(l.state.current+1)},l.jumpPrev=function(){l.handleChange(l.getJumpPrevPage())},l.jumpNext=function(){l.handleChange(l.getJumpNextPage())},l.hasPrev=function(){return l.state.current>1},l.hasNext=function(){return l.state.current<y(void 0,l.state,l.props)},l.runIfEnter=function(F,H){if(F.key==="Enter"||F.charCode===13){for(var B=arguments.length,Q=new Array(B>2?B-2:0),z=2;z<B;z++)Q[z-2]=arguments[z];H.apply(void 0,Q)}},l.runIfEnterPrev=function(F){l.runIfEnter(F,l.prev)},l.runIfEnterNext=function(F){l.runIfEnter(F,l.next)},l.runIfEnterJumpPrev=function(F){l.runIfEnter(F,l.jumpPrev)},l.runIfEnterJumpNext=function(F){l.runIfEnter(F,l.jumpNext)},l.handleGoTO=function(F){(F.keyCode===s.ENTER||F.type==="click")&&l.handleChange(l.state.currentInputValue)};var u=c.onChange!==a,_="current"in c;_&&!u&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var g=c.defaultCurrent;"current"in c&&(g=c.current);var m=c.defaultPageSize;return"pageSize"in c&&(m=c.pageSize),g=Math.min(g,y(m,void 0,c)),l.state={current:g,currentInputValue:g,pageSize:m},l}return Object(U.a)(h,[{key:"componentDidUpdate",value:function(l,u){var _=this.props.prefixCls;if(u.current!==this.state.current&&this.paginationNode){var g=this.paginationNode.querySelector(".".concat(_,"-item-").concat(u.current));g&&document.activeElement===g&&g.blur()}}},{key:"getValidValue",value:function(l){var u=l.target.value,_=y(void 0,this.state,this.props),g=this.state.currentInputValue,m;return u===""?m=u:isNaN(Number(u))?m=g:u>=_?m=_:m=Number(u),m}},{key:"getShowSizeChanger",value:function(){var l=this.props,u=l.showSizeChanger,_=l.total,g=l.totalBoundaryShowSizeChanger;return typeof u!="undefined"?u:_>g}},{key:"renderPrev",value:function(l){var u=this.props,_=u.prevIcon,g=u.itemRender,m=g(l,"prev",this.getItemIcon(_,"prev page")),F=!this.hasPrev();return Object(k.isValidElement)(m)?Object(k.cloneElement)(m,{disabled:F}):m}},{key:"renderNext",value:function(l){var u=this.props,_=u.nextIcon,g=u.itemRender,m=g(l,"next",this.getItemIcon(_,"next page")),F=!this.hasNext();return Object(k.isValidElement)(m)?Object(k.cloneElement)(m,{disabled:F}):m}},{key:"render",value:function(){var l=this,u=this.props,_=u.prefixCls,g=u.className,m=u.style,F=u.disabled,H=u.hideOnSinglePage,B=u.total,Q=u.locale,z=u.showQuickJumper,N=u.showLessItems,ee=u.showTitle,le=u.showTotal,Be=u.simple,Ce=u.itemRender,Me=u.showPrevNextJumpers,Le=u.jumpPrevIcon,je=u.jumpNextIcon,He=u.selectComponentClass,Je=u.selectPrefixCls,Se=u.pageSizeOptions,$=this.state,D=$.current,M=$.pageSize,te=$.currentInputValue;if(H===!0&&B<=M)return null;var oe=y(void 0,this.state,this.props),G=[],re=null,j=null,J=null,Y=null,he=null,we=z&&z.goButton,Te=N?1:2,Xe=D-1>0?D-1:0,Ze=D+1<oe?D+1:oe,et=Object.keys(this.props).reduce(function(se,Ae){return(Ae.substr(0,5)==="data-"||Ae.substr(0,5)==="aria-"||Ae==="role")&&(se[Ae]=l.props[Ae]),se},{});if(Be)return we&&(typeof we=="boolean"?he=e.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Q.jump_to_confirm):he=e.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},we),he=e.a.createElement("li",{title:ee?"".concat(Q.jump_to).concat(D,"/").concat(oe):null,className:"".concat(_,"-simple-pager")},he)),e.a.createElement("ul",Object(fe.a)({className:d()(_,"".concat(_,"-simple"),Object(W.a)({},"".concat(_,"-disabled"),F),g),style:m,ref:this.savePaginationNode},et),e.a.createElement("li",{title:ee?Q.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:d()("".concat(_,"-prev"),Object(W.a)({},"".concat(_,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Xe)),e.a.createElement("li",{title:ee?"".concat(D,"/").concat(oe):null,className:"".concat(_,"-simple-pager")},e.a.createElement("input",{type:"text",value:te,disabled:F,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),e.a.createElement("span",{className:"".concat(_,"-slash")},"/"),oe),e.a.createElement("li",{title:ee?Q.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:d()("".concat(_,"-next"),Object(W.a)({},"".concat(_,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(Ze)),he);if(oe<=3+Te*2){var rt={locale:Q,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:ee,itemRender:Ce};oe||G.push(e.a.createElement(A,Object(fe.a)({},rt,{key:"noPager",page:oe,className:"".concat(_,"-disabled")})));for(var At=1;At<=oe;At+=1){var pt=D===At;G.push(e.a.createElement(A,Object(fe.a)({},rt,{key:At,page:At,active:pt})))}}else{var Pe=N?Q.prev_3:Q.prev_5,Ye=N?Q.next_3:Q.next_5;Me&&(re=e.a.createElement("li",{title:ee?Pe:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:d()("".concat(_,"-jump-prev"),Object(W.a)({},"".concat(_,"-jump-prev-custom-icon"),!!Le))},Ce(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Le,"prev page"))),j=e.a.createElement("li",{title:ee?Ye:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:d()("".concat(_,"-jump-next"),Object(W.a)({},"".concat(_,"-jump-next-custom-icon"),!!je))},Ce(this.getJumpNextPage(),"jump-next",this.getItemIcon(je,"next page")))),Y=e.a.createElement(A,{locale:Q,last:!0,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:oe,page:oe,active:!1,showTitle:ee,itemRender:Ce}),J=e.a.createElement(A,{locale:Q,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:ee,itemRender:Ce});var tt=Math.max(1,D-Te),ot=Math.min(D+Te,oe);D-1<=Te&&(ot=1+Te*2),oe-D<=Te&&(tt=oe-Te*2);for(var pe=tt;pe<=ot;pe+=1){var ne=D===pe;G.push(e.a.createElement(A,{locale:Q,rootPrefixCls:_,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:pe,page:pe,active:ne,showTitle:ee,itemRender:Ce}))}D-1>=Te*2&&D!==1+2&&(G[0]=Object(k.cloneElement)(G[0],{className:"".concat(_,"-item-after-jump-prev")}),G.unshift(re)),oe-D>=Te*2&&D!==oe-2&&(G[G.length-1]=Object(k.cloneElement)(G[G.length-1],{className:"".concat(_,"-item-before-jump-next")}),G.push(j)),tt!==1&&G.unshift(J),ot!==oe&&G.push(Y)}var ie=null;le&&(ie=e.a.createElement("li",{className:"".concat(_,"-total-text")},le(B,[B===0?0:(D-1)*M+1,D*M>B?B:D*M])));var de=!this.hasPrev()||!oe,ge=!this.hasNext()||!oe;return e.a.createElement("ul",Object(fe.a)({className:d()(_,g,Object(W.a)({},"".concat(_,"-disabled"),F)),style:m,unselectable:"unselectable",ref:this.savePaginationNode},et),ie,e.a.createElement("li",{title:ee?Q.prev_page:null,onClick:this.prev,tabIndex:de?null:0,onKeyPress:this.runIfEnterPrev,className:d()("".concat(_,"-prev"),Object(W.a)({},"".concat(_,"-disabled"),de)),"aria-disabled":de},this.renderPrev(Xe)),G,e.a.createElement("li",{title:ee?Q.next_page:null,onClick:this.next,tabIndex:ge?null:0,onKeyPress:this.runIfEnterNext,className:d()("".concat(_,"-next"),Object(W.a)({},"".concat(_,"-disabled"),ge)),"aria-disabled":ge},this.renderNext(Ze)),e.a.createElement(o,{disabled:F,locale:Q,rootPrefixCls:_,selectComponentClass:He,selectPrefixCls:Je,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:D,pageSize:M,pageSizeOptions:Se,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:we}))}}],[{key:"getDerivedStateFromProps",value:function(l,u){var _={};if("current"in l&&(_.current=l.current,l.current!==u.current&&(_.currentInputValue=_.current)),"pageSize"in l&&l.pageSize!==u.pageSize){var g=u.current,m=y(l.pageSize,u,l);g=g>m?m:g,"current"in l||(_.current=g,_.currentInputValue=g),_.pageSize=l.pageSize}return _}}]),h}(e.a.Component);b.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:n.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var E=b},"6K3P":function(ft,Oe,K){ft.exports=K.p+"static/jinshi.9b74f304.svg"},"6RRn":function(ft,Oe,K){"use strict";var fe=K("wCXF"),W=K("n6Qo");K.d(Oe,"b",function(){return W.a});var L=K("IBYe"),V=K("6eGT"),U=K("hW8S");K.d(Oe,"a",function(){return U.a}),Oe.c=fe.b},"6UM0":function(ft,Oe,K){var fe,W;(function(){var L;(function(){"use strict";var U=[function(e,I,d){var p=d(1).Beautifier,A=d(5).Options;function s(i,o){var n=new p(i,o);return n.beautify()}e.exports=s,e.exports.defaultOptions=function(){return new A}},function(e,I,d){var p=d(2).Output,A=d(3).Token,s=d(4),i=d(5).Options,o=d(7).Tokenizer,n=d(7).line_starters,a=d(7).positionable_operators,r=d(7).TOKEN;function t(N,ee){return ee.indexOf(N)!==-1}function y(N){return N.replace(/^\s+/g,"")}function b(N){for(var ee={},le=0;le<N.length;le++)ee[N[le].replace(/-/g,"_")]=N[le];return ee}function E(N,ee){return N&&N.type===r.RESERVED&&N.text===ee}function T(N,ee){return N&&N.type===r.RESERVED&&t(N.text,ee)}var C=["case","return","do","if","throw","else","await","break","continue","async"],h=["before-newline","after-newline","preserve-newline"],c=b(h),l=[c.before_newline,c.preserve_newline],u={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function _(N,ee){if(ee.multiline_frame||ee.mode===u.ForInitializer||ee.mode===u.Conditional)return;N.remove_indent(ee.start_line_index)}function g(N){N=N.replace(s.allLineBreaks,`
|
|
`);for(var ee=[],le=N.indexOf(`
|
|
`);le!==-1;)ee.push(N.substring(0,le)),N=N.substring(le+1),le=N.indexOf(`
|
|
`);return N.length&&ee.push(N),ee}function m(N){return N===u.ArrayLiteral}function F(N){return t(N,[u.Expression,u.ForInitializer,u.Conditional])}function H(N,ee){for(var le=0;le<N.length;le++){var Be=N[le].trim();if(Be.charAt(0)!==ee)return!1}return!0}function B(N,ee){for(var le=0,Be=N.length,Ce;le<Be;le++)if(Ce=N[le],Ce&&Ce.indexOf(ee)!==0)return!1;return!0}function Q(N,ee){ee=ee||{},this._source_text=N||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new i(ee)}Q.prototype.create_flags=function(N,ee){var le=0;N&&(le=N.indentation_level,!this._output.just_added_newline()&&N.line_indent_level>le&&(le=N.line_indent_level));var Be={mode:ee,parent:N,last_token:N?N.last_token:new A(r.START_BLOCK,""),last_word:N?N.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:le,alignment:0,line_indent_level:N?N.line_indent_level:le,start_line_index:this._output.get_line_number(),ternary_depth:0};return Be},Q.prototype._reset=function(N){var ee=N.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new p(this._options,ee),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(u.BlockStatement);var le=new o(N,this._options);return this._tokens=le.tokenize(),N},Q.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var N,ee=this._reset(this._source_text),le=this._options.eol;this._options.eol==="auto"&&(le=`
|
|
`,ee&&s.lineBreak.test(ee||"")&&(le=ee.match(s.lineBreak)[0]));for(var Be=this._tokens.next();Be;)this.handle_token(Be),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Be,Be=this._tokens.next();return N=this._output.get_code(le),N},Q.prototype.handle_token=function(N,ee){N.type===r.START_EXPR?this.handle_start_expr(N):N.type===r.END_EXPR?this.handle_end_expr(N):N.type===r.START_BLOCK?this.handle_start_block(N):N.type===r.END_BLOCK?this.handle_end_block(N):N.type===r.WORD?this.handle_word(N):N.type===r.RESERVED?this.handle_word(N):N.type===r.SEMICOLON?this.handle_semicolon(N):N.type===r.STRING?this.handle_string(N):N.type===r.EQUALS?this.handle_equals(N):N.type===r.OPERATOR?this.handle_operator(N):N.type===r.COMMA?this.handle_comma(N):N.type===r.BLOCK_COMMENT?this.handle_block_comment(N,ee):N.type===r.COMMENT?this.handle_comment(N,ee):N.type===r.DOT?this.handle_dot(N):N.type===r.EOF?this.handle_eof(N):N.type===r.UNKNOWN?this.handle_unknown(N,ee):this.handle_unknown(N,ee)},Q.prototype.handle_whitespace_and_comments=function(N,ee){var le=N.newlines,Be=this._options.keep_array_indentation&&m(this._flags.mode);if(N.comments_before)for(var Ce=N.comments_before.next();Ce;)this.handle_whitespace_and_comments(Ce,ee),this.handle_token(Ce,ee),Ce=N.comments_before.next();if(Be)for(var Me=0;Me<le;Me+=1)this.print_newline(Me>0,ee);else if(this._options.max_preserve_newlines&&le>this._options.max_preserve_newlines&&(le=this._options.max_preserve_newlines),this._options.preserve_newlines&&le>1){this.print_newline(!1,ee);for(var Le=1;Le<le;Le+=1)this.print_newline(!0,ee)}};var z=["async","break","continue","return","throw","yield"];Q.prototype.allow_wrap_or_preserved_newline=function(N,ee){if(ee=ee===void 0?!1:ee,this._output.just_added_newline())return;var le=this._options.preserve_newlines&&N.newlines||ee,Be=t(this._flags.last_token.text,a)||t(N.text,a);if(Be){var Ce=t(this._flags.last_token.text,a)&&t(this._options.operator_position,l)||t(N.text,a);le=le&&Ce}if(le)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(T(this._flags.last_token,z))return;this._output.set_wrap_point()}},Q.prototype.print_newline=function(N,ee){if(!ee&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==r.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var le=this._tokens.peek();this._flags.mode===u.Statement&&!(this._flags.if_block&&E(le,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(N)&&(this._flags.multiline_frame=!0)},Q.prototype.print_token_line_indentation=function(N){this._output.just_added_newline()&&(this._options.keep_array_indentation&&N.newlines&&(N.text==="["||m(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(N.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},Q.prototype.print_token=function(N){if(this._output.raw){this._output.add_raw_token(N);return}if(this._options.comma_first&&N.previous&&N.previous.type===r.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var ee=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(ee),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(N),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(N),this._output.non_breaking_space=!0,this._output.add_token(N.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},Q.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Q.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},Q.prototype.set_mode=function(N){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,N),this._flags=this.create_flags(this._previous_flags,N),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Q.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===u.Statement&&_(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},Q.prototype.start_of_object_property=function(){return this._flags.parent.mode===u.ObjectLiteral&&this._flags.mode===u.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||T(this._flags.last_token,["get","set"]))},Q.prototype.start_of_statement=function(N){var ee=!1;return ee=ee||T(this._flags.last_token,["var","let","const"])&&N.type===r.WORD,ee=ee||E(this._flags.last_token,"do"),ee=ee||!(this._flags.parent.mode===u.ObjectLiteral&&this._flags.mode===u.Statement)&&T(this._flags.last_token,z)&&!N.newlines,ee=ee||E(this._flags.last_token,"else")&&!(E(N,"if")&&!N.comments_before),ee=ee||this._flags.last_token.type===r.END_EXPR&&(this._previous_flags.mode===u.ForInitializer||this._previous_flags.mode===u.Conditional),ee=ee||this._flags.last_token.type===r.WORD&&this._flags.mode===u.BlockStatement&&!this._flags.in_case&&!(N.text==="--"||N.text==="++")&&this._last_last_text!=="function"&&N.type!==r.WORD&&N.type!==r.RESERVED,ee=ee||this._flags.mode===u.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||T(this._flags.last_token,["get","set"])),ee?(this.set_mode(u.Statement),this.indent(),this.handle_whitespace_and_comments(N,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(N,T(N,["do","for","if","while"])),!0):!1},Q.prototype.handle_start_expr=function(N){this.start_of_statement(N)||this.handle_whitespace_and_comments(N);var ee=u.Expression;if(N.text==="["){if(this._flags.last_token.type===r.WORD||this._flags.last_token.text===")"){T(this._flags.last_token,n)&&(this._output.space_before_token=!0),this.print_token(N),this.set_mode(ee),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}ee=u.ArrayLiteral,m(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),t(this._flags.last_token.type,[r.START_EXPR,r.END_EXPR,r.WORD,r.OPERATOR,r.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===r.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,ee=u.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,ee=u.Conditional):t(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&N.whitespace_before===""?this._output.space_before_token=!1:(t(this._flags.last_token.text,n)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(N);else if(this._flags.last_token.type===r.WORD){this._output.space_before_token=!1;var le=this._tokens.peek(-3);if(this._options.space_after_named_function&&le){var Be=this._tokens.peek(-4);T(le,["async","function"])||le.text==="*"&&T(Be,["async","function"])?this._output.space_before_token=!0:this._flags.mode===u.ObjectLiteral?(le.text==="{"||le.text===","||le.text==="*"&&(Be.text==="{"||Be.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(N);(this._flags.last_token.type===r.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===u.ObjectLiteral&&t(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===r.START_BLOCK?this.print_newline():(this._flags.last_token.type===r.END_EXPR||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===r.COMMA)&&this.allow_wrap_or_preserved_newline(N,N.newlines),this.print_token(N),this.set_mode(ee),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},Q.prototype.handle_end_expr=function(N){for(;this._flags.mode===u.Statement;)this.restore_mode();this.handle_whitespace_and_comments(N),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(N,N.text==="]"&&m(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===r.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(N),this.restore_mode(),_(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===u.Conditional&&(this._previous_flags.mode=u.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},Q.prototype.handle_start_block=function(N){this.handle_whitespace_and_comments(N);var ee=this._tokens.peek(),le=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===r.END_EXPR?(this.set_mode(u.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(u.BlockStatement):le&&(t(le.text,[":",","])&&t(ee.type,[r.STRING,r.WORD,r.RESERVED])||t(ee.text,["get","set","..."])&&t(le.type,[r.WORD,r.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(le.text,[":",","])?this.set_mode(u.BlockStatement):this.set_mode(u.ObjectLiteral):this._flags.last_token.type===r.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(u.BlockStatement):t(this._flags.last_token.type,[r.EQUALS,r.START_EXPR,r.COMMA,r.OPERATOR])||T(this._flags.last_token,["return","throw","import","default"])?this.set_mode(u.ObjectLiteral):this.set_mode(u.BlockStatement),this._flags.last_token&&(T(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var Be=!ee.comments_before&&ee.text==="}",Ce=Be&&this._flags.last_word==="function"&&this._flags.last_token.type===r.END_EXPR;if(this._options.brace_preserve_inline){var Me=0,Le=null;this._flags.inline_frame=!0;do if(Me+=1,Le=this._tokens.peek(Me-1),Le.newlines){this._flags.inline_frame=!1;break}while(Le.type!==r.EOF&&!(Le.type===r.END_BLOCK&&Le.opened===N))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&N.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==r.OPERATOR&&(Ce||this._flags.last_token.type===r.EQUALS||T(this._flags.last_token,C)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(m(this._previous_flags.mode)&&(this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.COMMA)&&((this._flags.last_token.type===r.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(N),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==r.OPERATOR&&this._flags.last_token.type!==r.START_EXPR&&(this._flags.last_token.type===r.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(N),this.indent(),!Be&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},Q.prototype.handle_end_block=function(N){for(this.handle_whitespace_and_comments(N);this._flags.mode===u.Statement;)this.restore_mode();var ee=this._flags.last_token.type===r.START_BLOCK;this._flags.inline_frame&&!ee?this._output.space_before_token=!0:this._options.brace_style==="expand"?ee||this.print_newline():ee||(m(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(N)},Q.prototype.handle_word=function(N){if(N.type===r.RESERVED){if(t(N.text,["set","get"])&&this._flags.mode!==u.ObjectLiteral)N.type=r.WORD;else if(N.text==="import"&&t(this._tokens.peek().text,["(","."]))N.type=r.WORD;else if(t(N.text,["as","from"])&&!this._flags.import_block)N.type=r.WORD;else if(this._flags.mode===u.ObjectLiteral){var ee=this._tokens.peek();ee.text===":"&&(N.type=r.WORD)}}if(this.start_of_statement(N)?T(this._flags.last_token,["var","let","const"])&&N.type===r.WORD&&(this._flags.declaration_statement=!0):N.newlines&&!F(this._flags.mode)&&(this._flags.last_token.type!==r.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==r.EQUALS&&(this._options.preserve_newlines||!T(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(N),this.print_newline()):this.handle_whitespace_and_comments(N),this._flags.do_block&&!this._flags.do_while)if(E(N,"while")){this._output.space_before_token=!0,this.print_token(N),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&E(N,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===u.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&T(N,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(N),this._flags.in_case=!0;return}if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(N)),E(N,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===r.OPERATOR))&&(!this._output.just_added_blankline()&&!N.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD?T(this._flags.last_token,["get","set","new","export"])||T(this._flags.last_token,z)?this._output.space_before_token=!0:E(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===r.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(F(this._flags.mode)||m(this._flags.mode))||this.print_newline(),this.print_token(N),this._flags.last_word=N.text;return}var le="NONE";if(this._flags.last_token.type===r.END_BLOCK?this._previous_flags.inline_frame?le="SPACE":T(N,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&N.newlines?le="NEWLINE":(le="SPACE",this._output.space_before_token=!0):le="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&this._flags.mode===u.BlockStatement?le="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&F(this._flags.mode)?le="SPACE":this._flags.last_token.type===r.STRING?le="NEWLINE":this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===u.ObjectLiteral&&t(this._last_last_text,["{",","]))?le="SPACE":this._flags.last_token.type===r.START_BLOCK?this._flags.inline_frame?le="SPACE":le="NEWLINE":this._flags.last_token.type===r.END_EXPR&&(this._output.space_before_token=!0,le="NEWLINE"),T(N,n)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?le="SPACE":le="NEWLINE"),T(N,["else","catch","finally"]))if((!(this._flags.last_token.type===r.END_BLOCK&&this._previous_flags.mode===u.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&N.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var Be=this._output.current_line;Be.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else le==="NEWLINE"?T(this._flags.last_token,C)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&T(N,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==r.END_EXPR?(this._flags.last_token.type!==r.START_EXPR||!T(N,["var","let","const"]))&&this._flags.last_token.text!==":"&&(E(N,"if")&&E(N.previous,"else")?this._output.space_before_token=!0:this.print_newline()):T(N,n)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&m(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():le==="SPACE"&&(this._output.space_before_token=!0);N.previous&&(N.previous.type===r.WORD||N.previous.type===r.RESERVED)&&(this._output.space_before_token=!0),this.print_token(N),this._flags.last_word=N.text,N.type===r.RESERVED&&(N.text==="do"?this._flags.do_block=!0:N.text==="if"?this._flags.if_block=!0:N.text==="import"?this._flags.import_block=!0:this._flags.import_block&&E(N,"from")&&(this._flags.import_block=!1))},Q.prototype.handle_semicolon=function(N){this.start_of_statement(N)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(N);for(var ee=this._tokens.peek();this._flags.mode===u.Statement&&!(this._flags.if_block&&E(ee,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(N)},Q.prototype.handle_string=function(N){N.text.startsWith("`")&&N.newlines===0&&N.whitespace_before===""&&(N.previous.text===")"||this._flags.last_token.type===r.WORD)||(this.start_of_statement(N)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(N),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(N):N.text.startsWith("`")&&this._flags.last_token.type===r.END_EXPR&&(N.previous.text==="]"||N.previous.text===")")&&N.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(N)},Q.prototype.handle_equals=function(N){this.start_of_statement(N)||this.handle_whitespace_and_comments(N),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(N),this._output.space_before_token=!0},Q.prototype.handle_comma=function(N){this.handle_whitespace_and_comments(N,!0),this.print_token(N),this._output.space_before_token=!0,this._flags.declaration_statement?(F(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(N)):this._flags.mode===u.ObjectLiteral||this._flags.mode===u.Statement&&this._flags.parent.mode===u.ObjectLiteral?(this._flags.mode===u.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(N)},Q.prototype.handle_operator=function(N){var ee=N.text==="*"&&(T(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[r.START_BLOCK,r.COMMA,r.END_BLOCK,r.SEMICOLON])),le=t(N.text,["-","+"])&&(t(this._flags.last_token.type,[r.START_BLOCK,r.START_EXPR,r.EQUALS,r.OPERATOR])||t(this._flags.last_token.text,n)||this._flags.last_token.text===",");if(!this.start_of_statement(N)){var Be=!ee;this.handle_whitespace_and_comments(N,Be)}if(N.text==="*"&&this._flags.last_token.type===r.DOT){this.print_token(N);return}if(N.text==="::"){this.print_token(N);return}if(this._flags.last_token.type===r.OPERATOR&&t(this._options.operator_position,l)&&this.allow_wrap_or_preserved_newline(N),N.text===":"&&this._flags.in_case){this.print_token(N),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==r.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var Ce=!0,Me=!0,Le=!1;if(N.text===":"?this._flags.ternary_depth===0?Ce=!1:(this._flags.ternary_depth-=1,Le=!0):N.text==="?"&&(this._flags.ternary_depth+=1),!le&&!ee&&this._options.preserve_newlines&&t(N.text,a)){var je=N.text===":",He=je&&Le,Je=je&&!Le;switch(this._options.operator_position){case c.before_newline:this._output.space_before_token=!Je,this.print_token(N),(!je||He)&&this.allow_wrap_or_preserved_newline(N),this._output.space_before_token=!0;return;case c.after_newline:this._output.space_before_token=!0,!je||He?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(N):this._output.space_before_token=!1,this.print_token(N),this._output.space_before_token=!0;return;case c.preserve_newline:Je||this.allow_wrap_or_preserved_newline(N),Ce=!(this._output.just_added_newline()||Je),this._output.space_before_token=Ce,this.print_token(N),this._output.space_before_token=!0;return}}if(ee){this.allow_wrap_or_preserved_newline(N),Ce=!1;var Se=this._tokens.peek();Me=Se&&t(Se.type,[r.WORD,r.RESERVED])}else if(N.text==="...")this.allow_wrap_or_preserved_newline(N),Ce=this._flags.last_token.type===r.START_BLOCK,Me=!1;else if(t(N.text,["--","++","!","~"])||le){if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR)&&this.allow_wrap_or_preserved_newline(N),Ce=!1,Me=!1,N.newlines&&(N.text==="--"||N.text==="++"||N.text==="~")){var $=T(this._flags.last_token,C)&&N.newlines;$&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline($,!0)}this._flags.last_token.text===";"&&F(this._flags.mode)&&(Ce=!0),this._flags.last_token.type===r.RESERVED?Ce=!0:this._flags.last_token.type===r.END_EXPR?Ce=!(this._flags.last_token.text==="]"&&(N.text==="--"||N.text==="++")):this._flags.last_token.type===r.OPERATOR&&(Ce=t(N.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(N.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(Me=!0)),(this._flags.mode===u.BlockStatement&&!this._flags.inline_frame||this._flags.mode===u.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Ce,this.print_token(N),this._output.space_before_token=Me},Q.prototype.handle_block_comment=function(N,ee){if(this._output.raw){this._output.add_raw_token(N),N.directives&&N.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(N.directives){this.print_newline(!1,ee),this.print_token(N),N.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!s.newline.test(N.text)&&!N.newlines){this._output.space_before_token=!0,this.print_token(N),this._output.space_before_token=!0;return}else this.print_block_commment(N,ee)},Q.prototype.print_block_commment=function(N,ee){var le=g(N.text),Be,Ce=!1,Me=!1,Le=N.whitespace_before,je=Le.length;if(this.print_newline(!1,ee),this.print_token_line_indentation(N),this._output.add_token(le[0]),this.print_newline(!1,ee),le.length>1){for(le=le.slice(1),Ce=H(le,"*"),Me=B(le,Le),Ce&&(this._flags.alignment=1),Be=0;Be<le.length;Be++)Ce?(this.print_token_line_indentation(N),this._output.add_token(y(le[Be]))):Me&&le[Be]?(this.print_token_line_indentation(N),this._output.add_token(le[Be].substring(je))):(this._output.current_line.set_indent(-1),this._output.add_token(le[Be])),this.print_newline(!1,ee);this._flags.alignment=0}},Q.prototype.handle_comment=function(N,ee){N.newlines?this.print_newline(!1,ee):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(N),this.print_newline(!1,ee)},Q.prototype.handle_dot=function(N){this.start_of_statement(N)||this.handle_whitespace_and_comments(N,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),T(this._flags.last_token,C)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(N,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(N)},Q.prototype.handle_unknown=function(N,ee){this.print_token(N),N.text[N.text.length-1]===`
|
|
`&&this.print_newline(!1,ee)},Q.prototype.handle_eof=function(N){for(;this._flags.mode===u.Statement;)this.restore_mode();this.handle_whitespace_and_comments(N)},e.exports.Beautifier=Q},function(e){function I(A){this.__parent=A,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}I.prototype.clone_empty=function(){var A=new I(this.__parent);return A.set_indent(this.__indent_count,this.__alignment_count),A},I.prototype.item=function(A){return A<0?this.__items[this.__items.length+A]:this.__items[A]},I.prototype.has_match=function(A){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(A))return!0;return!1},I.prototype.set_indent=function(A,s){this.is_empty()&&(this.__indent_count=A||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},I.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},I.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},I.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var A=this.__parent.current_line;return A.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),A.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),A.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,A.__items[0]===" "&&(A.__items.splice(0,1),A.__character_count-=1),!0}return!1},I.prototype.is_empty=function(){return this.__items.length===0},I.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},I.prototype.push=function(A){this.__items.push(A);var s=A.lastIndexOf(`
|
|
`);s!==-1?this.__character_count=A.length-s:this.__character_count+=A.length},I.prototype.pop=function(){var A=null;return this.is_empty()||(A=this.__items.pop(),this.__character_count-=A.length),A},I.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},I.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},I.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},I.prototype.toString=function(){var A="";return this.is_empty()?this.__parent.indent_empty_lines&&(A=this.__parent.get_indent_string(this.__indent_count)):(A=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),A+=this.__items.join("")),A};function d(A,s){this.__cache=[""],this.__indent_size=A.indent_size,this.__indent_string=A.indent_char,A.indent_with_tabs||(this.__indent_string=new Array(A.indent_size+1).join(A.indent_char)),s=s||"",A.indent_level>0&&(s=new Array(A.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}d.prototype.get_indent_size=function(A,s){var i=this.__base_string_length;return s=s||0,A<0&&(i=0),i+=A*this.__indent_size,i+=s,i},d.prototype.get_indent_string=function(A,s){var i=this.__base_string;return s=s||0,A<0&&(A=0,i=""),s+=A*this.__indent_size,this.__ensure_cache(s),i+=this.__cache[s],i},d.prototype.__ensure_cache=function(A){for(;A>=this.__cache.length;)this.__add_column()},d.prototype.__add_column=function(){var A=this.__cache.length,s=0,i="";this.__indent_size&&A>=this.__indent_size&&(s=Math.floor(A/this.__indent_size),A-=s*this.__indent_size,i=new Array(s+1).join(this.__indent_string)),A&&(i+=new Array(A+1).join(" ")),this.__cache.push(i)};function p(A,s){this.__indent_cache=new d(A,s),this.raw=!1,this._end_with_newline=A.end_with_newline,this.indent_size=A.indent_size,this.wrap_line_length=A.wrap_line_length,this.indent_empty_lines=A.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new I(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}p.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},p.prototype.get_line_number=function(){return this.__lines.length},p.prototype.get_indent_string=function(A,s){return this.__indent_cache.get_indent_string(A,s)},p.prototype.get_indent_size=function(A,s){return this.__indent_cache.get_indent_size(A,s)},p.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},p.prototype.add_new_line=function(A){return this.is_empty()||!A&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},p.prototype.get_code=function(A){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
|
|
`&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join(`
|
|
`);return A!==`
|
|
`&&(i=i.replace(/[\n]/g,A)),i},p.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},p.prototype.set_indent=function(A,s){return A=A||0,s=s||0,this.next_line.set_indent(A,s),this.__lines.length>1?(this.current_line.set_indent(A,s),!0):(this.current_line.set_indent(),!1)},p.prototype.add_raw_token=function(A){for(var s=0;s<A.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(A.whitespace_before),this.current_line.push(A.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},p.prototype.add_token=function(A){this.__add_space_before_token(),this.current_line.push(A),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},p.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},p.prototype.remove_indent=function(A){for(var s=this.__lines.length;A<s;)this.__lines[A]._remove_indent(),A++;this.current_line._remove_wrap_indent()},p.prototype.trim=function(A){for(A=A===void 0?!1:A,this.current_line.trim();A&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},p.prototype.just_added_newline=function(){return this.current_line.is_empty()},p.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},p.prototype.ensure_empty_line_above=function(A,s){for(var i=this.__lines.length-2;i>=0;){var o=this.__lines[i];if(o.is_empty())break;if(o.item(0).indexOf(A)!==0&&o.item(-1)!==s){this.__lines.splice(i+1,0,new I(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=p},function(e){function I(d,p,A,s){this.type=d,this.text=p,this.comments_before=null,this.newlines=A||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=I},function(e,I){var d="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",p="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",A="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",s="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",i="(?:\\\\u[0-9a-fA-F]{4}|["+d+A+"])",o="(?:\\\\u[0-9a-fA-F]{4}|["+p+A+s+"])*";I.identifier=new RegExp(i+o,"g"),I.identifierStart=new RegExp(i),I.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+p+A+s+"])+");var n=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;I.newline=/[\n\r\u2028\u2029]/,I.lineBreak=new RegExp(`\r
|
|
|`+I.newline.source),I.allLineBreaks=new RegExp(I.lineBreak.source,"g")},function(e,I,d){var p=d(6).Options,A=["before-newline","after-newline","preserve-newline"];function s(i){p.call(this,i,"js");var o=this.raw_options.brace_style||null;o==="expand-strict"?this.raw_options.brace_style="expand":o==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var a=0;a<n.length;a++)n[a]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=n[a];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",A),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}s.prototype=new p,e.exports.Options=s},function(e){function I(A,s){this.raw_options=d(A,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}I.prototype._get_array=function(A,s){var i=this.raw_options[A],o=s||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(o=i.concat()):typeof i=="string"&&(o=i.split(/[^a-zA-Z0-9_\/\-]+/)),o},I.prototype._get_boolean=function(A,s){var i=this.raw_options[A],o=i===void 0?!!s:!!i;return o},I.prototype._get_characters=function(A,s){var i=this.raw_options[A],o=s||"";return typeof i=="string"&&(o=i.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),o},I.prototype._get_number=function(A,s){var i=this.raw_options[A];s=parseInt(s,10),isNaN(s)&&(s=0);var o=parseInt(i,10);return isNaN(o)&&(o=s),o},I.prototype._get_selection=function(A,s,i){var o=this._get_selection_list(A,s,i);if(o.length!==1)throw new Error("Invalid Option Value: The option '"+A+`' can only be one of the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[A]+"'");return o[0]},I.prototype._get_selection_list=function(A,s,i){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(i=i||[s[0]],!this._is_valid_selection(i,s))throw new Error("Invalid Default Value!");var o=this._get_array(A,i);if(!this._is_valid_selection(o,s))throw new Error("Invalid Option Value: The option '"+A+`' can contain only the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[A]+"'");return o},I.prototype._is_valid_selection=function(A,s){return A.length&&s.length&&!A.some(function(i){return s.indexOf(i)===-1})};function d(A,s){var i={};A=p(A);var o;for(o in A)o!==s&&(i[o]=A[o]);if(s&&A[s])for(o in A[s])i[o]=A[s][o];return i}function p(A){var s={},i;for(i in A){var o=i.replace(/-/g,"_");s[o]=A[i]}return s}e.exports.Options=I,e.exports.normalizeOpts=p,e.exports.mergeOpts=d},function(e,I,d){var p=d(8).InputScanner,A=d(9).Tokenizer,s=d(9).TOKEN,i=d(13).Directives,o=d(4),n=d(12).Pattern,a=d(14).TemplatablePattern;function r(H,B){return B.indexOf(H)!==-1}var t={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:s.START,RAW:s.RAW,EOF:s.EOF},y=new i(/\/\*/,/\*\//),b=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,E=/[0-9]/,T=/[^\d\.]/,C=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),h=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";h=h.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),h="\\?\\.(?!\\d) "+h,h=h.replace(/ /g,"|");var c=new RegExp(h),l="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),u=l.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),_=new RegExp("^(?:"+u.join("|")+")$"),g,m=function(H,B){A.call(this,H,B),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var Q=new n(this._input),z=new a(this._input).read_options(this._options);this.__patterns={template:z,identifier:z.starting_with(o.identifier).matching(o.identifierMatch),number:Q.matching(b),punct:Q.matching(c),comment:Q.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:Q.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:Q.matching(/<!--/),html_comment_end:Q.matching(/-->/),include:Q.starting_with(/#include/).until_after(o.lineBreak),shebang:Q.starting_with(/#!/).until_after(o.lineBreak),xml:Q.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:z.until(/['\\\n\r\u2028\u2029]/),double_quote:z.until(/["\\\n\r\u2028\u2029]/),template_text:z.until(/[`\\$]/),template_expression:z.until(/[`}\\]/)}};m.prototype=new A,m.prototype._is_comment=function(H){return H.type===t.COMMENT||H.type===t.BLOCK_COMMENT||H.type===t.UNKNOWN},m.prototype._is_opening=function(H){return H.type===t.START_BLOCK||H.type===t.START_EXPR},m.prototype._is_closing=function(H,B){return(H.type===t.END_BLOCK||H.type===t.END_EXPR)&&B&&(H.text==="]"&&B.text==="["||H.text===")"&&B.text==="("||H.text==="}"&&B.text==="{")},m.prototype._reset=function(){g=!1},m.prototype._get_next_token=function(H,B){var Q=null;this._readWhitespace();var z=this._input.peek();return z===null?this._create_token(t.EOF,""):(Q=Q||this._read_non_javascript(z),Q=Q||this._read_string(z),Q=Q||this._read_word(H),Q=Q||this._read_singles(z),Q=Q||this._read_comment(z),Q=Q||this._read_regexp(z,H),Q=Q||this._read_xml(z,H),Q=Q||this._read_punctuation(),Q=Q||this._create_token(t.UNKNOWN,this._input.next()),Q)},m.prototype._read_word=function(H){var B;if(B=this.__patterns.identifier.read(),B!=="")return B=B.replace(o.allLineBreaks,`
|
|
`),!(H.type===t.DOT||H.type===t.RESERVED&&(H.text==="set"||H.text==="get"))&&_.test(B)?(B==="in"||B==="of")&&(H.type===t.WORD||H.type===t.STRING)?this._create_token(t.OPERATOR,B):this._create_token(t.RESERVED,B):this._create_token(t.WORD,B);if(B=this.__patterns.number.read(),B!=="")return this._create_token(t.WORD,B)},m.prototype._read_singles=function(H){var B=null;return H==="("||H==="["?B=this._create_token(t.START_EXPR,H):H===")"||H==="]"?B=this._create_token(t.END_EXPR,H):H==="{"?B=this._create_token(t.START_BLOCK,H):H==="}"?B=this._create_token(t.END_BLOCK,H):H===";"?B=this._create_token(t.SEMICOLON,H):H==="."&&T.test(this._input.peek(1))?B=this._create_token(t.DOT,H):H===","&&(B=this._create_token(t.COMMA,H)),B&&this._input.next(),B},m.prototype._read_punctuation=function(){var H=this.__patterns.punct.read();if(H!=="")return H==="="?this._create_token(t.EQUALS,H):H==="?."?this._create_token(t.DOT,H):this._create_token(t.OPERATOR,H)},m.prototype._read_non_javascript=function(H){var B="";if(H==="#"){if(this._is_first_token()&&(B=this.__patterns.shebang.read(),B))return this._create_token(t.UNKNOWN,B.trim()+`
|
|
`);if(B=this.__patterns.include.read(),B)return this._create_token(t.UNKNOWN,B.trim()+`
|
|
`);H=this._input.next();var Q="#";if(this._input.hasNext()&&this._input.testChar(E)){do H=this._input.next(),Q+=H;while(this._input.hasNext()&&H!=="#"&&H!=="=");return H==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(Q+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(Q+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,Q)}this._input.back()}else if(H==="<"&&this._is_first_token()){if(B=this.__patterns.html_comment_start.read(),B){for(;this._input.hasNext()&&!this._input.testChar(o.newline);)B+=this._input.next();return g=!0,this._create_token(t.COMMENT,B)}}else if(g&&H==="-"&&(B=this.__patterns.html_comment_end.read(),B))return g=!1,this._create_token(t.COMMENT,B);return null},m.prototype._read_comment=function(H){var B=null;if(H==="/"){var Q="";if(this._input.peek(1)==="*"){Q=this.__patterns.block_comment.read();var z=y.get_directives(Q);z&&z.ignore==="start"&&(Q+=y.readIgnored(this._input)),Q=Q.replace(o.allLineBreaks,`
|
|
`),B=this._create_token(t.BLOCK_COMMENT,Q),B.directives=z}else this._input.peek(1)==="/"&&(Q=this.__patterns.comment.read(),B=this._create_token(t.COMMENT,Q))}return B},m.prototype._read_string=function(H){if(H==="`"||H==="'"||H==='"'){var B=this._input.next();return this.has_char_escapes=!1,H==="`"?B+=this._read_string_recursive("`",!0,"${"):B+=this._read_string_recursive(H),this.has_char_escapes&&this._options.unescape_strings&&(B=F(B)),this._input.peek()===H&&(B+=this._input.next()),B=B.replace(o.allLineBreaks,`
|
|
`),this._create_token(t.STRING,B)}return null},m.prototype._allow_regexp_or_xml=function(H){return H.type===t.RESERVED&&r(H.text,["return","case","throw","else","do","typeof","yield"])||H.type===t.END_EXPR&&H.text===")"&&H.opened.previous.type===t.RESERVED&&r(H.opened.previous.text,["if","while","for"])||r(H.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},m.prototype._read_regexp=function(H,B){if(H==="/"&&this._allow_regexp_or_xml(B)){for(var Q=this._input.next(),z=!1,N=!1;this._input.hasNext()&&(z||N||this._input.peek()!==H)&&!this._input.testChar(o.newline);)Q+=this._input.peek(),z?z=!1:(z=this._input.peek()==="\\",this._input.peek()==="["?N=!0:this._input.peek()==="]"&&(N=!1)),this._input.next();return this._input.peek()===H&&(Q+=this._input.next(),Q+=this._input.read(o.identifier)),this._create_token(t.STRING,Q)}return null},m.prototype._read_xml=function(H,B){if(this._options.e4x&&H==="<"&&this._allow_regexp_or_xml(B)){var Q="",z=this.__patterns.xml.read_match();if(z){for(var N=z[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),ee=N.indexOf("{")===0,le=0;z;){var Be=!!z[1],Ce=z[2],Me=!!z[z.length-1]||Ce.slice(0,8)==="![CDATA[";if(!Me&&(Ce===N||ee&&Ce.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Be?--le:++le),Q+=z[0],le<=0)break;z=this.__patterns.xml.read_match()}return z||(Q+=this._input.match(/[\s\S]*/g)[0]),Q=Q.replace(o.allLineBreaks,`
|
|
`),this._create_token(t.STRING,Q)}}return null};function F(H){for(var B="",Q=0,z=new p(H),N=null;z.hasNext();)if(N=z.match(/([\s]|[^\\]|\\\\)+/g),N&&(B+=N[0]),z.peek()==="\\"){if(z.next(),z.peek()==="x")N=z.match(/x([0-9A-Fa-f]{2})/g);else if(z.peek()==="u")N=z.match(/u([0-9A-Fa-f]{4})/g);else{B+="\\",z.hasNext()&&(B+=z.next());continue}if(!N)return H;if(Q=parseInt(N[1],16),Q>126&&Q<=255&&N[0].indexOf("x")===0)return H;if(Q>=0&&Q<32){B+="\\"+N[0];continue}else Q===34||Q===39||Q===92?B+="\\"+String.fromCharCode(Q):B+=String.fromCharCode(Q)}return B}m.prototype._read_string_recursive=function(H,B,Q){var z,N;H==="'"?N=this.__patterns.single_quote:H==='"'?N=this.__patterns.double_quote:H==="`"?N=this.__patterns.template_text:H==="}"&&(N=this.__patterns.template_expression);for(var ee=N.read(),le="";this._input.hasNext();){if(le=this._input.next(),le===H||!B&&o.newline.test(le)){this._input.back();break}else le==="\\"&&this._input.hasNext()?(z=this._input.peek(),z==="x"||z==="u"?this.has_char_escapes=!0:z==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),le+=this._input.next()):Q&&(Q==="${"&&le==="$"&&this._input.peek()==="{"&&(le+=this._input.next()),Q===le&&(H==="`"?le+=this._read_string_recursive("}",B,"`"):le+=this._read_string_recursive("`",B,"${"),this._input.hasNext()&&(le+=this._input.next())));le+=N.read(),ee+=le}return ee},e.exports.Tokenizer=m,e.exports.TOKEN=t,e.exports.positionable_operators=C.slice(),e.exports.line_starters=l.slice()},function(e){var I=RegExp.prototype.hasOwnProperty("sticky");function d(p){this.__input=p||"",this.__input_length=this.__input.length,this.__position=0}d.prototype.restart=function(){this.__position=0},d.prototype.back=function(){this.__position>0&&(this.__position-=1)},d.prototype.hasNext=function(){return this.__position<this.__input_length},d.prototype.next=function(){var p=null;return this.hasNext()&&(p=this.__input.charAt(this.__position),this.__position+=1),p},d.prototype.peek=function(p){var A=null;return p=p||0,p+=this.__position,p>=0&&p<this.__input_length&&(A=this.__input.charAt(p)),A},d.prototype.__match=function(p,A){p.lastIndex=A;var s=p.exec(this.__input);return s&&!(I&&p.sticky)&&(s.index!==A&&(s=null)),s},d.prototype.test=function(p,A){return A=A||0,A+=this.__position,A>=0&&A<this.__input_length?!!this.__match(p,A):!1},d.prototype.testChar=function(p,A){var s=this.peek(A);return p.lastIndex=0,s!==null&&p.test(s)},d.prototype.match=function(p){var A=this.__match(p,this.__position);return A?this.__position+=A[0].length:A=null,A},d.prototype.read=function(p,A,s){var i="",o;return p&&(o=this.match(p),o&&(i+=o[0])),A&&(o||!p)&&(i+=this.readUntil(A,s)),i},d.prototype.readUntil=function(p,A){var s="",i=this.__position;p.lastIndex=this.__position;var o=p.exec(this.__input);return o?(i=o.index,A&&(i+=o[0].length)):i=this.__input_length,s=this.__input.substring(this.__position,i),this.__position=i,s},d.prototype.readUntilAfter=function(p){return this.readUntil(p,!0)},d.prototype.get_regexp=function(p,A){var s=null,i="g";return A&&I&&(i="y"),typeof p=="string"&&p!==""?s=new RegExp(p,i):p&&(s=new RegExp(p.source,i)),s},d.prototype.get_literal_regexp=function(p){return RegExp(p.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},d.prototype.peekUntilAfter=function(p){var A=this.__position,s=this.readUntilAfter(p);return this.__position=A,s},d.prototype.lookBack=function(p){var A=this.__position-1;return A>=p.length&&this.__input.substring(A-p.length,A).toLowerCase()===p},e.exports.InputScanner=d},function(e,I,d){var p=d(8).InputScanner,A=d(3).Token,s=d(10).TokenStream,i=d(11).WhitespacePattern,o={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},n=function(a,r){this._input=new p(a),this._options=r||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new i(this._input)};n.prototype.tokenize=function(){this._input.restart(),this.__tokens=new s,this._reset();for(var a,r=new A(o.START,""),t=null,y=[],b=new s;r.type!==o.EOF;){for(a=this._get_next_token(r,t);this._is_comment(a);)b.add(a),a=this._get_next_token(r,t);b.isEmpty()||(a.comments_before=b,b=new s),a.parent=t,this._is_opening(a)?(y.push(t),t=a):t&&this._is_closing(a,t)&&(a.opened=t,t.closed=a,t=y.pop(),a.parent=t),a.previous=r,r.next=a,this.__tokens.add(a),r=a}return this.__tokens},n.prototype._is_first_token=function(){return this.__tokens.isEmpty()},n.prototype._reset=function(){},n.prototype._get_next_token=function(a,r){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(o.RAW,t):this._create_token(o.EOF,"")},n.prototype._is_comment=function(a){return!1},n.prototype._is_opening=function(a){return!1},n.prototype._is_closing=function(a,r){return!1},n.prototype._create_token=function(a,r){var t=new A(a,r,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},n.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=n,e.exports.TOKEN=o},function(e){function I(d){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=d}I.prototype.restart=function(){this.__position=0},I.prototype.isEmpty=function(){return this.__tokens_length===0},I.prototype.hasNext=function(){return this.__position<this.__tokens_length},I.prototype.next=function(){var d=null;return this.hasNext()&&(d=this.__tokens[this.__position],this.__position+=1),d},I.prototype.peek=function(d){var p=null;return d=d||0,d+=this.__position,d>=0&&d<this.__tokens_length&&(p=this.__tokens[d]),p},I.prototype.add=function(d){this.__parent_token&&(d.parent=this.__parent_token),this.__tokens.push(d),this.__tokens_length+=1},e.exports.TokenStream=I},function(e,I,d){var p=d(12).Pattern;function A(s,i){p.call(this,s,i),i?this._line_regexp=this._input.get_regexp(i._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}A.prototype=new p,A.prototype.__set_whitespace_patterns=function(s,i){s+="\\t ",i+="\\n\\r",this._match_pattern=this._input.get_regexp("["+s+i+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+i+"]")},A.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var s=this._input.read(this._match_pattern);if(s===" ")this.whitespace_before_token=" ";else if(s){var i=this.__split(this._newline_regexp,s);this.newline_count=i.length-1,this.whitespace_before_token=i[this.newline_count]}return s},A.prototype.matching=function(s,i){var o=this._create();return o.__set_whitespace_patterns(s,i),o._update(),o},A.prototype._create=function(){return new A(this._input,this)},A.prototype.__split=function(s,i){s.lastIndex=0;for(var o=0,n=[],a=s.exec(i);a;)n.push(i.substring(o,a.index)),o=a.index+a[0].length,a=s.exec(i);return o<i.length?n.push(i.substring(o,i.length)):n.push(""),n},e.exports.WhitespacePattern=A},function(e){function I(d,p){this._input=d,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,p&&(this._starting_pattern=this._input.get_regexp(p._starting_pattern,!0),this._match_pattern=this._input.get_regexp(p._match_pattern,!0),this._until_pattern=this._input.get_regexp(p._until_pattern),this._until_after=p._until_after)}I.prototype.read=function(){var d=this._input.read(this._starting_pattern);return(!this._starting_pattern||d)&&(d+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),d},I.prototype.read_match=function(){return this._input.match(this._match_pattern)},I.prototype.until_after=function(d){var p=this._create();return p._until_after=!0,p._until_pattern=this._input.get_regexp(d),p._update(),p},I.prototype.until=function(d){var p=this._create();return p._until_after=!1,p._until_pattern=this._input.get_regexp(d),p._update(),p},I.prototype.starting_with=function(d){var p=this._create();return p._starting_pattern=this._input.get_regexp(d,!0),p._update(),p},I.prototype.matching=function(d){var p=this._create();return p._match_pattern=this._input.get_regexp(d,!0),p._update(),p},I.prototype._create=function(){return new I(this._input,this)},I.prototype._update=function(){},e.exports.Pattern=I},function(e){function I(d,p){d=typeof d=="string"?d:d.source,p=typeof p=="string"?p:p.source,this.__directives_block_pattern=new RegExp(d+/ beautify( \w+[:]\w+)+ /.source+p,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(d+/\sbeautify\signore:end\s/.source+p,"g")}I.prototype.get_directives=function(d){if(!d.match(this.__directives_block_pattern))return null;var p={};this.__directive_pattern.lastIndex=0;for(var A=this.__directive_pattern.exec(d);A;)p[A[1]]=A[2],A=this.__directive_pattern.exec(d);return p},I.prototype.readIgnored=function(d){return d.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=I},function(e,I,d){var p=d(12).Pattern,A={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function s(i,o){p.call(this,i,o),this.__template_pattern=null,this._disabled=Object.assign({},A),this._excluded=Object.assign({},A),o&&(this.__template_pattern=this._input.get_regexp(o.__template_pattern),this._excluded=Object.assign(this._excluded,o._excluded),this._disabled=Object.assign(this._disabled,o._disabled));var n=new p(i);this.__patterns={handlebars_comment:n.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:n.starting_with(/{{{/).until_after(/}}}/),handlebars:n.starting_with(/{{/).until_after(/}}/),php:n.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}s.prototype=new p,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(i){var o=this._create();return o._disabled[i]=!0,o._update(),o},s.prototype.read_options=function(i){var o=this._create();for(var n in A)o._disabled[n]=i.templating.indexOf(n)===-1;return o._update(),o},s.prototype.exclude=function(i){var o=this._create();return o._excluded[i]=!0,o._update(),o},s.prototype.read=function(){var i="";this._match_pattern?i=this._input.read(this._starting_pattern):i=this._input.read(this._starting_pattern,this.__template_pattern);for(var o=this._read_template();o;)this._match_pattern?o+=this._input.read(this._match_pattern):o+=this._input.readUntil(this.__template_pattern),i+=o,o=this._read_template();return this._until_after&&(i+=this._input.readUntilAfter(this._until_pattern)),i},s.prototype.__set_templated_pattern=function(){var i=[];this._disabled.php||i.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||i.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||i.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(i.push(this.__patterns.django._starting_pattern.source),i.push(this.__patterns.django_value._starting_pattern.source),i.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||i.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&i.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+i.join("|")+")")},s.prototype._read_template=function(){var i="",o=this._input.peek();if(o==="<"){var n=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&n==="?"&&(i=i||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&n==="%"&&(i=i||this.__patterns.erb.read())}else o==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(i=i||this.__patterns.handlebars_comment.read(),i=i||this.__patterns.handlebars_unescaped.read(),i=i||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(i=i||this.__patterns.django_value.read()),this._excluded.django||(i=i||this.__patterns.django_comment.read(),i=i||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(i=i||this.__patterns.smarty_comment.read(),i=i||this.__patterns.smarty_literal.read(),i=i||this.__patterns.smarty.read()));return i},e.exports.TemplatablePattern=s}],O={};function q(e){var I=O[e];if(I!==void 0)return I.exports;var d=O[e]={exports:{}};return U[e](d,d.exports,q),d.exports}var k=q(0);L=k})();var V=L;!(fe=[],W=function(){return{js_beautify:V}}.apply(Oe,fe),W!==void 0&&(ft.exports=W))})()},"6eGT":function(ft,Oe,K){"use strict";function fe(W){return null}Oe.a=fe},"746U":function(ft,Oe,K){"use strict";K.d(Oe,"f",function(){return fe}),K.d(Oe,"l",function(){return W}),K.d(Oe,"k",function(){return L}),K.d(Oe,"j",function(){return V}),K.d(Oe,"g",function(){return U}),K.d(Oe,"m",function(){return O}),K.d(Oe,"h",function(){return q}),K.d(Oe,"n",function(){return k}),K.d(Oe,"c",function(){return e}),K.d(Oe,"a",function(){return I}),K.d(Oe,"i",function(){return d}),K.d(Oe,"o",function(){return p}),K.d(Oe,"e",function(){return i}),K.d(Oe,"d",function(){return o}),K.d(Oe,"p",function(){return n}),K.d(Oe,"b",function(){return a});function fe(r){return Array.isArray(r)}function W(r){return typeof r=="string"}function L(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)&&!(r instanceof RegExp)&&!(r instanceof Date)}function V(r){return typeof r=="number"&&!isNaN(r)}function U(r){return r===!0||r===!1}function O(r){return typeof r=="undefined"}function q(r){return!k(r)}function k(r){return O(r)||r===null}function e(r,t){if(!r)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function I(r){if(k(r))throw new Error("Assertion Failed: argument is undefined or null");return r}function d(r){return typeof r=="function"}function p(r,t){const y=Math.min(r.length,t.length);for(let b=0;b<y;b++)A(r[b],t[b])}function A(r,t){if(W(t)){if(typeof r!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(d(t)){try{if(r instanceof t)return}catch(y){}if(!k(r)&&r.constructor===t)return;if(t.length===1&&t.call(void 0,r)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function s(r){let t=[],y=Object.getPrototypeOf(r);for(;Object.prototype!==y;)t=t.concat(Object.getOwnPropertyNames(y)),y=Object.getPrototypeOf(y);return t}function i(r){const t=[];for(const y of s(r))typeof r[y]=="function"&&t.push(y);return t}function o(r,t){const y=E=>function(){const T=Array.prototype.slice.call(arguments,0);return t(E,T)};let b={};for(const E of r)b[E]=y(E);return b}function n(r){return r===null?void 0:r}function a(r,t="Unreachable"){throw new Error(t)}},"815F":function(ft,Oe,K){"use strict";K.d(Oe,"e",function(){return q}),K.d(Oe,"c",function(){return e}),K.d(Oe,"d",function(){return I}),K.d(Oe,"a",function(){return p}),K.d(Oe,"f",function(){return A}),K.d(Oe,"b",function(){return s});var fe=K("KQm4"),W=K("VTBJ"),L=K("Ff2n"),V=K("Zm9Q"),U=K("Kwbf"),O=K("OZM5");function q(i,o){return i!=null?i:o}function k(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=new Map;function n(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(t){var y=t.key,b=t.children;Object(U.a)(y!=null,"Tree node must have a certain key: [".concat(r).concat(y,"]"));var E=String(y);Object(U.a)(!o.has(E)||y===null||y===void 0,"Same 'key' exist in the Tree: ".concat(E)),o.set(E,!0),n(b,"".concat(r).concat(E," > "))})}n(i)}function e(i){function o(n){var a=Object(V.a)(n);return a.map(function(r){if(!Object(O.i)(r))return Object(U.a)(!r,"Tree/TreeNode can only accept TreeNode as children."),null;var t=r.key,y=r.props,b=y.children,E=Object(L.a)(y,["children"]),T=Object(W.a)({key:t},E),C=o(b);return C.length&&(T.children=C),T}).filter(function(r){return r})}return o(i)}function I(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=new Set(o===!0?[]:o),a=[];function r(t){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(b,E){var T=Object(O.h)(y?y.pos:"0",E),C=q(b.key,T),h=Object(W.a)(Object(W.a)({},b),{},{parent:y,pos:T,children:null,data:b,isStart:[].concat(Object(fe.a)(y?y.isStart:[]),[E===0]),isEnd:[].concat(Object(fe.a)(y?y.isEnd:[]),[E===t.length-1])});return a.push(h),o===!0||n.has(C)?h.children=r(b.children||[],h):h.children=[],h})}return r(i),a}function d(i,o,n){var a;n?typeof n=="string"?a=function(y){return y[n]}:typeof n=="function"&&(a=function(y){return n(y)}):a=function(y,b){return q(y.key,b)};function r(t,y,b){var E=t?t.children:i,T=t?Object(O.h)(b.pos,y):"0";if(t){var C=a(t,T),h={node:t,index:y,pos:T,key:C,parentPos:b.node?b.pos:null,level:b.level+1};o(h)}E&&E.forEach(function(c,l){r(c,l,{node:t,pos:T,level:b?b.level+1:-1})})}r(null)}function p(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.initWrapper,a=o.processEntity,r=o.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,y={},b={},E={posEntities:y,keyEntities:b};return n&&(E=n(E)||E),d(i,function(T){var C=T.node,h=T.index,c=T.pos,l=T.key,u=T.parentPos,_=T.level,g={node:C,index:h,key:l,pos:c,level:_},m=q(l,c);y[c]=g,b[m]=g,g.parent=y[u],g.parent&&(g.parent.children=g.parent.children||[],g.parent.children.push(g)),a&&a(g,E)},t),r&&r(E),E}function A(i,o){var n=o.expandedKeys,a=o.selectedKeys,r=o.loadedKeys,t=o.loadingKeys,y=o.checkedKeys,b=o.halfCheckedKeys,E=o.dragOverNodeKey,T=o.dropPosition,C=o.keyEntities,h=C[i],c={eventKey:i,expanded:n.indexOf(i)!==-1,selected:a.indexOf(i)!==-1,loaded:r.indexOf(i)!==-1,loading:t.indexOf(i)!==-1,checked:y.indexOf(i)!==-1,halfChecked:b.indexOf(i)!==-1,pos:String(h?h.pos:""),dragOver:E===i&&T===0,dragOverGapTop:E===i&&T===-1,dragOverGapBottom:E===i&&T===1};return c}function s(i){var o=i.data,n=i.expanded,a=i.selected,r=i.checked,t=i.loaded,y=i.loading,b=i.halfChecked,E=i.dragOver,T=i.dragOverGapTop,C=i.dragOverGapBottom,h=i.pos,c=i.active,l=Object(W.a)(Object(W.a)({},o),{},{expanded:n,selected:a,checked:r,loaded:t,loading:y,halfChecked:b,dragOver:E,dragOverGapTop:T,dragOverGapBottom:C,pos:h,active:c});return"props"in l||Object.defineProperty(l,"props",{get:function(){return Object(U.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),i}}),l}},"8HAY":function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return U}),K.d(Oe,"b",function(){return O}),K.d(Oe,"d",function(){return q}),K.d(Oe,"e",function(){return k}),K.d(Oe,"c",function(){return e});var fe=K("MI8n"),W=K("pmY6"),L=K("3/fG"),V=function(I,d,p,A){function s(i){return i instanceof p?i:new p(function(o){o(i)})}return new(p||(p=Promise))(function(i,o){function n(t){try{r(A.next(t))}catch(y){o(y)}}function a(t){try{r(A.throw(t))}catch(y){o(y)}}function r(t){t.done?i(t.value):s(t.value).then(n,a)}r((A=A.apply(I,d||[])).next())})};class U extends W.a{constructor(I,d="",p="",A=!0,s){super();this._onDidChange=this._register(new fe.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=I,this._label=d,this._cssClass=p,this._enabled=A,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(I){this._setLabel(I)}_setLabel(I){this._label!==I&&(this._label=I,this._onDidChange.fire({label:I}))}get tooltip(){return this._tooltip||""}set tooltip(I){this._setTooltip(I)}_setTooltip(I){this._tooltip!==I&&(this._tooltip=I,this._onDidChange.fire({tooltip:I}))}get class(){return this._cssClass}set class(I){this._setClass(I)}_setClass(I){this._cssClass!==I&&(this._cssClass=I,this._onDidChange.fire({class:I}))}get enabled(){return this._enabled}set enabled(I){this._setEnabled(I)}_setEnabled(I){this._enabled!==I&&(this._enabled=I,this._onDidChange.fire({enabled:I}))}get checked(){return this._checked}set checked(I){this._setChecked(I)}_setChecked(I){this._checked!==I&&(this._checked=I,this._onDidChange.fire({checked:I}))}run(I,d){return V(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(I))})}}class O extends W.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new fe.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new fe.b),this.onDidRun=this._onDidRun.event}run(I,d){return V(this,void 0,void 0,function*(){if(!I.enabled)return;this._onBeforeRun.fire({action:I});let p;try{yield this.runAction(I,d)}catch(A){p=A}this._onDidRun.fire({action:I,error:p})})}runAction(I,d){return V(this,void 0,void 0,function*(){yield I.run(d)})}}class q extends U{constructor(I){super(q.ID,I,I?"separator text":"separator");this.checked=!1,this.enabled=!1}}q.ID="vs.actions.separator";class k{constructor(I,d,p,A){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=I,this.label=d,this.class=A,this._actions=p}get actions(){return this._actions}dispose(){}run(){return V(this,void 0,void 0,function*(){})}}class e extends U{constructor(){super(e.ID,L.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8hTe":function(ft,Oe,K){ft.exports={button:"button___1wy9m"}},"9Bee":function(ft,Oe,K){"use strict";var fe=K("DYRE"),W=K("zeV3"),L=K("+L6B"),V=K("2/Rp"),U=K("k1fw"),O=K("9og8"),q=K("tJVT"),k=K("WmNS"),e=K.n(k),I=K("q1tI"),d=K.n(I),p=K("vg9a"),A=K("DlQD"),s=K.n(A),i=K("rUJ1");function o(pe,ne){var ie=pe.match(/^(\s+)(?:```)/);if(ie===null)return ne;var de=ie[1];return ne.split(`
|
|
`).map(function(ge){var se=ge.match(/^\s+/);if(se===null)return ge;var Ae=Object(q.a)(se,1),Ee=Ae[0];return Ee.length>=de.length?ge.slice(de.length):ge}).join(`
|
|
`)}var n=[],a=["<ul>"],r=new s.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function y(){n.length=0,a=["<ul>"]}var b={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function E(pe,ne,ie,de){if(ne>=pe.length||pe[ne].level<=ie)return ne;var ge=pe[ne];de.push("<li><a href='#"+ge.anchor+"'>"+ge.text+"</a>"),ne++;var se=[];return ne=E(pe,ne,ge.level,se),se.length>0&&(de.push("<ul>"),se.forEach(function(Ae){de.push(Ae)}),de.push("</ul>")),de.push("</li>"),ne=E(pe,ne,ie,de),ne}function T(){return E(n,0,0,a),a.push("</ul>"),a.join("")}var C={heading:function(ne){var ie=t.exec(ne);if(ie)return{type:"heading",raw:ie[0],depth:ie[1].length,text:ie[2]}},fences:function(ne){var ie=this.rules.block.fences.exec(ne);if(ie){var de=ie[0],ge=o(de,ie[3]||""),se=ie[2]?ie[2].trim():ie[2];if(["latex","katex","math"].indexOf(se)>=0){var Ae=l(),Ee=ge;ge=Ae,u[Ae]={type:"block",expression:Ee}}return{type:"code",raw:de,lang:se,text:ge}}}},h=/(?:\${2})([^\n`]+?)(?:\${2})/gi,c=0,l=function(){return"__special_katext_id_".concat(c++,"__")},u={};function _(){return u}function g(){c=0,u={}}function m(pe){return pe=pe.replace(h,function(ne,ie){var de=l();return u[de]={type:"inline",expression:ie},de}),pe}var F=r.listitem;r.listitem=function(pe){return F(m(pe))};var H=r.paragraph;r.paragraph=function(pe){return H(m(pe))};var B=r.tablecell;r.tablecell=function(pe,ne){return B(m(pe),ne)},r.code=function(pe,ne,ie){var de=(ne||"").match(/\S*/)[0];return de?["latex","katex","math"].indexOf(de)>=0?"<p class='editormd-tex'>".concat(pe,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(ne,'">').concat(ie?pe:Object(i.escape)(pe,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(ie?pe:Object(i.escape)(pe,!0))+"</code></pre>"},r.heading=function(pe,ne,ie){var de=this.options.headerPrefix+ie.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return n.push({anchor:de,level:ne,text:pe}),"<h"+ne+' id="'+de+'">'+pe+"</h"+ne+">"},s.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),s.a.use({tokenizer:C,renderer:r});var Q=s.a,z=K("SJMd"),N=K("ulZh"),ee=K.n(N),le=K("m3rI"),Be=K("Oy/b"),Ce=K("p5ED"),Me=K("ErOA"),Le=K("STEk");/* **********************************
|
|
cropro version 1.2.0
|
|
@license SEE LICENSE IN LICENSE
|
|
|
|
copyright Alan Mendelevich
|
|
see README and LICENSE for details
|
|
********************************** *//*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var je=function(pe,ne){return(je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ie,de){ie.__proto__=de}||function(ie,de){for(var ge in de)Object.prototype.hasOwnProperty.call(de,ge)&&(ie[ge]=de[ge])})(pe,ne)};function He(pe,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Class extends value "+String(ne)+" is not a constructor or null");function ie(){this.constructor=pe}je(pe,ne),pe.prototype=ne===null?Object.create(ne):(ie.prototype=ne.prototype,new ie)}function Je(pe,ne,ie,de){return new(ie||(ie=Promise))(function(ge,se){function Ae(ke){try{xe(de.next(ke))}catch(Qe){se(Qe)}}function Ee(ke){try{xe(de.throw(ke))}catch(Qe){se(Qe)}}function xe(ke){var Qe;ke.done?ge(ke.value):(Qe=ke.value,Qe instanceof ie?Qe:new ie(function(nt){nt(Qe)})).then(Ae,Ee)}xe((de=de.apply(pe,ne||[])).next())})}function Se(pe,ne){var ie,de,ge,se,Ae={label:0,sent:function(){if(1&ge[0])throw ge[1];return ge[1]},trys:[],ops:[]};return se={next:Ee(0),throw:Ee(1),return:Ee(2)},typeof Symbol=="function"&&(se[Symbol.iterator]=function(){return this}),se;function Ee(xe){return function(ke){return function(Qe){if(ie)throw new TypeError("Generator is already executing.");for(;Ae;)try{if(ie=1,de&&(ge=2&Qe[0]?de.return:Qe[0]?de.throw||((ge=de.return)&&ge.call(de),0):de.next)&&!(ge=ge.call(de,Qe[1])).done)return ge;switch(de=0,ge&&(Qe=[2&Qe[0],ge.value]),Qe[0]){case 0:case 1:ge=Qe;break;case 4:return Ae.label++,{value:Qe[1],done:!1};case 5:Ae.label++,de=Qe[1],Qe=[0];continue;case 7:Qe=Ae.ops.pop(),Ae.trys.pop();continue;default:if(!(ge=Ae.trys,(ge=ge.length>0&&ge[ge.length-1])||Qe[0]!==6&&Qe[0]!==2)){Ae=0;continue}if(Qe[0]===3&&(!ge||Qe[1]>ge[0]&&Qe[1]<ge[3])){Ae.label=Qe[1];break}if(Qe[0]===6&&Ae.label<ge[1]){Ae.label=ge[1],ge=Qe;break}if(ge&&Ae.label<ge[2]){Ae.label=ge[2],Ae.ops.push(Qe);break}ge[2]&&Ae.ops.pop(),Ae.trys.pop();continue}Qe=ne.call(pe,Ae)}catch(nt){Qe=[6,nt],de=0}finally{ie=ge=0}if(5&Qe[0])throw Qe[1];return{value:Qe[0]?Qe[1]:void 0,done:!0}}([xe,ke])}}}var $=function(){function pe(){}return pe.addKey=function(ne){pe.key=ne},Object.defineProperty(pe,"isLicensed",{get:function(){return!!pe.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(pe.key)},enumerable:!1,configurable:!0}),pe}(),D=function(){function pe(){}return pe.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},pe.setAttributes=function(ne,ie){for(var de=0,ge=ie;de<ge.length;de++){var se=ge[de],Ae=se[0],Ee=se[1];ne.setAttribute(Ae,Ee)}},pe.createRect=function(ne,ie,de){var ge=document.createElementNS("http://www.w3.org/2000/svg","rect");return ge.setAttribute("width",ne.toString()),ge.setAttribute("height",ie.toString()),de&&pe.setAttributes(ge,de),ge},pe.createLine=function(ne,ie,de,ge,se){var Ae=document.createElementNS("http://www.w3.org/2000/svg","line");return Ae.setAttribute("x1",ne.toString()),Ae.setAttribute("y1",ie.toString()),Ae.setAttribute("x2",de.toString()),Ae.setAttribute("y2",ge.toString()),se&&pe.setAttributes(Ae,se),Ae},pe.createPolygon=function(ne,ie){var de=document.createElementNS("http://www.w3.org/2000/svg","polygon");return de.setAttribute("points",ne),ie&&pe.setAttributes(de,ie),de},pe.createCircle=function(ne,ie){var de=document.createElementNS("http://www.w3.org/2000/svg","circle");return de.setAttribute("cx",(ne/2).toString()),de.setAttribute("cy",(ne/2).toString()),de.setAttribute("r",ne.toString()),ie&&pe.setAttributes(de,ie),de},pe.createEllipse=function(ne,ie,de){var ge=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return ge.setAttribute("cx",(ne/2).toString()),ge.setAttribute("cy",(ie/2).toString()),ge.setAttribute("rx",(ne/2).toString()),ge.setAttribute("ry",(ie/2).toString()),de&&pe.setAttributes(ge,de),ge},pe.createGroup=function(ne){var ie=document.createElementNS("http://www.w3.org/2000/svg","g");return ne&&pe.setAttributes(ie,ne),ie},pe.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},pe.createMarker=function(ne,ie,de,ge,se,Ae,Ee){var xe=document.createElementNS("http://www.w3.org/2000/svg","marker");return pe.setAttributes(xe,[["id",ne],["orient",ie],["markerWidth",de.toString()],["markerHeight",ge.toString()],["refX",se.toString()],["refY",Ae.toString()]]),xe.appendChild(Ee),xe},pe.createText=function(ne){var ie=document.createElementNS("http://www.w3.org/2000/svg","text");return ie.setAttribute("x","0"),ie.setAttribute("y","0"),ne&&pe.setAttributes(ie,ne),ie},pe.createTSpan=function(ne,ie){var de=document.createElementNS("http://www.w3.org/2000/svg","tspan");return de.textContent=ne,ie&&pe.setAttributes(de,ie),de},pe.createImage=function(ne){var ie=document.createElementNS("http://www.w3.org/2000/svg","image");return ne&&pe.setAttributes(ie,ne),ie},pe.createPoint=function(ne,ie){var de=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return de.x=ne,de.y=ie,de},pe.createPath=function(ne,ie){var de=document.createElementNS("http://www.w3.org/2000/svg","path");return de.setAttribute("d",ne),ie&&pe.setAttributes(de,ie),de},pe.createElement=function(ne,ie){var de=document.createElementNS("http://www.w3.org/2000/svg",ne);return ie&&pe.setAttributes(de,ie),de},pe.getHollowRectanglePath=function(ne,ie,de,ge,se,Ae,Ee,xe){return"M"+ne+","+ie+"V"+(ie+ge)+"H"+(ne+de)+"V"+ie+"H"+se+"V"+Ae+"H"+(se+Ee)+"V"+(Ae+xe)+"H"+se+"V"+ie+"Z"},pe}(),M=function(){function pe(ne){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+ne+"_"}return Object.defineProperty(pe.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),pe.prototype.addClass=function(ne){return this.styleSheet===void 0&&this.addStyleSheet(),ne.name=""+this.classNamePrefix+ne.localName,this.classes.push(ne),this.styleSheet.sheet.insertRule("."+ne.name+" {"+ne.style+"}",this.styleSheet.sheet.cssRules.length),ne},pe.prototype.addRule=function(ne){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(ne),this.styleSheet.sheet.insertRule(ne.selector+" {"+ne.style+"}",this.styleSheet.sheet.cssRules.length)},pe.prototype.addStyleSheet=function(){var ne;this.styleSheet=document.createElement("style"),((ne=this.styleSheetRoot)!==null&&ne!==void 0?ne:document.head).appendChild(this.styleSheet),this.addRule(new te("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new te("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new te("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new oe("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new oe("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},pe.prototype.removeStyleSheet=function(){var ne;this.styleSheet&&(((ne=this.styleSheetRoot)!==null&&ne!==void 0?ne:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},pe}(),te=function(pe,ne){this.selector=pe,this.style=ne},oe=function(pe,ne){this.localName=pe,this.style=ne},G=function(){function pe(){this.blocks=[],this.display=""}return pe.prototype.addButtonBlock=function(ne){ne.className=this.blockClassName,ne.buttonClassName=this.buttonClassName,ne.buttonColorsClassName=this.buttonColorsClassName,ne.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(ne)},pe.prototype.addElementBlock=function(ne){ne.className===void 0&&(ne.className=this.blockClassName),this.blocks.push(ne)},pe.prototype.getUI=function(){var ne=document.createElement("div");return ne.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,ne.style.display=this.display,this.blocks.forEach(function(ie){return ne.appendChild(ie.getUI())}),ne},pe}(),re=function(){function pe(){}return pe.prototype.getUI=function(){var ne=document.createElement("div");if(ne.className=this.className,this.minWidth!==void 0&&(ne.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":ne.style.justifyContent="flex-start";break;case"center":ne.style.justifyContent="center";break;case"end":ne.style.justifyContent="flex-end"}return ne.style.whiteSpace="nowrap",ne},pe}(),j=function(pe){function ne(){var ie=pe!==null&&pe.apply(this,arguments)||this;return ie.buttons=[],ie}return He(ne,pe),ne.prototype.addButton=function(ie){ie.className=this.buttonClassName,ie.colorsClassName=this.buttonColorsClassName,ie.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(ie)},ne.prototype.getUI=function(){var ie=pe.prototype.getUI.call(this);return this.buttons.forEach(function(de){return ie.appendChild(de.getUI())}),ie},ne}(re),J=function(){function pe(ne,ie){this._isActive=!1,this._isHidden=!1,this._icon=ne,this.title=ie,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(pe.prototype,"icon",{get:function(){return this._icon},set:function(ne){this._icon=ne,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"isActive",{get:function(){return this._isActive},set:function(ne){this._isActive=ne,this.adjustClassName()},enumerable:!1,configurable:!0}),pe.prototype.getUI=function(){var ne=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return ne.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},pe.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},pe.prototype.hide=function(){this._isHidden=!0},pe}(),Y=function(pe){function ne(){var ie=pe!==null&&pe.apply(this,arguments)||this;return ie.elements=[],ie}return He(ne,pe),ne.prototype.addElement=function(ie){this.elements.push(ie)},ne.prototype.getUI=function(){var ie=pe.prototype.getUI.call(this);return this.elements.forEach(function(de){return ie.appendChild(de)}),ie},ne}(re),he=function(){function pe(ne,ie){this.horizontal=ne,this.vertical=ie}return Object.defineProperty(pe.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),pe.prototype.getVerticalLength=function(ne){return ne/this.ratio},pe.prototype.getHorizontalLength=function(ne){return ne*this.ratio},pe}(),we=function(){function pe(){}return pe.getIcon=function(ne,ie){if(ne>0&&ie>0){var de=new he(ne,ie),ge=de.ratio>=1?20:de.getHorizontalLength(20),se=de.ratio<1?20:de.getVerticalLength(20),Ae=document.createElementNS("http://www.w3.org/2000/svg","svg");Ae.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ae.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ae);var Ee=D.createDefs();Ae.appendChild(Ee);var xe=D.createElement("clipPath",[["id","text-bg-clip"]]);Ee.appendChild(xe);var ke=D.createPath(D.getHollowRectanglePath((24-ge)/2,(24-se)/2,ge,se,(24-ge)/2+2,(24-se)/2+2,ge-4,se-4));Ae.appendChild(ke);var Qe=D.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Qe.appendChild(D.createTSpan(ne+":"+ie)),Ae.appendChild(Qe);var nt=Qe.getBBox();D.setAttributes(Qe,[["x",((24-nt.width)/2).toString()],["y",((24-nt.height)/2-nt.y).toString()]]);var dt=D.createPath(D.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(nt.width))/2,(24-Math.ceil(nt.height))/2,Math.ceil(nt.width),Math.ceil(nt.height)));return xe.appendChild(dt),D.setAttributes(ke,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ae),Ae.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},pe}(),Te=function(pe){function ne(ie,de,ge){var se=pe.call(this,ie,de)||this;return se.isDropdownOpen=!1,se.onClick=se.dropdownButtonClicked,se.dropdownButtons=ge,se}return He(ne,pe),ne.prototype.setupDropdown=function(){var ie=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(de){de.className=ie.className,de.colorsClassName=ie.colorsClassName,ie.dropdownBlock.appendChild(de.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},ne.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},ne.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},ne.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},ne.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},ne.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},ne}(J),Xe=function(){function pe(ne,ie){this.GRIP_SIZE=10,this.color=ne,this.fillColor=ie,this.visual=D.createGroup(),this.visual.appendChild(D.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(D.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return pe.prototype.ownsTarget=function(ne){return ne===this.visual||ne===this.visual.childNodes[0]||ne===this.visual.childNodes[1]},pe.prototype.setCenter=function(ne,ie){this.visual.childNodes.forEach(function(de){return D.setAttributes(de,[["cx",ne.toString()],["cy",ie.toString()]])})},pe}(),Ze=function(){function pe(ne,ie,de,ge){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=ne,this.canvasHeight=ie,this.margin=de,this.container=ge,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(pe.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(ne){this._aspectRatio=ne,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ne){this._isGridVisible=ne,this.gridContainer&&D.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(ne){this._zoomFactor=ne,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),pe.prototype.open=function(){var ne=this;this.cropShadeElement=D.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=D.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var ie=0;ie<this.numberOfGridLines;ie++)this.horizontalGridLines.push(D.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(D.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(de){return ne.gridContainer.appendChild(de)}),this.verticalGridLines.forEach(function(de){return ne.gridContainer.appendChild(de)}),this.cropRectElement=D.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Xe(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Xe(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Xe(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Xe(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},pe.prototype.setCropRectangle=function(ne){this.cropRect=ne;var ie=Object.assign({},this.cropRect);this.zoomFactor!==1&&(ie.width=this.cropRect.width*this.zoomFactor,ie.height=this.cropRect.height*this.zoomFactor,ie.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-ie.width/2,ie.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-ie.height/2),D.setAttributes(this.cropRectElement,[["x",ie.x.toString()],["y",ie.y.toString()],["width",ie.width.toString()],["height",ie.height.toString()]]);var de=ie.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(se,Ae){var Ee=ie.y+de*(Ae+1);D.setAttributes(se,[["x1",""+ie.x],["y1",""+Ee],["x2",""+(ie.x+ie.width)],["y2",""+Ee]])});var ge=ie.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(se,Ae){var Ee=ie.x+ge*(Ae+1);D.setAttributes(se,[["x1",""+Ee],["y1",""+ie.y],["x2",""+Ee],["y2",""+(ie.y+ie.height)]])}),D.setAttributes(this.cropShadeElement,[["d",D.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,ie.x,ie.y,ie.width,ie.height)]]),this.topLeftGrip.setCenter(ie.x,ie.y),this.topRightGrip.setCenter(ie.x+ie.width,ie.y),this.bottomLeftGrip.setCenter(ie.x,ie.y+ie.height),this.bottomRightGrip.setCenter(ie.x+ie.width,ie.y+ie.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},pe.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},pe.prototype.clientToLocalCoordinates=function(ne,ie){var de=this.container.getBoundingClientRect();return{x:ne-de.left+this.margin,y:ie-de.top+this.margin}},pe.prototype.onPointerDown=function(ne){this.container.setPointerCapture(ne.pointerId),this.previousPoint=this.clientToLocalCoordinates(ne.clientX,ne.clientY),this.cropRectElement===ne.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(ne.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(ne.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(ne.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(ne.target)&&(this.activeGrip=this.bottomRightGrip)},pe.prototype.onPointerMove=function(ne){if(this.isMoving)this.move(this.clientToLocalCoordinates(ne.clientX,ne.clientY));else if(this.activeGrip){var ie=this.clientToLocalCoordinates(ne.clientX,ne.clientY);this.resize(ie)}ne.preventDefault()},pe.prototype.onPointerUp=function(ne){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(ne.pointerId)},pe.prototype.move=function(ne){var ie=ne.x-this.previousPoint.x,de=ne.y-this.previousPoint.y;this.zoomFactor!==1&&(ie=-ie/this.zoomFactor,de=-de/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+ie),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+de),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=ne},pe.prototype.resize=function(ne){var ie=Object.assign({},this.cropRect),de=ne.x-this.previousPoint.x,ge=ne.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:ie.x+de<this.margin&&(de=this.margin-ie.x),ie.x+=de,ie.width=this.cropRect.x+this.cropRect.width-ie.x;break;case this.bottomRightGrip:case this.topRightGrip:ie.width+de>this.canvasWidth*this.zoomFactor&&(de=this.canvasWidth*this.zoomFactor-ie.width),ie.width+=de}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(ie.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(de),ie.height=this.aspectRatio.getVerticalLength(ie.width)):(ie.y+=ge,ie.height=this.cropRect.y+this.cropRect.height-ie.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?ie.height=this.aspectRatio.getVerticalLength(ie.width):ie.height+=ge}ie.width<10&&(ie.x=this.cropRect.x,ie.width=10),ie.height<10&&(ie.y=this.cropRect.y,ie.height=10),this.previousPoint=ne,ie.x>=this.margin&&ie.y>=this.margin&&ie.x-this.margin+ie.width<=this.canvasWidth&&ie.y-this.margin+ie.height<=this.canvasHeight&&(this.cropRect=ie,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},pe.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var ne=this.cropRect.x+this.cropRect.width/2,ie=this.cropRect.y+this.cropRect.height/2,de=this.aspectRatio.getHorizontalLength(this.cropRect.height),ge=this.aspectRatio.getVerticalLength(this.cropRect.width);de/this.canvasWidth<ge/this.canvasHeight?this.cropRect.width=de:this.cropRect.height=ge,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=ne-this.cropRect.width/2,this.cropRect.y=ie-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},pe.prototype.getRescaledRect=function(ne,ie,de,ge,se,Ae){var Ee=de/ne,xe=ge/ie;return{x:(se.x-Ae)*Ee+Ae,y:(se.y-Ae)*xe+Ae,width:se.width*Ee,height:se.height*xe}},pe.prototype.scaleCanvas=function(ne,ie){var de=this.getRescaledRect(this.canvasWidth,this.canvasHeight,ne,ie,this.cropRect,this.margin);this.canvasWidth=ne,this.canvasHeight=ie,this.onCropChange&&this.onCropChange(de),this.setCropRectangle(de)},pe}(),et=function(){function pe(ne){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=ne,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(pe.prototype,"angle",{get:function(){return this._angle},set:function(ne){this._angle=ne,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),pe.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},pe.prototype.onPointerDown=function(ne){this.controlContainer.setPointerCapture(ne.pointerId),this.isDragging=!0,this.previousPoint={x:ne.clientX,y:ne.clientY}},pe.prototype.onPointerMove=function(ne){this.isDragging&&(this.onAngleChange&&this.onAngleChange((ne.clientX-this.previousPoint.x)/5),this.previousPoint.x=ne.clientX)},pe.prototype.onPointerUp=function(ne){this.isDragging&&this.onAngleChange&&this.onAngleChange((ne.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(ne.pointerId)},pe.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var ne=this.angleLabelText.getBBox();D.setAttributes(this.angleLabelElement,[["x",((this.width-ne.width)/2).toString()],["y",(this.height/2).toString()]])}},pe.prototype.positionScaleShape=function(){if(this.scaleShape){var ne=this.scaleShape.transform.baseVal.getItem(0);ne.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(ne,0)}},pe.prototype.getVisual=function(){var ne=document.createElementNS("http://www.w3.org/2000/svg","svg");ne.setAttribute("xmlns","http://www.w3.org/2000/svg"),ne.setAttribute("width",this.width+"px"),ne.setAttribute("height",this.height+"px"),ne.setAttribute("viewBox","0 0 "+this.width+" "+this.height),ne.style.flexShrink="0",document.body.appendChild(ne);for(var ie="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,de=1;de<=this.width/5+10;de++){var ge=de%5==0?this.height/3:this.height/6;ie+="h4v"+-ge+"h1v"+ge}ie+="v1H0Z",this.scaleShape=D.createPath(ie);var se=D.createTransform();this.scaleShape.transform.baseVal.appendItem(se),ne.appendChild(this.scaleShape),this.angleLabelElement=D.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=D.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var Ae=D.createTSpan("");return Ae.innerHTML="°",this.angleLabelElement.appendChild(Ae),ne.appendChild(this.angleLabelElement),document.body.removeChild(ne),ne},pe}(),rt=function(){function pe(){this.naturalSize=!1,this.imageType="image/png"}return pe.prototype.rasterize=function(ne,ie,de,ge,se,Ae,Ee){var xe=this;return new Promise(function(ke){var Qe=document.createElement("canvas");Qe.width=ne.width.baseVal.value-2*ge,Qe.height=ne.height.baseVal.value-2*ge;var nt=1,dt=1;xe.naturalSize===!0?(nt=ie.naturalWidth/(ne.width.baseVal.value-2*ge)/Ae,dt=ie.naturalHeight/(ne.height.baseVal.value-2*ge)/Ee,Qe.width=ie.naturalWidth/Ae,Qe.height=ie.naturalHeight/Ee):xe.width!==void 0&&xe.height!==void 0&&(nt=xe.width/de.width,dt=xe.height/de.height,Qe.width*=nt,Qe.height*=dt);var wt=Qe.getContext("2d");wt.translate(Qe.width/2,Qe.height/2),wt.rotate(se*Math.PI/180),wt.scale(Ae,Ee),wt.translate(-Qe.width/2,-Qe.height/2),wt.drawImage(ie,0,0,Qe.width,Qe.height);var gt=document.createElement("canvas");gt.width=de.width*nt,gt.height=de.height*dt,gt.getContext("2d").putImageData(wt.getImageData((de.x-ge)*nt,(de.y-ge)*dt,de.width*nt,de.height*dt),0,0),ke(gt.toDataURL(xe.imageType,xe.imageQuality))})},pe}(),At=function(){function pe(ne){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=pe.instanceCounter++,this.styles=new M(this.instanceNo),this.target=ne,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(pe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(ne){this._zoomToCropEnabled=ne,ne?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(ne){this._isGridVisible=ne,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"gridLines",{get:function(){return this._gridLines},set:function(ne){this._gridLines=ne,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(ne){this._rotationAngle=ne,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"aspectRatio",{get:function(){var ne;return(ne=this._aspectRatio)!==null&&ne!==void 0?ne:this.aspectRatios[0]},set:function(ne){this._aspectRatio=ne},enumerable:!1,configurable:!0}),pe.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},pe.prototype.show=function(){this.showUI(),this.open()},pe.prototype.close=function(ne){ne===void 0&&(ne=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),ne||this.closeEventListeners.forEach(function(ie){return ie()}),this._isOpen=!1)},pe.prototype.addRenderEventListener=function(ne){this.renderEventListeners.push(ne)},pe.prototype.removeRenderEventListener=function(ne){this.renderEventListeners.indexOf(ne)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(ne),1)},pe.prototype.addCloseEventListener=function(ne){this.closeEventListeners.push(ne)},pe.prototype.removeCloseEventListener=function(ne){this.closeEventListeners.indexOf(ne)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(ne),1)},pe.prototype.setupResizeObserver=function(){var ne=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){ne.resize(ne.target.clientWidth,ne.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},pe.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var ne=1*this.target.clientWidth/this.target.clientHeight,ie=this.contentDiv.clientWidth/ne>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*ne:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,de=ie+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/ne;this.resize(ie,de)}},pe.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},pe.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",D.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},pe.prototype.resize=function(ne,ie){this.imageWidth=Math.round(ne),this.imageHeight=Math.round(ie),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},pe.prototype.setEditingTarget=function(){var ne=document.createElement("canvas");ne.width=this.target.naturalWidth,ne.height=this.target.naturalHeight,ne.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var ie=ne.toDataURL();D.setAttributes(this.editingTarget,[["href",ie]]),this.setEditingTargetSize()},pe.prototype.setTopLeft=function(){var ne=this.target.getBoundingClientRect(),ie=this.editorCanvas.getBoundingClientRect();this.left=ne.left-ie.left-this.CANVAS_MARGIN,this.top=ne.top-ie.top-this.CANVAS_MARGIN},pe.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=D.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=D.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=D.createGroup(),this.editingTargetRotationScaleContainer=D.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var ne=D.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(ne);var ie=D.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(ie),this.editingTargetContainer=D.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},pe.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},pe.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=D.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Ze(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},pe.prototype.zoomToCrop=function(){if(this.cropRect){var ne=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,ie=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=ne+"px "+ie+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-ne+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-ie+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},pe.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},pe.prototype.cropRectChanged=function(ne){this.cropRect=ne,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},pe.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},pe.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},pe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},pe.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var ne=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,ie=this.target.offsetTop>ne+this.CANVAS_MARGIN?this.target.offsetTop-(ne+this.CANVAS_MARGIN):0;this.coverDiv.style.top=ie+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},pe.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},pe.prototype.addTopToolbar=function(){var ne=this;this.topToolbar=new G,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var ie=new j;ie.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(ie);var de=[];this.aspectRatios.forEach(function(dt){var wt=new J(we.getIcon(dt.horizontal,dt.vertical),dt.horizontal===0&&dt.vertical===0?"FREE":dt.horizontal+":"+dt.vertical);wt.onClick=function(){return ne.ratioButtonClicked(dt)},de.push(wt)}),this.aspectRatioButton=new Te(we.getIcon(0,0),"Aspect ratio",de),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,ie.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var ge=new J('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");ge.isActive=this.isGridVisible,ge.onClick=function(){ne.isGridVisible=!ne.isGridVisible,ge.isActive=ne.isGridVisible},ie.addButton(ge);var se=new J('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(se.isActive=this.zoomToCropEnabled,se.onClick=function(){ne.zoomToCropEnabled=!ne.zoomToCropEnabled,se.isActive=ne.zoomToCropEnabled},ie.addButton(se),!$.isLicensed){var Ae=new Y;this.topToolbar.addElementBlock(Ae);var Ee=document.createElement("div");Ee.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var xe=document.createElement("a");xe.style.color="currentColor",xe.href="https://markerjs.com/products/cropro",xe.target="_blank",xe.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',Ee.appendChild(xe),Ae.addElement(Ee)}var ke=new j;ke.minWidth=3*this.toolbarHeight+"px",ke.contentAlign="end",this.topToolbar.addButtonBlock(ke);var Qe=new J('<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"OK");Qe.onClick=this.startRenderAndClose,ke.addButton(Qe),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Qe.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var nt=new J('<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"Close");nt.onClick=this.close,ke.addButton(nt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(nt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},pe.prototype.addBottomToolbar=function(){var ne=this;this.bottomToolbar=new G,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var ie=new j;ie.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(ie);var de=new J('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");de.onClick=this.rotateLeftButtonClicked,ie.addButton(de);var ge=new J('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");ge.onClick=this.rotateRightButtonClicked,ie.addButton(ge);var se=new Y;se.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(se),this.straightener=new et("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(ke){ne.rotateBy(ke),ne.straightener.angle=ne.rotationAngle},se.addElement(this.straightener.getUI());var Ae=new j;Ae.minWidth=2*this.toolbarHeight+"px",Ae.contentAlign="end",this.bottomToolbar.addButtonBlock(Ae);var Ee=new J('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");Ee.onClick=this.flipHorizontallyButtonClicked,Ae.addButton(Ee);var xe=new J('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");xe.onClick=this.flipVerticallyButtonClicked,Ae.addButton(xe)},pe.prototype.ratioButtonClicked=function(ne){this.aspectRatio=ne,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},pe.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=we.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},pe.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new he(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},pe.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},pe.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},pe.prototype.restoreState=function(ne){if(ne){var ie=this.cropLayer.getRescaledRect(ne.width,ne.height,this.imageWidth,this.imageHeight,ne.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(ie),this.cropRectChanged(ie),this.flippedHorizontally=ne.flippedHorizontally,this.flippedVertically=ne.flippedVertically,this.applyFlip(),this.rotationAngle=ne.rotationAngle,this.applyRotation()}},pe.prototype.clientToLocalCoordinates=function(ne,ie){var de=this.cropImage.getBoundingClientRect();return{x:ne-de.left,y:ie-de.top}},pe.prototype.onWindowResize=function(){this.positionUI()},pe.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var ne=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=ne+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},pe.prototype.rotateLeftButtonClicked=function(){var ne=this.rotationAngle-90;this.rotationAngle%90!=0&&(ne+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(ne)},pe.prototype.rotateRightButtonClicked=function(){var ne=this.rotationAngle+90;this.rotationAngle%90!=0&&(ne-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(ne)},pe.prototype.rotateTo=function(ne){ne=(ne=ne>180?ne-360:ne)<=-180?ne+360:ne,this.rotationAngle=ne,this.applyRotation()},pe.prototype.rotateBy=function(ne){this.rotateTo((this.rotationAngle+ne)%360)},pe.prototype.applyRotation=function(){var ne=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var ie=this.editingTargetRotationContainer.transform.baseVal.getItem(0);ie.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(ie,0);var de=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/de.width,this.imageHeight/de.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=ne},pe.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},pe.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},pe.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},pe.prototype.startRenderAndClose=function(){return Je(this,void 0,void 0,function(){var ne,ie;return Se(this,function(de){switch(de.label){case 0:return[4,this.render()];case 1:return ne=de.sent(),ie=this.getState(),this.renderEventListeners.forEach(function(ge){return ge(ne,ie)}),this.close(!0),[2]}})})},pe.prototype.render=function(){return Je(this,void 0,void 0,function(){var ne;return Se(this,function(ie){switch(ie.label){case 0:return(ne=new rt).naturalSize=this.renderAtNaturalSize,ne.imageType=this.renderImageType,ne.imageQuality=this.renderImageQuality,ne.width=this.renderWidth,ne.height=this.renderHeight,this.unzoomFromCrop(),D.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,ne.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return ie.sent(),[4,ne.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,ie.sent()]}})})},pe.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new oe("toolbar",`
|
|
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
overflow: hidden;
|
|
line-height: 0px;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new oe("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new oe("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var ne=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new oe("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*ne)+`px;
|
|
height: `+(this.toolbarHeight-2*ne)+`px;
|
|
padding: `+ne+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new oe("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new oe("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new te("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new te("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new oe("toolbar_dropdown",`
|
|
position: absolute;
|
|
max-width: `+4*this.toolbarHeight+`px;
|
|
z-index: 20;
|
|
white-space: normal;
|
|
box-sizing: content-box;
|
|
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
|
|
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
|
|
line-height: 0px;
|
|
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new oe("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new oe("toolbar_straightener_block",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
|
|
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new oe("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*ne)+`px;
|
|
padding: `+ne+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new oe("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},pe.instanceCounter=0,pe}(),pt=K("8hTe"),Pe=K.n(pt),Ye=/<pre[^>]*>/g;function tt(pe){var ne=document.createElement("div");return ne.innerHTML=pe,ne.childNodes.length===0?"":ne.childNodes[0].nodeValue}var ot=Oe.a=function(pe){var ne=pe.value,ie=ne===void 0?"":ne,de=pe.edit,ge=de===void 0?!1:de,se=pe.className,Ae=pe.showTextOnly,Ee=pe.showLines,xe=pe.replaces,ke=pe.zoomImg,Qe=pe.hasMask,nt=pe.style,dt=nt===void 0?{}:nt,wt=pe.stylesPrev,gt=wt===void 0?{}:wt,$t=String(ie),xt=Object(I.useRef)(),ut=Object(I.useRef)(),Ot=Object(I.useState)(""),jt=Object(q.a)(Ot,2),Tt=jt[0],Yt=jt[1],Qt=Object(I.useState)("office"),Xt=Object(q.a)(Qt,2),or=Xt[0],It=Xt[1],br=function(){var Jt=new At(ut.current);Jt.displayMode="popup",Jt.addRenderEventListener(function(){var nr=Object(O.a)(e.a.mark(function Wt(Sr){var Zt;return e.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:return xt.current.style.display="none",sr.next=3,Object(Me.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Sr}});case 3:Zt=sr.sent,Zt!=null&&Zt.id&&xe(ut.current.getAttribute("src").replace(le.a.API_SERVER,""),"/api/attachments/".concat(Zt==null?void 0:Zt.id,"?type=").concat(Zt.content_type));case 5:case"end":return sr.stop()}},Wt)}));return function(Wt){return nr.apply(this,arguments)}}()),Jt.show()},Mt=function(){var Jt=new Le.a(ut.current);Jt.settings.displayMode="popup",Jt.addEventListener("render",function(){var nr=Object(O.a)(e.a.mark(function Wt(Sr){var Zt;return e.a.wrap(function(sr){for(;;)switch(sr.prev=sr.next){case 0:if(xt.current.style.display="none",!ut.current){sr.next=6;break}return sr.next=4,Object(Me.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Sr.dataUrl}});case 4:Zt=sr.sent,Zt!=null&&Zt.id&&xe(ut.current.getAttribute("src").replace(le.a.API_SERVER,""),"/api/attachments/".concat(Zt==null?void 0:Zt.id,"?type=").concat(Zt.content_type));case 6:case"end":return sr.stop()}},Wt)}));return function(Wt){return nr.apply(this,arguments)}}()),Jt.show(),window.markerArea=Jt},Pt=Object(I.useMemo)(function(){xt.current&&(xt.current.style.zIndex=-1);try{var cr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Jt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,nr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;$t=$t.replace(cr,"("+le.a.API_SERVER+"/api/attachments/").replace(Jt,'"'+le.a.API_SERVER+"/api/attachments/").replace(nr,'"'+le.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`)}catch(zr){}var Wt=Q($t),Sr=_();if($t.match(/\[TOC\]/)&&(Wt=Wt.replace("<p>[TOC]</p>",T()),y()),Wt=Wt.replace(/(__special_katext_id_\d+__)/g,function(zr,sr){var me=Sr[sr],ve=me.type,Ie=me.expression;return Object(Be.renderToString)(tt(Ie)||"",{displayMode:ve==="block",throwOnError:!1,output:"html"})}),Wt=Wt.replace(/▁/g,"\u2581\u2581\u2581"),g(),Ae){var Zt=document.createElement("div");return Zt.innerHTML=Wt,Zt.innerText}return setTimeout(function(){return jr()},500),Wt},[$t]),kt=Object(I.useRef)();b.WebkitLineClamp=Ee,Ee&&(dt=Object(U.a)(Object(U.a)({},dt),b));function pr(cr){var Jt=cr.target;if(Jt.tagName.toUpperCase()==="IMG"){if(ke){var nr=Jt.getAttribute("src");Yt(nr),It("image")}}else if(Jt.tagName.toUpperCase()==="A"){var Wt=Jt.getAttribute("href");if(Wt.indexOf("office")>-1)cr.preventDefault(),Yt(Wt),It("office");else if(Wt.indexOf("application/pdf")>-1)cr.preventDefault(),Yt(Wt),It("pdf");else if(Wt.indexOf("text/html")>-1)cr.preventDefault(),Yt(Wt),It("html");else if(Wt.startsWith("#")){cr.preventDefault();var Sr=document.getElementById(Wt.replace("#",""));Sr&&Sr.scrollIntoView(!0)}}}var jr=function(){var Jt,nr=(Jt=kt.current)===null||Jt===void 0?void 0:Jt.querySelectorAll("video");nr==null||nr.forEach(function(Wt){if(Wt.oncontextmenu=function(){return!1},Wt.src.indexOf(".m3u8")>-1&&!Wt.canPlayType("application/vnd.apple.mpegurl")){if(ee.a.isSupported()){var Sr=new ee.a;Sr.loadSource(Wt.src),Sr.attachMedia(Wt)}}})};Object(I.useEffect)(function(){if(kt.current&&Pt&&(Pt.match(Ye)&&window.PR.prettyPrint()),kt.current)return kt.current.addEventListener("click",pr),function(){kt.current.removeEventListener("click",pr),g(),y()}},[Pt,kt.current,pr]);var ln=function(Jt){if(!ge)return;Jt.target.nodeName==="IMG"?(xt.current.style.zIndex=1,xt.current.style.display="flex",xt.current.style.width=Jt.target.clientWidth+"px",xt.current.style.height=Jt.target.clientHeight+"px",xt.current.style.top=Jt.target.offsetTop+"px",xt.current.style.left=Jt.target.offsetLeft+"px",ut.current.src=Jt.target.getAttribute("src")):xt.current.style.display="none"};return d.a.createElement("div",{style:{position:"relative"}},d.a.createElement("div",{ref:kt,style:Object(U.a)({},dt),className:"".concat(se||""," markdown-body ").concat(Pe.a.mdBody),onMouseOver:ln,dangerouslySetInnerHTML:{__html:Pt}}),d.a.createElement("div",{ref:xt,className:Pe.a.button},d.a.createElement(W.a,null,d.a.createElement(V.a,{onClick:function(){return br()}},"\u88C1\u526A"),d.a.createElement(V.a,{onClick:function(){return Mt()}},"\u7F16\u8F91"))),d.a.createElement("img",{ref:ut,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),d.a.createElement(Ce.a,{close:!0,data:Tt,type:Tt!=null&&Tt.length?or:"",style:Object(U.a)({},gt),onClose:function(){return Yt("")}}))}},"9ZNV":function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return I});var fe=K("0Owb"),W=K("+L6B"),L=K("2/Rp"),V=K("q1tI"),U=K.n(V),O=K("UUDw"),q=K.n(O),k=K("TSYQ"),e=K.n(k),I=function(p){var A=p.cancelText,s=A===void 0?"\u53D6\u6D88":A,i=p.okText,o=i===void 0?"\u786E\u5B9A":i,n=p.loading,a=n===void 0?!1:n,r=p.hasOkBtn,t=r===void 0?!0:r,y=p.okButtonProps,b=y===void 0?{}:y,E=p.onCancel,T=E===void 0?function(){}:E,C=p.onOk,h=C===void 0?function(){}:C,c=p.className,l=c===void 0?"":c;return U.a.createElement("div",{className:e()(q.a.buttonFixed,l)},U.a.createElement("div",{className:q.a.buttonWrap},U.a.createElement(L.a,{size:"large",className:"".concat(q.a.button," mr20"),onClick:T},s),t&&U.a.createElement(L.a,Object(fe.a)({size:"large",type:"primary",className:"".concat(q.a.button," mr20"),loading:a,onClick:h},b),o)))}},"9z17":function(ft,Oe,K){"use strict";K.d(Oe,"b",function(){return E});var fe=K("g9YV"),W=K("wCAj"),L=K("5NDa"),V=K("5rEg"),U=K("y8nQ"),O=K("Vl3Y"),q=K("2qtc"),k=K("kLXV"),e=K("7Kak"),I=K("9yH6"),d=K("9og8"),p=K("tJVT"),A=K("WmNS"),s=K.n(A),i=K("q1tI"),o=K.n(i),n=K("ie49"),a=K.n(n),r=K("HBuW"),t=function(c){var l=c.total,u=c.used,_=c.copy,g=c.canNotCopy,m=c.inPaper,F="";return _>0&&g>0?F="\u5176\u4E2D\u6709".concat(_,"\u4E2A\u5B9E\u8BAD\u53EF\u4EE5\u590D\u5236\uFF0C\u6709").concat(g,"\u4E2A\u5B9E\u8BAD\u672A\u5F00\u653E\u590D\u5236"):_>0&&g===0?F="\u5176\u4E2D\u6709".concat(_,"\u4E2A\u5B9E\u8BAD\u53EF\u4EE5\u590D\u5236"):_===0&&g>0&&(F="\u5176\u4E2D\u6709".concat(g,"\u4E2A\u5B9E\u8BAD\u672A\u5F00\u653E\u590D\u5236")),"\u5F53\u524D\u9009\u4E2D".concat(l,"\u4E2A\u5B9E\u8BAD\u4E2D\uFF0C\u6709").concat(u,"\u4E2A\u5B9E\u8BAD\u5DF2\u5728\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C").concat(F).concat(m?"\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4F7F\u7528\u8BD5\u5377\uFF1F":"")},y=function(c){return c?{reproducible:"\u8BD5\u5377\u4E2D\u4E0B\u5217\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u8BF7\u9009\u62E9\u662F\u5426\u590D\u5236\u4E3A\u65B0\u7684\u5B9E\u8BAD\u53D1\u9001\u5230\u8BFE\u5802\uFF1F",irreproducible:"\u8BD5\u5377\u4E2D\u4E0B\u5217\u91CD\u590D\u4F7F\u7528\u7684\u5B9E\u8BAD\u672A\u5F00\u542F\u590D\u5236\u6743\u9650\uFF0C\u82E5\u7EE7\u7EED\u4F7F\u7528\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD"}:{reproducible:"\u5F53\u524D\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u8BF7\u9009\u62E9\u662F\u5426\u7EE7\u7EED\u4F7F\u7528\u548C\u662F\u5426\u590D\u5236\u4E3A\u65B0\u7684\u5B9E\u8BAD\u53D1\u9001\u5230\u8BFE\u5802\uFF1F",irreproducible:"\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u7EE7\u7EED\u4F7F\u7528\uFF1F"}},b=function(c){var l=c.onCancel,u=c.onOk,_=c.visible,g=c.inPaper,m=c.renderData,F=c.type,H=Object(i.useState)(1),B=Object(p.a)(H,2),Q=B[0],z=B[1],N=Object(i.useState)(!1),ee=Object(p.a)(N,2),le=ee[0],Be=ee[1],Ce=Object(i.useMemo)(function(){return(m==null?void 0:m.total_num)===1&&(m==null?void 0:m.can_copy_num)===1},[m]);return o.a.createElement(o.a.Fragment,null,Ce?o.a.createElement(k.a,{centered:!0,closable:!0,visible:_,title:"\u63D0\u793A",width:600,confirmLoading:le,onCancel:l,onOk:Object(d.a)(s.a.mark(function Me(){return s.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return Be(!0),je.next=3,u(Q);case 3:Be(!1);case 4:case"end":return je.stop()}},Me)}))},o.a.createElement("div",{className:a.a.content,style:{marginBottom:20}},"\u5F53\u524D\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u8BF7\u95EE\u662F\u5426\u590D\u5236\u6210\u65B0\u5B9E\u8BAD\u53D1\u9001\u81F3\u6559\u5B66\u8BFE\u5802\u4E2D\uFF1F"),o.a.createElement(I.a.Group,{value:Q,onChange:function(Le){return z(Le.target.value)},className:a.a.content,style:{marginBottom:30}},o.a.createElement(I.a,{value:1,style:{color:"#464f66"}},"\u590D\u5236\u5B9E\u8BAD"),o.a.createElement(I.a,{value:0,style:{color:"#464f66"}},"\u4E0D\u590D\u5236\u5B9E\u8BAD")),o.a.createElement("div",{className:a.a.content,style:{marginBottom:10}},"\u8BF4\u660E\uFF1A"),o.a.createElement("div",{className:a.a.content},"\u590D\u5236\u5B9E\u8BAD\uFF1A\u590D\u5236\u4E00\u4EFD\u65B0\u7684\u5B9E\u8BAD\u8FDB\u5165\u8BFE\u5802\uFF0C\u539F\u5B9E\u8BAD\u7684\u8C03\u6574\u4E0D\u4F1A\u5F71\u54CD\u5230\u590D\u5236\u7684\u5B9E\u8BAD\u4E2D\u3002"),o.a.createElement("div",{className:a.a.content},"\u4E0D\u590D\u5236\u5B9E\u8BAD\uFF1A\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\u3002")):o.a.createElement(k.a,{centered:!0,closable:!0,visible:_,title:"\u63D0\u793A",width:600,onCancel:l,onOk:Object(d.a)(s.a.mark(function Me(){return s.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return Be(!0),je.next=3,u(0);case 3:Be(!1);case 4:case"end":return je.stop()}},Me)}))},o.a.createElement("div",{className:a.a.content},"\u5F53\u524D\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u7EE7\u7EED\u4F7F\u7528\uFF1F")))},E=function(){var c=Object(i.useState)(!1),l=Object(p.a)(c,2),u=l[0],_=l[1],g=Object(i.useState)(),m=Object(p.a)(g,2),F=m[0],H=m[1],B=function(){return _(!1)},Q=function(){var z=Object(d.a)(s.a.mark(function N(ee){var le;return s.a.wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,Object(r.p)(ee);case 2:if(le=Ce.sent,!("status"in le)){Ce.next=5;break}return Ce.abrupt("return",!1);case 5:if(!(le.repeat_shixun_num===0)){Ce.next=7;break}return Ce.abrupt("return",!1);case 7:return H(le),_(!0),Ce.abrupt("return",!0);case 10:case"end":return Ce.stop()}},N)}));return function(ee){return z.apply(this,arguments)}}();return[u,B,F,Q]},T=function(c){var l=O.a.useForm(),u=Object(p.a)(l,1),_=u[0],g=Object(i.useState)(!1),m=Object(p.a)(g,2),F=m[0],H=m[1],B=c.onCancel,Q=c.onOk,z=c.visible,N=c.inPaper,ee=N===void 0?!1:N,le=c.renderData,Be=c.type,Ce=Object(i.useMemo)(function(){return ee?[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,align:"center",className:a.a.tableCell},{title:"\u662F\u5426\u590D\u5236",dataIndex:"is_copy",align:"center",render:function(Je,Se){return o.a.createElement(o.a.Fragment,null,o.a.createElement(O.a.Item,{name:["".concat(Be==="subject"?Se.stage_shixun_id:Se.id),"is_copy"],initialValue:1},o.a.createElement(I.a.Group,null,o.a.createElement(I.a,{value:1},"\u662F"),o.a.createElement(I.a,{value:0},"\u5426"))),o.a.createElement(O.a.Item,{name:["".concat(Be==="subject"?Se==null?void 0:Se.stage_shixun_id:Se.id),"is_use"],hidden:!0,initialValue:1},o.a.createElement(V.a,{type:"hidden"})))}}]:[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,align:"center",className:a.a.tableCell},{title:"\u662F\u5426\u4F7F\u7528",dataIndex:"is_use",align:"center",render:function(Je,Se){return o.a.createElement(O.a.Item,{name:["".concat(Be==="subject"?Se.stage_shixun_id:Se.id),"is_use"],initialValue:1},o.a.createElement(I.a.Group,null,o.a.createElement(I.a,{value:1},"\u662F"),o.a.createElement(I.a,{value:0},"\u5426")))}},{title:"\u662F\u5426\u590D\u5236",dataIndex:"is_copy",align:"center",render:function(Je,Se){return o.a.createElement(O.a.Item,{name:["".concat(Be==="subject"?Se.stage_shixun_id:Se.id),"is_copy"],initialValue:1},o.a.createElement(I.a.Group,null,o.a.createElement(I.a,{value:1},"\u662F"),o.a.createElement(I.a,{value:0},"\u5426")))}}]},[ee]),Me=Object(i.useMemo)(function(){return ee?[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,className:a.a.tableCell,align:"center",render:function(Je,Se){return o.a.createElement(o.a.Fragment,null,o.a.createElement("span",null,Je),o.a.createElement(O.a.Item,{name:["".concat(Be==="subject"?Se==null?void 0:Se.stage_shixun_id:Se.id),"is_copy"],hidden:!0,initialValue:0},o.a.createElement(V.a,{type:"hidden"})),o.a.createElement(O.a.Item,{name:["".concat(Be==="subject"?Se==null?void 0:Se.stage_shixun_id:Se.id),"is_use"],hidden:!0,initialValue:1},o.a.createElement(V.a,{type:"hidden"})))}}]:[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,className:a.a.tableCell,align:"center"},{title:"\u662F\u5426\u4F7F\u7528",dataIndex:"is_use",align:"center",render:function(Je,Se){return o.a.createElement(o.a.Fragment,null,o.a.createElement(O.a.Item,{name:["".concat(Be==="subject"?Se==null?void 0:Se.stage_shixun_id:Se.id),"is_use"],initialValue:0},o.a.createElement(I.a.Group,null,o.a.createElement(I.a,{value:1},"\u662F"),o.a.createElement(I.a,{value:0},"\u5426"))),o.a.createElement(O.a.Item,{name:["".concat(Be==="subject"?Se==null?void 0:Se.stage_shixun_id:Se.id),"is_copy"],hidden:!0,initialValue:0},o.a.createElement(V.a,{type:"hidden"})))}}]},[ee]),Le=Object(i.useMemo)(function(){return t({total:le==null?void 0:le.total_num,used:le==null?void 0:le.repeat_shixun_num,copy:le==null?void 0:le.can_copy_num,canNotCopy:le==null?void 0:le.no_copy_num,inPaper:ee})},[le,ee]),je=Object(i.useMemo)(function(){return y(ee)},[ee]);return o.a.createElement(k.a,{title:"\u5B9E\u8BAD\u91CD\u590D\u4F7F\u7528\u63D0\u793A",centered:!0,visible:z,confirmLoading:F,onOk:Object(d.a)(s.a.mark(function He(){var Je,Se;return s.a.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return H(!0),Je=_.getFieldsValue(),Se=Object.keys(Je).map(function(M){return{id:parseInt(M),is_use:Je[M].is_use,is_copy:Je[M].is_copy}}),D.next=5,Q(Se);case 5:H(!1);case 6:case"end":return D.stop()}},He)})),onCancel:B,width:800,okText:"\u786E\u8BA4",className:a.a.antdModal,destroyOnClose:!0},o.a.createElement(O.a,{form:_,preserve:!1},o.a.createElement("div",{className:a.a.brief},Le),(le==null?void 0:le.can_copy_num)>0&&o.a.createElement("div",null,o.a.createElement("div",{className:a.a.contentTitle},"\u53EF\u590D\u5236\u5B9E\u8BAD"),o.a.createElement("div",{className:a.a.content},je.reproducible),o.a.createElement("div",{className:a.a.tips},o.a.createElement("div",null,"\u590D\u5236\u5B9E\u8BAD\uFF1A\u590D\u5236\u4E00\u4EFD\u65B0\u7684\u5B9E\u8BAD\u8FDB\u5165\u8BFE\u5802\uFF0C\u539F\u5B9E\u8BAD\u7684\u8C03\u6574\u4E0D\u4F1A\u5F71\u54CD\u5230\u590D\u5236\u7684\u5B9E\u8BAD\u4E2D\u3002"),o.a.createElement("div",null,"\u4E0D\u590D\u5236\u5B9E\u8BAD\uFF1A\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\u3002")),o.a.createElement(W.a,{columns:Ce,className:a.a.antdTable,dataSource:le==null?void 0:le.can_copy_list,rowKey:Be==="subject"?"stage_shixun_id":"id",pagination:!1,scroll:{y:240},bordered:!0})),(le==null?void 0:le.no_copy_num)>0&&o.a.createElement("div",null,o.a.createElement("div",{className:a.a.contentTitle},"\u4E0D\u53EF\u590D\u5236\u5B9E\u8BAD"),o.a.createElement("div",{className:a.a.content},je.irreproducible),o.a.createElement(W.a,{columns:Me,className:a.a.antdTable,dataSource:le==null?void 0:le.no_copy_list,rowKey:Be==="subject"?"stage_shixun_id":"id",pagination:!1,scroll:{y:200},bordered:!0})),(le==null?void 0:le.no_use_list.length)>0&&(le==null?void 0:le.no_use_list.map(function(He){return o.a.createElement("div",{key:Be==="subject"?He.stage_shixun_id:He.id},o.a.createElement(O.a.Item,{name:["".concat(Be==="subject"?He==null?void 0:He.stage_shixun_id:He.id),"is_copy"],hidden:!0,initialValue:0},o.a.createElement(V.a,{type:"hidden"})),o.a.createElement(O.a.Item,{name:["".concat(Be==="subject"?He==null?void 0:He.stage_shixun_id:He.id),"is_use"],hidden:!0,initialValue:1},o.a.createElement(V.a,{type:"hidden"})))}))))},C=function(c){var l=c.modalType;return l==="multiple"?o.a.createElement(T,c):o.a.createElement(b,c)};Oe.a=C},BU3w:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return O});var fe=K("MNnm"),W="rc-util-key";function L(q){if(q.attachTo)return q.attachTo;var k=document.querySelector("head");return k||document.body}function V(q){var k,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(fe.a)())return null;var I=document.createElement("style");if((k=e.csp)===null||k===void 0?void 0:k.nonce){var d;I.nonce=(d=e.csp)===null||d===void 0?void 0:d.nonce}I.innerHTML=q;var p=L(e),A=p.firstChild;return e.prepend&&p.prepend?p.prepend(I):e.prepend&&A?p.insertBefore(I,A):p.appendChild(I),I}var U=new Map;function O(q,k){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},I=L(e);if(!U.has(I)){var d=V("",e),p=d.parentNode;U.set(I,p),p.removeChild(d)}var A=Array.from(U.get(I).children).find(function(a){return a.tagName==="STYLE"&&a[W]===k});if(A){var s,i;if(((s=e.csp)===null||s===void 0?void 0:s.nonce)&&A.nonce!==((i=e.csp)===null||i===void 0?void 0:i.nonce)){var o;A.nonce=(o=e.csp)===null||o===void 0?void 0:o.nonce}return A.innerHTML!==q&&(A.innerHTML=q),A}var n=V(q,e);return n[W]=k,n}},"C/vA":function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return fe});function fe(W){const L=this;let V=!1,U;return function(){return V||(V=!0,U=W.apply(L,arguments)),U}}},"Cg/j":function(ft,Oe,K){"use strict";K.d(Oe,"b",function(){return fe}),K.d(Oe,"a",function(){return W}),K.d(Oe,"c",function(){return V}),K.d(Oe,"d",function(){return U});var fe;(function(O){O.serviceIds=new Map,O.DI_TARGET="$di$target",O.DI_DEPENDENCIES="$di$dependencies";function q(k){return k[O.DI_DEPENDENCIES]||[]}O.getServiceDependencies=q})(fe||(fe={}));const W=V("instantiationService");function L(O,q,k,e){q[fe.DI_TARGET]===q?q[fe.DI_DEPENDENCIES].push({id:O,index:k,optional:e}):(q[fe.DI_DEPENDENCIES]=[{id:O,index:k,optional:e}],q[fe.DI_TARGET]=q)}function V(O){if(fe.serviceIds.has(O))return fe.serviceIds.get(O);const q=function(k,e,I){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");L(q,k,I,!1)};return q.toString=()=>O,fe.serviceIds.set(O,q),q}function U(O){return function(q,k,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");L(O,q,e,!0)}}},D3Jc:function(ft,Oe,K){ft.exports={bg:"bg___2N4xV",wrap:"wrap___197Yw",title:"title___SRViJ",btnWrapper:"btnWrapper___1Clah",titleForExport:"titleForExport___1w_Fv",flexRow:"flexRow___2VcOb",flexColumn:"flexColumn___3sATC",flexJustifyBetween:"flexJustifyBetween___28Fc2",relative:"relative___1Z6Yd",questionNumber:"questionNumber___3JZ7u",score:"score___JiHU1",selectTopicButton:"selectTopicButton___2FHxM",line:"line___2fHJL",dragTip:"dragTip___3K-IA",typeActive:"typeActive___3Sew8",mouseTypeActive:"mouseTypeActive___2R64u",typeName:"typeName___1laV6",typeNumber:"typeNumber___slW4Y",typeAction:"typeAction___HFUjV",setScore:"setScore___3TxSu",delete:"delete___gIO9w",modal:"modal___2NK84"}},DlQD:function(ft,Oe,K){(function(fe,W){ft.exports=W()})(this,function(){"use strict";function fe(ie,de){for(var ge=0;ge<de.length;ge++){var se=de[ge];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(ie,se.key,se)}}function W(ie,de,ge){return de&&fe(ie.prototype,de),ge&&fe(ie,ge),ie}function L(ie,de){if(!ie)return;if(typeof ie=="string")return V(ie,de);var ge=Object.prototype.toString.call(ie).slice(8,-1);if(ge==="Object"&&ie.constructor&&(ge=ie.constructor.name),ge==="Map"||ge==="Set")return Array.from(ie);if(ge==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ge))return V(ie,de)}function V(ie,de){(de==null||de>ie.length)&&(de=ie.length);for(var ge=0,se=new Array(de);ge<de;ge++)se[ge]=ie[ge];return se}function U(ie,de){var ge;if(typeof Symbol=="undefined"||ie[Symbol.iterator]==null){if(Array.isArray(ie)||(ge=L(ie))||de&&ie&&typeof ie.length=="number"){ge&&(ie=ge);var se=0;return function(){return se>=ie.length?{done:!0}:{done:!1,value:ie[se++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return ge=ie[Symbol.iterator](),ge.next.bind(ge)}function O(ie,de){return de={exports:{}},ie(de,de.exports),de.exports}var q=O(function(ie){function de(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function ge(se){ie.exports.defaults=se}ie.exports={defaults:de(),getDefaults:de,changeDefaults:ge}}),k=q.defaults,e=q.getDefaults,I=q.changeDefaults,d=/[&<>"']/,p=/[&<>"']/g,A=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},o=function(de){return i[de]};function n(ie,de){if(de){if(d.test(ie))return ie.replace(p,o)}else if(A.test(ie))return ie.replace(s,o);return ie}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function r(ie){return ie.replace(a,function(de,ge){return ge=ge.toLowerCase(),ge==="colon"?":":ge.charAt(0)==="#"?ge.charAt(1)==="x"?String.fromCharCode(parseInt(ge.substring(2),16)):String.fromCharCode(+ge.substring(1)):""})}var t=/(^|[^\[])\^/g;function y(ie,de){ie=ie.source||ie,de=de||"";var ge={replace:function(Ae,Ee){return Ee=Ee.source||Ee,Ee=Ee.replace(t,"$1"),ie=ie.replace(Ae,Ee),ge},getRegex:function(){return new RegExp(ie,de)}};return ge}var b=/[^\w:]/g,E=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function T(ie,de,ge){if(ie){var se;try{se=decodeURIComponent(r(ge)).replace(b,"").toLowerCase()}catch(Ae){return null}if(se.indexOf("javascript:")===0||se.indexOf("vbscript:")===0||se.indexOf("data:")===0)return null}de&&!E.test(ge)&&(ge=u(de,ge));try{ge=encodeURI(ge).replace(/%25/g,"%")}catch(Ae){return null}return ge}var C={},h=/^[^:]+:\/*[^/]*$/,c=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function u(ie,de){C[" "+ie]||(h.test(ie)?C[" "+ie]=ie+"/":C[" "+ie]=F(ie,"/",!0)),ie=C[" "+ie];var ge=ie.indexOf(":")===-1;return de.substring(0,2)==="//"?ge?de:ie.replace(c,"$1")+de:de.charAt(0)==="/"?ge?de:ie.replace(l,"$1")+de:ie+de}var _={exec:function(){}};function g(ie){for(var de=1,ge,se;de<arguments.length;de++){ge=arguments[de];for(se in ge)Object.prototype.hasOwnProperty.call(ge,se)&&(ie[se]=ge[se])}return ie}function m(ie,de){var ge=ie.replace(/\|/g,function(Ee,xe,ke){for(var Qe=!1,nt=xe;--nt>=0&&ke[nt]==="\\";)Qe=!Qe;return Qe?"|":" |"}),se=ge.split(/ \|/),Ae=0;if(se.length>de)se.splice(de);else for(;se.length<de;)se.push("");for(;Ae<se.length;Ae++)se[Ae]=se[Ae].trim().replace(/\\\|/g,"|");return se}function F(ie,de,ge){var se=ie.length;if(se===0)return"";for(var Ae=0;Ae<se;){var Ee=ie.charAt(se-Ae-1);if(Ee===de&&!ge)Ae++;else if(Ee!==de&&ge)Ae++;else break}return ie.substr(0,se-Ae)}function H(ie,de){if(ie.indexOf(de[1])===-1)return-1;for(var ge=ie.length,se=0,Ae=0;Ae<ge;Ae++)if(ie[Ae]==="\\")Ae++;else if(ie[Ae]===de[0])se++;else if(ie[Ae]===de[1]&&(se--,se<0))return Ae;return-1}function B(ie){ie&&ie.sanitize&&!ie.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var Q={escape:n,unescape:r,edit:y,cleanUrl:T,resolveUrl:u,noopTest:_,merge:g,splitCells:m,rtrim:F,findClosingBracket:H,checkSanitizeDeprecation:B},z=q.defaults,N=Q.rtrim,ee=Q.splitCells,le=Q.escape,Be=Q.findClosingBracket;function Ce(ie,de,ge){var se=de.href,Ae=de.title?le(de.title):null,Ee=ie[1].replace(/\\([\[\]])/g,"$1");return ie[0].charAt(0)!=="!"?{type:"link",raw:ge,href:se,title:Ae,text:Ee}:{type:"image",raw:ge,href:se,title:Ae,text:le(Ee)}}function Me(ie,de){var ge=ie.match(/^(\s+)(?:```)/);if(ge===null)return de;var se=ge[1];return de.split(`
|
|
`).map(function(Ae){var Ee=Ae.match(/^\s+/);if(Ee===null)return Ae;var xe=Ee[0];return xe.length>=se.length?Ae.slice(se.length):Ae}).join(`
|
|
`)}var Le=function(){function ie(ge){this.options=ge||z}var de=ie.prototype;return de.space=function(se){var Ae=this.rules.block.newline.exec(se);if(Ae)return Ae[0].length>1?{type:"space",raw:Ae[0]}:{raw:`
|
|
`}},de.code=function(se,Ae){var Ee=this.rules.block.code.exec(se);if(Ee){var xe=Ae[Ae.length-1];if(xe&&xe.type==="paragraph")return{raw:Ee[0],text:Ee[0].trimRight()};var ke=Ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ee[0],codeBlockStyle:"indented",text:this.options.pedantic?ke:N(ke,`
|
|
`)}}},de.fences=function(se){var Ae=this.rules.block.fences.exec(se);if(Ae){var Ee=Ae[0],xe=Me(Ee,Ae[3]||"");return{type:"code",raw:Ee,lang:Ae[2]?Ae[2].trim():Ae[2],text:xe}}},de.heading=function(se){var Ae=this.rules.block.heading.exec(se);if(Ae)return{type:"heading",raw:Ae[0],depth:Ae[1].length,text:Ae[2]}},de.nptable=function(se){var Ae=this.rules.block.nptable.exec(se);if(Ae){var Ee={type:"table",header:ee(Ae[1].replace(/^ *| *\| *$/g,"")),align:Ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ae[3]?Ae[3].replace(/\n$/,"").split(`
|
|
`):[],raw:Ae[0]};if(Ee.header.length===Ee.align.length){var xe=Ee.align.length,ke;for(ke=0;ke<xe;ke++)/^ *-+: *$/.test(Ee.align[ke])?Ee.align[ke]="right":/^ *:-+: *$/.test(Ee.align[ke])?Ee.align[ke]="center":/^ *:-+ *$/.test(Ee.align[ke])?Ee.align[ke]="left":Ee.align[ke]=null;for(xe=Ee.cells.length,ke=0;ke<xe;ke++)Ee.cells[ke]=ee(Ee.cells[ke],Ee.header.length);return Ee}}},de.hr=function(se){var Ae=this.rules.block.hr.exec(se);if(Ae)return{type:"hr",raw:Ae[0]}},de.blockquote=function(se){var Ae=this.rules.block.blockquote.exec(se);if(Ae){var Ee=Ae[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ae[0],text:Ee}}},de.list=function(se){var Ae=this.rules.block.list.exec(se);if(Ae){for(var Ee=Ae[0],xe=Ae[2],ke=xe.length>1,Qe=xe[xe.length-1]===")",nt={type:"list",raw:Ee,ordered:ke,start:ke?+xe.slice(0,-1):"",loose:!1,items:[]},dt=Ae[0].match(this.rules.block.item),wt=!1,gt,$t,xt,ut,Ot,jt,Tt,Yt=dt.length,Qt=0;Qt<Yt;Qt++)gt=dt[Qt],Ee=gt,$t=gt.length,gt=gt.replace(/^ *([*+-]|\d+[.)]) */,""),~gt.indexOf(`
|
|
`)&&($t-=gt.length,gt=this.options.pedantic?gt.replace(/^ {1,4}/gm,""):gt.replace(new RegExp("^ {1,"+$t+"}","gm"),"")),Qt!==Yt-1&&(xt=this.rules.block.bullet.exec(dt[Qt+1])[0],(ke?xt.length===1||!Qe&&xt[xt.length-1]===")":xt.length>1||this.options.smartLists&&xt!==xe)&&(ut=dt.slice(Qt+1).join(`
|
|
`),nt.raw=nt.raw.substring(0,nt.raw.length-ut.length),Qt=Yt-1)),Ot=wt||/\n\n(?!\s*$)/.test(gt),Qt!==Yt-1&&(wt=gt.charAt(gt.length-1)===`
|
|
`,Ot||(Ot=wt)),Ot&&(nt.loose=!0),jt=/^\[[ xX]\] /.test(gt),Tt=void 0,jt&&(Tt=gt[1]!==" ",gt=gt.replace(/^\[[ xX]\] +/,"")),nt.items.push({type:"list_item",raw:Ee,task:jt,checked:Tt,loose:Ot,text:gt});return nt}},de.html=function(se){var Ae=this.rules.block.html.exec(se);if(Ae)return{type:this.options.sanitize?"paragraph":"html",raw:Ae[0],pre:!this.options.sanitizer&&(Ae[1]==="pre"||Ae[1]==="script"||Ae[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ae[0]):le(Ae[0]):Ae[0]}},de.def=function(se){var Ae=this.rules.block.def.exec(se);if(Ae){Ae[3]&&(Ae[3]=Ae[3].substring(1,Ae[3].length-1));var Ee=Ae[1].toLowerCase().replace(/\s+/g," ");return{tag:Ee,raw:Ae[0],href:Ae[2],title:Ae[3]}}},de.table=function(se){var Ae=this.rules.block.table.exec(se);if(Ae){var Ee={type:"table",header:ee(Ae[1].replace(/^ *| *\| *$/g,"")),align:Ae[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ae[3]?Ae[3].replace(/\n$/,"").split(`
|
|
`):[]};if(Ee.header.length===Ee.align.length){Ee.raw=Ae[0];var xe=Ee.align.length,ke;for(ke=0;ke<xe;ke++)/^ *-+: *$/.test(Ee.align[ke])?Ee.align[ke]="right":/^ *:-+: *$/.test(Ee.align[ke])?Ee.align[ke]="center":/^ *:-+ *$/.test(Ee.align[ke])?Ee.align[ke]="left":Ee.align[ke]=null;for(xe=Ee.cells.length,ke=0;ke<xe;ke++)Ee.cells[ke]=ee(Ee.cells[ke].replace(/^ *\| *| *\| *$/g,""),Ee.header.length);return Ee}}},de.lheading=function(se){var Ae=this.rules.block.lheading.exec(se);if(Ae)return{type:"heading",raw:Ae[0],depth:Ae[2].charAt(0)==="="?1:2,text:Ae[1]}},de.paragraph=function(se){var Ae=this.rules.block.paragraph.exec(se);if(Ae)return{type:"paragraph",raw:Ae[0],text:Ae[1].charAt(Ae[1].length-1)===`
|
|
`?Ae[1].slice(0,-1):Ae[1]}},de.text=function(se,Ae){var Ee=this.rules.block.text.exec(se);if(Ee){var xe=Ae[Ae.length-1];return xe&&xe.type==="text"?{raw:Ee[0],text:Ee[0]}:{type:"text",raw:Ee[0],text:Ee[0]}}},de.escape=function(se){var Ae=this.rules.inline.escape.exec(se);if(Ae)return{type:"escape",raw:Ae[0],text:le(Ae[1])}},de.tag=function(se,Ae,Ee){var xe=this.rules.inline.tag.exec(se);if(xe)return!Ae&&/^<a /i.test(xe[0])?Ae=!0:Ae&&/^<\/a>/i.test(xe[0])&&(Ae=!1),!Ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(xe[0])?Ee=!0:Ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(xe[0])&&(Ee=!1),{type:this.options.sanitize?"text":"html",raw:xe[0],inLink:Ae,inRawBlock:Ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(xe[0]):le(xe[0]):xe[0]}},de.link=function(se){var Ae=this.rules.inline.link.exec(se);if(Ae){var Ee=Be(Ae[2],"()");if(Ee>-1){var xe=Ae[0].indexOf("!")===0?5:4,ke=xe+Ae[1].length+Ee;Ae[2]=Ae[2].substring(0,Ee),Ae[0]=Ae[0].substring(0,ke).trim(),Ae[3]=""}var Qe=Ae[2],nt="";if(this.options.pedantic){var dt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Qe);dt?(Qe=dt[1],nt=dt[3]):nt=""}else nt=Ae[3]?Ae[3].slice(1,-1):"";Qe=Qe.trim().replace(/^<([\s\S]*)>$/,"$1");var wt=Ce(Ae,{href:Qe&&Qe.replace(this.rules.inline._escapes,"$1"),title:nt&&nt.replace(this.rules.inline._escapes,"$1")},Ae[0]);return wt}},de.reflink=function(se,Ae){var Ee;if((Ee=this.rules.inline.reflink.exec(se))||(Ee=this.rules.inline.nolink.exec(se))){var xe=(Ee[2]||Ee[1]).replace(/\s+/g," ");if(xe=Ae[xe.toLowerCase()],!xe||!xe.href){var ke=Ee[0].charAt(0);return{type:"text",raw:ke,text:ke}}var Qe=Ce(Ee,xe,Ee[0]);return Qe}},de.strong=function(se,Ae,Ee){Ee===void 0&&(Ee="");var xe=this.rules.inline.strong.start.exec(se);if(xe&&(!xe[1]||xe[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){Ae=Ae.slice(-1*se.length);var ke=xe[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;ke.lastIndex=0;for(var Qe;(xe=ke.exec(Ae))!=null;)if(Qe=this.rules.inline.strong.middle.exec(Ae.slice(0,xe.index+3)),Qe)return{type:"strong",raw:se.slice(0,Qe[0].length),text:se.slice(2,Qe[0].length-2)}}},de.em=function(se,Ae,Ee){Ee===void 0&&(Ee="");var xe=this.rules.inline.em.start.exec(se);if(xe&&(!xe[1]||xe[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){Ae=Ae.slice(-1*se.length);var ke=xe[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;ke.lastIndex=0;for(var Qe;(xe=ke.exec(Ae))!=null;)if(Qe=this.rules.inline.em.middle.exec(Ae.slice(0,xe.index+2)),Qe)return{type:"em",raw:se.slice(0,Qe[0].length),text:se.slice(1,Qe[0].length-1)}}},de.codespan=function(se){var Ae=this.rules.inline.code.exec(se);if(Ae){var Ee=Ae[2].replace(/\n/g," "),xe=/[^ ]/.test(Ee),ke=Ee.startsWith(" ")&&Ee.endsWith(" ");return xe&&ke&&(Ee=Ee.substring(1,Ee.length-1)),Ee=le(Ee,!0),{type:"codespan",raw:Ae[0],text:Ee}}},de.br=function(se){var Ae=this.rules.inline.br.exec(se);if(Ae)return{type:"br",raw:Ae[0]}},de.del=function(se){var Ae=this.rules.inline.del.exec(se);if(Ae)return{type:"del",raw:Ae[0],text:Ae[1]}},de.autolink=function(se,Ae){var Ee=this.rules.inline.autolink.exec(se);if(Ee){var xe,ke;return Ee[2]==="@"?(xe=le(this.options.mangle?Ae(Ee[1]):Ee[1]),ke="mailto:"+xe):(xe=le(Ee[1]),ke=xe),{type:"link",raw:Ee[0],text:xe,href:ke,tokens:[{type:"text",raw:xe,text:xe}]}}},de.url=function(se,Ae){var Ee;if(Ee=this.rules.inline.url.exec(se)){var xe,ke;if(Ee[2]==="@")xe=le(this.options.mangle?Ae(Ee[0]):Ee[0]),ke="mailto:"+xe;else{var Qe;do Qe=Ee[0],Ee[0]=this.rules.inline._backpedal.exec(Ee[0])[0];while(Qe!==Ee[0]);xe=le(Ee[0]),Ee[1]==="www."?ke="http://"+xe:ke=xe}return{type:"link",raw:Ee[0],text:xe,href:ke,tokens:[{type:"text",raw:xe,text:xe}]}}},de.inlineText=function(se,Ae,Ee){var xe=this.rules.inline.text.exec(se);if(xe){var ke;return Ae?ke=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(xe[0]):le(xe[0]):xe[0]:ke=le(this.options.smartypants?Ee(xe[0]):xe[0]),{type:"text",raw:xe[0],text:ke}}},ie}(),je=Q.noopTest,He=Q.edit,Je=Q.merge,Se={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:je,table:je,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};Se._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Se._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Se.def=He(Se.def).replace("label",Se._label).replace("title",Se._title).getRegex(),Se.bullet=/(?:[*+-]|\d{1,9}[.)])/,Se.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,Se.item=He(Se.item,"gm").replace(/bull/g,Se.bullet).getRegex(),Se.list=He(Se.list).replace(/bull/g,Se.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Se.def.source+")").getRegex(),Se._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Se._comment=/<!--(?!-?>)[\s\S]*?-->/,Se.html=He(Se.html,"i").replace("comment",Se._comment).replace("tag",Se._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Se.paragraph=He(Se._paragraph).replace("hr",Se.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Se._tag).getRegex(),Se.blockquote=He(Se.blockquote).replace("paragraph",Se.paragraph).getRegex(),Se.normal=Je({},Se),Se.gfm=Je({},Se.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Se.gfm.nptable=He(Se.gfm.nptable).replace("hr",Se.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Se._tag).getRegex(),Se.gfm.table=He(Se.gfm.table).replace("hr",Se.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Se._tag).getRegex(),Se.pedantic=Je({},Se.normal,{html:He(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Se._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:je,paragraph:He(Se.normal._paragraph).replace("hr",Se.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",Se.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var $={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:je,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:je,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};$._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",$.punctuation=He($.punctuation).replace(/punctuation/g,$._punctuation).getRegex(),$._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",$._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",$.em.start=He($.em.start).replace(/punctuation/g,$._punctuation).getRegex(),$.em.middle=He($.em.middle).replace(/punctuation/g,$._punctuation).replace(/overlapSkip/g,$._overlapSkip).getRegex(),$.em.endAst=He($.em.endAst,"g").replace(/punctuation/g,$._punctuation).getRegex(),$.em.endUnd=He($.em.endUnd,"g").replace(/punctuation/g,$._punctuation).getRegex(),$.strong.start=He($.strong.start).replace(/punctuation/g,$._punctuation).getRegex(),$.strong.middle=He($.strong.middle).replace(/punctuation/g,$._punctuation).replace(/blockSkip/g,$._blockSkip).getRegex(),$.strong.endAst=He($.strong.endAst,"g").replace(/punctuation/g,$._punctuation).getRegex(),$.strong.endUnd=He($.strong.endUnd,"g").replace(/punctuation/g,$._punctuation).getRegex(),$.blockSkip=He($._blockSkip,"g").getRegex(),$.overlapSkip=He($._overlapSkip,"g").getRegex(),$._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,$._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,$._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,$.autolink=He($.autolink).replace("scheme",$._scheme).replace("email",$._email).getRegex(),$._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,$.tag=He($.tag).replace("comment",Se._comment).replace("attribute",$._attribute).getRegex(),$._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,$._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,$.link=He($.link).replace("label",$._label).replace("href",$._href).replace("title",$._title).getRegex(),$.reflink=He($.reflink).replace("label",$._label).getRegex(),$.reflinkSearch=He($.reflinkSearch,"g").replace("reflink",$.reflink).replace("nolink",$.nolink).getRegex(),$.normal=Je({},$),$.pedantic=Je({},$.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:He(/^!?\[(label)\]\((.*?)\)/).replace("label",$._label).getRegex(),reflink:He(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$._label).getRegex()}),$.gfm=Je({},$.normal,{escape:He($.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),$.gfm.url=He($.gfm.url,"i").replace("email",$.gfm._extended_email).getRegex(),$.breaks=Je({},$.gfm,{br:He($.br).replace("{2,}","*").getRegex(),text:He($.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var D={block:Se,inline:$},M=q.defaults,te=D.block,oe=D.inline;function G(ie){return ie.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function re(ie){var de="",ge,se,Ae=ie.length;for(ge=0;ge<Ae;ge++)se=ie.charCodeAt(ge),Math.random()>.5&&(se="x"+se.toString(16)),de+="&#"+se+";";return de}var j=function(){function ie(ge){this.tokens=[],this.tokens.links=Object.create(null),this.options=ge||M,this.options.tokenizer=this.options.tokenizer||new Le,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var se={block:te.normal,inline:oe.normal};this.options.pedantic?(se.block=te.pedantic,se.inline=oe.pedantic):this.options.gfm&&(se.block=te.gfm,this.options.breaks?se.inline=oe.breaks:se.inline=oe.gfm),this.tokenizer.rules=se}ie.lex=function(se,Ae){var Ee=new ie(Ae);return Ee.lex(se)};var de=ie.prototype;return de.lex=function(se){return se=se.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(se,this.tokens,!0),this.inline(this.tokens),this.tokens},de.blockTokens=function(se,Ae,Ee){Ae===void 0&&(Ae=[]),Ee===void 0&&(Ee=!0),se=se.replace(/^ +$/gm,"");for(var xe,ke,Qe,nt;se;){if(xe=this.tokenizer.space(se)){se=se.substring(xe.raw.length),xe.type&&Ae.push(xe);continue}if(xe=this.tokenizer.code(se,Ae)){se=se.substring(xe.raw.length),xe.type?Ae.push(xe):(nt=Ae[Ae.length-1],nt.raw+=`
|
|
`+xe.raw,nt.text+=`
|
|
`+xe.text);continue}if(xe=this.tokenizer.fences(se)){se=se.substring(xe.raw.length),Ae.push(xe);continue}if(xe=this.tokenizer.heading(se)){se=se.substring(xe.raw.length),Ae.push(xe);continue}if(xe=this.tokenizer.nptable(se)){se=se.substring(xe.raw.length),Ae.push(xe);continue}if(xe=this.tokenizer.hr(se)){se=se.substring(xe.raw.length),Ae.push(xe);continue}if(xe=this.tokenizer.blockquote(se)){se=se.substring(xe.raw.length),xe.tokens=this.blockTokens(xe.text,[],Ee),Ae.push(xe);continue}if(xe=this.tokenizer.list(se)){for(se=se.substring(xe.raw.length),Qe=xe.items.length,ke=0;ke<Qe;ke++)xe.items[ke].tokens=this.blockTokens(xe.items[ke].text,[],!1);Ae.push(xe);continue}if(xe=this.tokenizer.html(se)){se=se.substring(xe.raw.length),Ae.push(xe);continue}if(Ee&&(xe=this.tokenizer.def(se))){se=se.substring(xe.raw.length),this.tokens.links[xe.tag]||(this.tokens.links[xe.tag]={href:xe.href,title:xe.title});continue}if(xe=this.tokenizer.table(se)){se=se.substring(xe.raw.length),Ae.push(xe);continue}if(xe=this.tokenizer.lheading(se)){se=se.substring(xe.raw.length),Ae.push(xe);continue}if(Ee&&(xe=this.tokenizer.paragraph(se))){se=se.substring(xe.raw.length),Ae.push(xe);continue}if(xe=this.tokenizer.text(se,Ae)){se=se.substring(xe.raw.length),xe.type?Ae.push(xe):(nt=Ae[Ae.length-1],nt.raw+=`
|
|
`+xe.raw,nt.text+=`
|
|
`+xe.text);continue}if(se){var dt="Infinite loop on byte: "+se.charCodeAt(0);if(this.options.silent){console.error(dt);break}else throw new Error(dt)}}return Ae},de.inline=function(se){var Ae,Ee,xe,ke,Qe,nt,dt=se.length;for(Ae=0;Ae<dt;Ae++){nt=se[Ae];switch(nt.type){case"paragraph":case"text":case"heading":{nt.tokens=[],this.inlineTokens(nt.text,nt.tokens);break}case"table":{for(nt.tokens={header:[],cells:[]},ke=nt.header.length,Ee=0;Ee<ke;Ee++)nt.tokens.header[Ee]=[],this.inlineTokens(nt.header[Ee],nt.tokens.header[Ee]);for(ke=nt.cells.length,Ee=0;Ee<ke;Ee++)for(Qe=nt.cells[Ee],nt.tokens.cells[Ee]=[],xe=0;xe<Qe.length;xe++)nt.tokens.cells[Ee][xe]=[],this.inlineTokens(Qe[xe],nt.tokens.cells[Ee][xe]);break}case"blockquote":{this.inline(nt.tokens);break}case"list":{for(ke=nt.items.length,Ee=0;Ee<ke;Ee++)this.inline(nt.items[Ee].tokens);break}}}return se},de.inlineTokens=function(se,Ae,Ee,xe,ke){Ae===void 0&&(Ae=[]),Ee===void 0&&(Ee=!1),xe===void 0&&(xe=!1),ke===void 0&&(ke="");var Qe,nt=se,dt;if(this.tokens.links){var wt=Object.keys(this.tokens.links);if(wt.length>0)for(;(dt=this.tokenizer.rules.inline.reflinkSearch.exec(nt))!=null;)wt.includes(dt[0].slice(dt[0].lastIndexOf("[")+1,-1))&&(nt=nt.slice(0,dt.index)+"["+"a".repeat(dt[0].length-2)+"]"+nt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(dt=this.tokenizer.rules.inline.blockSkip.exec(nt))!=null;)nt=nt.slice(0,dt.index)+"["+"a".repeat(dt[0].length-2)+"]"+nt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;se;){if(Qe=this.tokenizer.escape(se)){se=se.substring(Qe.raw.length),Ae.push(Qe);continue}if(Qe=this.tokenizer.tag(se,Ee,xe)){se=se.substring(Qe.raw.length),Ee=Qe.inLink,xe=Qe.inRawBlock,Ae.push(Qe);continue}if(Qe=this.tokenizer.link(se)){se=se.substring(Qe.raw.length),Qe.type==="link"&&(Qe.tokens=this.inlineTokens(Qe.text,[],!0,xe)),Ae.push(Qe);continue}if(Qe=this.tokenizer.reflink(se,this.tokens.links)){se=se.substring(Qe.raw.length),Qe.type==="link"&&(Qe.tokens=this.inlineTokens(Qe.text,[],!0,xe)),Ae.push(Qe);continue}if(Qe=this.tokenizer.strong(se,nt,ke)){se=se.substring(Qe.raw.length),Qe.tokens=this.inlineTokens(Qe.text,[],Ee,xe),Ae.push(Qe);continue}if(Qe=this.tokenizer.em(se,nt,ke)){se=se.substring(Qe.raw.length),Qe.tokens=this.inlineTokens(Qe.text,[],Ee,xe),Ae.push(Qe);continue}if(Qe=this.tokenizer.codespan(se)){se=se.substring(Qe.raw.length),Ae.push(Qe);continue}if(Qe=this.tokenizer.br(se)){se=se.substring(Qe.raw.length),Ae.push(Qe);continue}if(Qe=this.tokenizer.del(se)){se=se.substring(Qe.raw.length),Qe.tokens=this.inlineTokens(Qe.text,[],Ee,xe),Ae.push(Qe);continue}if(Qe=this.tokenizer.autolink(se,re)){se=se.substring(Qe.raw.length),Ae.push(Qe);continue}if(!Ee&&(Qe=this.tokenizer.url(se,re))){se=se.substring(Qe.raw.length),Ae.push(Qe);continue}if(Qe=this.tokenizer.inlineText(se,xe,G)){se=se.substring(Qe.raw.length),ke=Qe.raw.slice(-1),Ae.push(Qe);continue}if(se){var gt="Infinite loop on byte: "+se.charCodeAt(0);if(this.options.silent){console.error(gt);break}else throw new Error(gt)}}return Ae},W(ie,null,[{key:"rules",get:function(){return{block:te,inline:oe}}}]),ie}(),J=q.defaults,Y=Q.cleanUrl,he=Q.escape,we=function(){function ie(ge){this.options=ge||J}var de=ie.prototype;return de.code=function(se,Ae,Ee){var xe=(Ae||"").match(/\S*/)[0];if(this.options.highlight){var ke=this.options.highlight(se,xe);ke!=null&&ke!==se&&(Ee=!0,se=ke)}return xe?'<pre><code class="'+this.options.langPrefix+he(xe,!0)+'">'+(Ee?se:he(se,!0))+`</code></pre>
|
|
`:"<pre><code>"+(Ee?se:he(se,!0))+`</code></pre>
|
|
`},de.blockquote=function(se){return`<blockquote>
|
|
`+se+`</blockquote>
|
|
`},de.html=function(se){return se},de.heading=function(se,Ae,Ee,xe){return this.options.headerIds?"<h"+Ae+' id="'+this.options.headerPrefix+xe.slug(Ee)+'">'+se+"</h"+Ae+`>
|
|
`:"<h"+Ae+">"+se+"</h"+Ae+`>
|
|
`},de.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},de.list=function(se,Ae,Ee){var xe=Ae?"ol":"ul",ke=Ae&&Ee!==1?' start="'+Ee+'"':"";return"<"+xe+ke+`>
|
|
`+se+"</"+xe+`>
|
|
`},de.listitem=function(se){return"<li>"+se+`</li>
|
|
`},de.checkbox=function(se){return"<input "+(se?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},de.paragraph=function(se){return"<p>"+se+`</p>
|
|
`},de.table=function(se,Ae){return Ae&&(Ae="<tbody>"+Ae+"</tbody>"),`<table>
|
|
<thead>
|
|
`+se+`</thead>
|
|
`+Ae+`</table>
|
|
`},de.tablerow=function(se){return`<tr>
|
|
`+se+`</tr>
|
|
`},de.tablecell=function(se,Ae){var Ee=Ae.header?"th":"td",xe=Ae.align?"<"+Ee+' align="'+Ae.align+'">':"<"+Ee+">";return xe+se+"</"+Ee+`>
|
|
`},de.strong=function(se){return"<strong>"+se+"</strong>"},de.em=function(se){return"<em>"+se+"</em>"},de.codespan=function(se){return"<code>"+se+"</code>"},de.br=function(){return this.options.xhtml?"<br/>":"<br>"},de.del=function(se){return"<del>"+se+"</del>"},de.link=function(se,Ae,Ee){if(se=Y(this.options.sanitize,this.options.baseUrl,se),se===null)return Ee;var xe='<a href="'+he(se)+'"';return Ae&&(xe+=' title="'+Ae+'"'),xe+=">"+Ee+"</a>",xe},de.image=function(se,Ae,Ee){if(se=Y(this.options.sanitize,this.options.baseUrl,se),se===null)return Ee;var xe='<img src="'+se+'" alt="'+Ee+'"';return Ae&&(xe+=' title="'+Ae+'"'),xe+=this.options.xhtml?"/>":">",xe},de.text=function(se){return se},ie}(),Te=function(){function ie(){}var de=ie.prototype;return de.strong=function(se){return se},de.em=function(se){return se},de.codespan=function(se){return se},de.del=function(se){return se},de.html=function(se){return se},de.text=function(se){return se},de.link=function(se,Ae,Ee){return""+Ee},de.image=function(se,Ae,Ee){return""+Ee},de.br=function(){return""},ie}(),Xe=function(){function ie(){this.seen={}}var de=ie.prototype;return de.slug=function(se){var Ae=se.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ae)){var Ee=Ae;do this.seen[Ee]++,Ae=Ee+"-"+this.seen[Ee];while(this.seen.hasOwnProperty(Ae))}return this.seen[Ae]=0,Ae},ie}(),Ze=q.defaults,et=Q.unescape,rt=function(){function ie(ge){this.options=ge||Ze,this.options.renderer=this.options.renderer||new we,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Te,this.slugger=new Xe}ie.parse=function(se,Ae){var Ee=new ie(Ae);return Ee.parse(se)};var de=ie.prototype;return de.parse=function(se,Ae){Ae===void 0&&(Ae=!0);var Ee="",xe,ke,Qe,nt,dt,wt,gt,$t,xt,ut,Ot,jt,Tt,Yt,Qt,Xt,or,It,br=se.length;for(xe=0;xe<br;xe++){ut=se[xe];switch(ut.type){case"space":continue;case"hr":{Ee+=this.renderer.hr();continue}case"heading":{Ee+=this.renderer.heading(this.parseInline(ut.tokens),ut.depth,et(this.parseInline(ut.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ee+=this.renderer.code(ut.text,ut.lang,ut.escaped);continue}case"table":{for($t="",gt="",nt=ut.header.length,ke=0;ke<nt;ke++)gt+=this.renderer.tablecell(this.parseInline(ut.tokens.header[ke]),{header:!0,align:ut.align[ke]});for($t+=this.renderer.tablerow(gt),xt="",nt=ut.cells.length,ke=0;ke<nt;ke++){for(wt=ut.tokens.cells[ke],gt="",dt=wt.length,Qe=0;Qe<dt;Qe++)gt+=this.renderer.tablecell(this.parseInline(wt[Qe]),{header:!1,align:ut.align[Qe]});xt+=this.renderer.tablerow(gt)}Ee+=this.renderer.table($t,xt);continue}case"blockquote":{xt=this.parse(ut.tokens),Ee+=this.renderer.blockquote(xt);continue}case"list":{for(Ot=ut.ordered,jt=ut.start,Tt=ut.loose,nt=ut.items.length,xt="",ke=0;ke<nt;ke++)Qt=ut.items[ke],Xt=Qt.checked,or=Qt.task,Yt="",Qt.task&&(It=this.renderer.checkbox(Xt),Tt?Qt.tokens.length>0&&Qt.tokens[0].type==="text"?(Qt.tokens[0].text=It+" "+Qt.tokens[0].text,Qt.tokens[0].tokens&&Qt.tokens[0].tokens.length>0&&Qt.tokens[0].tokens[0].type==="text"&&(Qt.tokens[0].tokens[0].text=It+" "+Qt.tokens[0].tokens[0].text)):Qt.tokens.unshift({type:"text",text:It}):Yt+=It),Yt+=this.parse(Qt.tokens,Tt),xt+=this.renderer.listitem(Yt,or,Xt);Ee+=this.renderer.list(xt,Ot,jt);continue}case"html":{Ee+=this.renderer.html(ut.text);continue}case"paragraph":{Ee+=this.renderer.paragraph(this.parseInline(ut.tokens));continue}case"text":{for(xt=ut.tokens?this.parseInline(ut.tokens):ut.text;xe+1<br&&se[xe+1].type==="text";)ut=se[++xe],xt+=`
|
|
`+(ut.tokens?this.parseInline(ut.tokens):ut.text);Ee+=Ae?this.renderer.paragraph(xt):xt;continue}default:{var Mt='Token with "'+ut.type+'" type was not found.';if(this.options.silent){console.error(Mt);return}else throw new Error(Mt)}}}return Ee},de.parseInline=function(se,Ae){Ae=Ae||this.renderer;var Ee="",xe,ke,Qe=se.length;for(xe=0;xe<Qe;xe++){ke=se[xe];switch(ke.type){case"escape":{Ee+=Ae.text(ke.text);break}case"html":{Ee+=Ae.html(ke.text);break}case"link":{Ee+=Ae.link(ke.href,ke.title,this.parseInline(ke.tokens,Ae));break}case"image":{Ee+=Ae.image(ke.href,ke.title,ke.text);break}case"strong":{Ee+=Ae.strong(this.parseInline(ke.tokens,Ae));break}case"em":{Ee+=Ae.em(this.parseInline(ke.tokens,Ae));break}case"codespan":{Ee+=Ae.codespan(ke.text);break}case"br":{Ee+=Ae.br();break}case"del":{Ee+=Ae.del(this.parseInline(ke.tokens,Ae));break}case"text":{Ee+=Ae.text(ke.text);break}default:{var nt='Token with "'+ke.type+'" type was not found.';if(this.options.silent){console.error(nt);return}else throw new Error(nt)}}}return Ee},ie}(),At=Q.merge,pt=Q.checkSanitizeDeprecation,Pe=Q.escape,Ye=q.getDefaults,tt=q.changeDefaults,ot=q.defaults;function pe(ie,de,ge){if(typeof ie=="undefined"||ie===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ie!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ie)+", string expected");if(typeof de=="function"&&(ge=de,de=null),de=At({},pe.defaults,de||{}),pt(de),ge){var se=de.highlight,Ae;try{Ae=j.lex(ie,de)}catch(Qe){return ge(Qe)}var Ee=function(nt){var dt;if(!nt)try{dt=rt.parse(Ae,de)}catch(wt){nt=wt}return de.highlight=se,nt?ge(nt):ge(null,dt)};if(!se||se.length<3)return Ee();if(delete de.highlight,!Ae.length)return Ee();var xe=0;pe.walkTokens(Ae,function(Qe){Qe.type==="code"&&(xe++,setTimeout(function(){se(Qe.text,Qe.lang,function(nt,dt){if(nt)return Ee(nt);dt!=null&&dt!==Qe.text&&(Qe.text=dt,Qe.escaped=!0),xe--,xe===0&&Ee()})},0))}),xe===0&&Ee();return}try{var ke=j.lex(ie,de);return de.walkTokens&&pe.walkTokens(ke,de.walkTokens),rt.parse(ke,de)}catch(Qe){if(Qe.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,de.silent)return"<p>An error occurred:</p><pre>"+Pe(Qe.message+"",!0)+"</pre>";throw Qe}}pe.options=pe.setOptions=function(ie){return At(pe.defaults,ie),tt(pe.defaults),pe},pe.getDefaults=Ye,pe.defaults=ot,pe.use=function(ie){var de=At({},ie);if(ie.renderer&&function(){var se=pe.defaults.renderer||new we,Ae=function(ke){var Qe=se[ke];se[ke]=function(){for(var nt=arguments.length,dt=new Array(nt),wt=0;wt<nt;wt++)dt[wt]=arguments[wt];var gt=ie.renderer[ke].apply(se,dt);return gt===!1&&(gt=Qe.apply(se,dt)),gt}};for(var Ee in ie.renderer)Ae(Ee);de.renderer=se}(),ie.tokenizer&&function(){var se=pe.defaults.tokenizer||new Le,Ae=function(ke){var Qe=se[ke];se[ke]=function(){for(var nt=arguments.length,dt=new Array(nt),wt=0;wt<nt;wt++)dt[wt]=arguments[wt];var gt=ie.tokenizer[ke].apply(se,dt);return gt===!1&&(gt=Qe.apply(se,dt)),gt}};for(var Ee in ie.tokenizer)Ae(Ee);de.tokenizer=se}(),ie.walkTokens){var ge=pe.defaults.walkTokens;de.walkTokens=function(se){ie.walkTokens(se),ge&&ge(se)}}pe.setOptions(de)},pe.walkTokens=function(ie,de){for(var ge=U(ie),se;!(se=ge()).done;){var Ae=se.value;de(Ae);switch(Ae.type){case"table":{for(var Ee=U(Ae.tokens.header),xe;!(xe=Ee()).done;){var ke=xe.value;pe.walkTokens(ke,de)}for(var Qe=U(Ae.tokens.cells),nt;!(nt=Qe()).done;)for(var dt=nt.value,wt=U(dt),gt;!(gt=wt()).done;){var $t=gt.value;pe.walkTokens($t,de)}break}case"list":{pe.walkTokens(Ae.items,de);break}default:Ae.tokens&&pe.walkTokens(Ae.tokens,de)}}},pe.Parser=rt,pe.parser=rt.parse,pe.Renderer=we,pe.TextRenderer=Te,pe.Lexer=j,pe.lexer=j.lex,pe.Tokenizer=Le,pe.Slugger=Xe,pe.parse=pe;var ne=pe;return ne})},FWmy:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return fe});function fe(W,L){if(!W)throw new Error(L?`Assertion failed (${L})`:"Assertion Failed")}},H7XF:function(ft,Oe,K){"use strict";Oe.byteLength=k,Oe.toByteArray=I,Oe.fromByteArray=A;for(var fe=[],W=[],L=typeof Uint8Array!="undefined"?Uint8Array:Array,V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",U=0,O=V.length;U<O;++U)fe[U]=V[U],W[V.charCodeAt(U)]=U;W["-".charCodeAt(0)]=62,W["_".charCodeAt(0)]=63;function q(s){var i=s.length;if(i%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var o=s.indexOf("=");o===-1&&(o=i);var n=o===i?0:4-o%4;return[o,n]}function k(s){var i=q(s),o=i[0],n=i[1];return(o+n)*3/4-n}function e(s,i,o){return(i+o)*3/4-o}function I(s){var i,o=q(s),n=o[0],a=o[1],r=new L(e(s,n,a)),t=0,y=a>0?n-4:n,b;for(b=0;b<y;b+=4)i=W[s.charCodeAt(b)]<<18|W[s.charCodeAt(b+1)]<<12|W[s.charCodeAt(b+2)]<<6|W[s.charCodeAt(b+3)],r[t++]=i>>16&255,r[t++]=i>>8&255,r[t++]=i&255;return a===2&&(i=W[s.charCodeAt(b)]<<2|W[s.charCodeAt(b+1)]>>4,r[t++]=i&255),a===1&&(i=W[s.charCodeAt(b)]<<10|W[s.charCodeAt(b+1)]<<4|W[s.charCodeAt(b+2)]>>2,r[t++]=i>>8&255,r[t++]=i&255),r}function d(s){return fe[s>>18&63]+fe[s>>12&63]+fe[s>>6&63]+fe[s&63]}function p(s,i,o){for(var n,a=[],r=i;r<o;r+=3)n=(s[r]<<16&16711680)+(s[r+1]<<8&65280)+(s[r+2]&255),a.push(d(n));return a.join("")}function A(s){for(var i,o=s.length,n=o%3,a=[],r=16383,t=0,y=o-n;t<y;t+=r)a.push(p(s,t,t+r>y?y:t+r));return n===1?(i=s[o-1],a.push(fe[i>>2]+fe[i<<4&63]+"==")):n===2&&(i=(s[o-2]<<8)+s[o-1],a.push(fe[i>>10]+fe[i>>4&63]+fe[i<<2&63]+"=")),a.join("")}},HDXh:function(ft,Oe,K){"use strict";(function(fe){/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
* @license MIT
|
|
*/var W=K("H7XF"),L=K("kVK+"),V=K("49sm");Oe.Buffer=k,Oe.SlowBuffer=a,Oe.INSPECT_MAX_BYTES=50,k.TYPED_ARRAY_SUPPORT=fe.TYPED_ARRAY_SUPPORT!==void 0?fe.TYPED_ARRAY_SUPPORT:U(),Oe.kMaxLength=O();function U(){try{var re=new Uint8Array(1);return re.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},re.foo()===42&&typeof re.subarray=="function"&&re.subarray(1,1).byteLength===0}catch(j){return!1}}function O(){return k.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function q(re,j){if(O()<j)throw new RangeError("Invalid typed array length");return k.TYPED_ARRAY_SUPPORT?(re=new Uint8Array(j),re.__proto__=k.prototype):(re===null&&(re=new k(j)),re.length=j),re}function k(re,j,J){if(!k.TYPED_ARRAY_SUPPORT&&!(this instanceof k))return new k(re,j,J);if(typeof re=="number"){if(typeof j=="string")throw new Error("If encoding is specified then the first argument must be a string");return p(this,re)}return e(this,re,j,J)}k.poolSize=8192,k._augment=function(re){return re.__proto__=k.prototype,re};function e(re,j,J,Y){if(typeof j=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&j instanceof ArrayBuffer?i(re,j,J,Y):typeof j=="string"?A(re,j,J):o(re,j)}k.from=function(re,j,J){return e(null,re,j,J)},k.TYPED_ARRAY_SUPPORT&&(k.prototype.__proto__=Uint8Array.prototype,k.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&k[Symbol.species]===k&&Object.defineProperty(k,Symbol.species,{value:null,configurable:!0}));function I(re){if(typeof re!="number")throw new TypeError('"size" argument must be a number');if(re<0)throw new RangeError('"size" argument must not be negative')}function d(re,j,J,Y){return I(j),j<=0?q(re,j):J!==void 0?typeof Y=="string"?q(re,j).fill(J,Y):q(re,j).fill(J):q(re,j)}k.alloc=function(re,j,J){return d(null,re,j,J)};function p(re,j){if(I(j),re=q(re,j<0?0:n(j)|0),!k.TYPED_ARRAY_SUPPORT)for(var J=0;J<j;++J)re[J]=0;return re}k.allocUnsafe=function(re){return p(null,re)},k.allocUnsafeSlow=function(re){return p(null,re)};function A(re,j,J){if((typeof J!="string"||J==="")&&(J="utf8"),!k.isEncoding(J))throw new TypeError('"encoding" must be a valid string encoding');var Y=r(j,J)|0;re=q(re,Y);var he=re.write(j,J);return he!==Y&&(re=re.slice(0,he)),re}function s(re,j){var J=j.length<0?0:n(j.length)|0;re=q(re,J);for(var Y=0;Y<J;Y+=1)re[Y]=j[Y]&255;return re}function i(re,j,J,Y){if(j.byteLength,J<0||j.byteLength<J)throw new RangeError("'offset' is out of bounds");if(j.byteLength<J+(Y||0))throw new RangeError("'length' is out of bounds");return J===void 0&&Y===void 0?j=new Uint8Array(j):Y===void 0?j=new Uint8Array(j,J):j=new Uint8Array(j,J,Y),k.TYPED_ARRAY_SUPPORT?(re=j,re.__proto__=k.prototype):re=s(re,j),re}function o(re,j){if(k.isBuffer(j)){var J=n(j.length)|0;return re=q(re,J),re.length===0||j.copy(re,0,0,J),re}if(j){if(typeof ArrayBuffer!="undefined"&&j.buffer instanceof ArrayBuffer||"length"in j)return typeof j.length!="number"||G(j.length)?q(re,0):s(re,j);if(j.type==="Buffer"&&V(j.data))return s(re,j.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function n(re){if(re>=O())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O().toString(16)+" bytes");return re|0}function a(re){return+re!=re&&(re=0),k.alloc(+re)}k.isBuffer=function(j){return!!(j!=null&&j._isBuffer)},k.compare=function(j,J){if(!k.isBuffer(j)||!k.isBuffer(J))throw new TypeError("Arguments must be Buffers");if(j===J)return 0;for(var Y=j.length,he=J.length,we=0,Te=Math.min(Y,he);we<Te;++we)if(j[we]!==J[we]){Y=j[we],he=J[we];break}return Y<he?-1:he<Y?1:0},k.isEncoding=function(j){switch(String(j).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}},k.concat=function(j,J){if(!V(j))throw new TypeError('"list" argument must be an Array of Buffers');if(j.length===0)return k.alloc(0);var Y;if(J===void 0)for(J=0,Y=0;Y<j.length;++Y)J+=j[Y].length;var he=k.allocUnsafe(J),we=0;for(Y=0;Y<j.length;++Y){var Te=j[Y];if(!k.isBuffer(Te))throw new TypeError('"list" argument must be an Array of Buffers');Te.copy(he,we),we+=Te.length}return he};function r(re,j){if(k.isBuffer(re))return re.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(re)||re instanceof ArrayBuffer))return re.byteLength;typeof re!="string"&&(re=""+re);var J=re.length;if(J===0)return 0;for(var Y=!1;;)switch(j){case"ascii":case"latin1":case"binary":return J;case"utf8":case"utf-8":case void 0:return $(re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J*2;case"hex":return J>>>1;case"base64":return te(re).length;default:if(Y)return $(re).length;j=(""+j).toLowerCase(),Y=!0}}k.byteLength=r;function t(re,j,J){var Y=!1;if((j===void 0||j<0)&&(j=0),j>this.length)return"";if((J===void 0||J>this.length)&&(J=this.length),J<=0)return"";if(J>>>=0,j>>>=0,J<=j)return"";for(re||(re="utf8");;)switch(re){case"hex":return Q(this,j,J);case"utf8":case"utf-8":return g(this,j,J);case"ascii":return H(this,j,J);case"latin1":case"binary":return B(this,j,J);case"base64":return _(this,j,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,j,J);default:if(Y)throw new TypeError("Unknown encoding: "+re);re=(re+"").toLowerCase(),Y=!0}}k.prototype._isBuffer=!0;function y(re,j,J){var Y=re[j];re[j]=re[J],re[J]=Y}k.prototype.swap16=function(){var j=this.length;if(j%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var J=0;J<j;J+=2)y(this,J,J+1);return this},k.prototype.swap32=function(){var j=this.length;if(j%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var J=0;J<j;J+=4)y(this,J,J+3),y(this,J+1,J+2);return this},k.prototype.swap64=function(){var j=this.length;if(j%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var J=0;J<j;J+=8)y(this,J,J+7),y(this,J+1,J+6),y(this,J+2,J+5),y(this,J+3,J+4);return this},k.prototype.toString=function(){var j=this.length|0;return j===0?"":arguments.length===0?g(this,0,j):t.apply(this,arguments)},k.prototype.equals=function(j){if(!k.isBuffer(j))throw new TypeError("Argument must be a Buffer");return this===j?!0:k.compare(this,j)===0},k.prototype.inspect=function(){var j="",J=Oe.INSPECT_MAX_BYTES;return this.length>0&&(j=this.toString("hex",0,J).match(/.{2}/g).join(" "),this.length>J&&(j+=" ... ")),"<Buffer "+j+">"},k.prototype.compare=function(j,J,Y,he,we){if(!k.isBuffer(j))throw new TypeError("Argument must be a Buffer");if(J===void 0&&(J=0),Y===void 0&&(Y=j?j.length:0),he===void 0&&(he=0),we===void 0&&(we=this.length),J<0||Y>j.length||he<0||we>this.length)throw new RangeError("out of range index");if(he>=we&&J>=Y)return 0;if(he>=we)return-1;if(J>=Y)return 1;if(J>>>=0,Y>>>=0,he>>>=0,we>>>=0,this===j)return 0;for(var Te=we-he,Xe=Y-J,Ze=Math.min(Te,Xe),et=this.slice(he,we),rt=j.slice(J,Y),At=0;At<Ze;++At)if(et[At]!==rt[At]){Te=et[At],Xe=rt[At];break}return Te<Xe?-1:Xe<Te?1:0};function b(re,j,J,Y,he){if(re.length===0)return-1;if(typeof J=="string"?(Y=J,J=0):J>2147483647?J=2147483647:J<-2147483648&&(J=-2147483648),J=+J,isNaN(J)&&(J=he?0:re.length-1),J<0&&(J=re.length+J),J>=re.length){if(he)return-1;J=re.length-1}else if(J<0)if(he)J=0;else return-1;if(typeof j=="string"&&(j=k.from(j,Y)),k.isBuffer(j))return j.length===0?-1:E(re,j,J,Y,he);if(typeof j=="number")return j=j&255,k.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?he?Uint8Array.prototype.indexOf.call(re,j,J):Uint8Array.prototype.lastIndexOf.call(re,j,J):E(re,[j],J,Y,he);throw new TypeError("val must be string, number or Buffer")}function E(re,j,J,Y,he){var we=1,Te=re.length,Xe=j.length;if(Y!==void 0&&(Y=String(Y).toLowerCase(),Y==="ucs2"||Y==="ucs-2"||Y==="utf16le"||Y==="utf-16le")){if(re.length<2||j.length<2)return-1;we=2,Te/=2,Xe/=2,J/=2}function Ze(Pe,Ye){return we===1?Pe[Ye]:Pe.readUInt16BE(Ye*we)}var et;if(he){var rt=-1;for(et=J;et<Te;et++)if(Ze(re,et)===Ze(j,rt===-1?0:et-rt)){if(rt===-1&&(rt=et),et-rt+1===Xe)return rt*we}else rt!==-1&&(et-=et-rt),rt=-1}else for(J+Xe>Te&&(J=Te-Xe),et=J;et>=0;et--){for(var At=!0,pt=0;pt<Xe;pt++)if(Ze(re,et+pt)!==Ze(j,pt)){At=!1;break}if(At)return et}return-1}k.prototype.includes=function(j,J,Y){return this.indexOf(j,J,Y)!==-1},k.prototype.indexOf=function(j,J,Y){return b(this,j,J,Y,!0)},k.prototype.lastIndexOf=function(j,J,Y){return b(this,j,J,Y,!1)};function T(re,j,J,Y){J=Number(J)||0;var he=re.length-J;Y?(Y=Number(Y),Y>he&&(Y=he)):Y=he;var we=j.length;if(we%2!==0)throw new TypeError("Invalid hex string");Y>we/2&&(Y=we/2);for(var Te=0;Te<Y;++Te){var Xe=parseInt(j.substr(Te*2,2),16);if(isNaN(Xe))return Te;re[J+Te]=Xe}return Te}function C(re,j,J,Y){return oe($(j,re.length-J),re,J,Y)}function h(re,j,J,Y){return oe(D(j),re,J,Y)}function c(re,j,J,Y){return h(re,j,J,Y)}function l(re,j,J,Y){return oe(te(j),re,J,Y)}function u(re,j,J,Y){return oe(M(j,re.length-J),re,J,Y)}k.prototype.write=function(j,J,Y,he){if(J===void 0)he="utf8",Y=this.length,J=0;else if(Y===void 0&&typeof J=="string")he=J,Y=this.length,J=0;else if(isFinite(J))J=J|0,isFinite(Y)?(Y=Y|0,he===void 0&&(he="utf8")):(he=Y,Y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var we=this.length-J;if((Y===void 0||Y>we)&&(Y=we),j.length>0&&(Y<0||J<0)||J>this.length)throw new RangeError("Attempt to write outside buffer bounds");he||(he="utf8");for(var Te=!1;;)switch(he){case"hex":return T(this,j,J,Y);case"utf8":case"utf-8":return C(this,j,J,Y);case"ascii":return h(this,j,J,Y);case"latin1":case"binary":return c(this,j,J,Y);case"base64":return l(this,j,J,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u(this,j,J,Y);default:if(Te)throw new TypeError("Unknown encoding: "+he);he=(""+he).toLowerCase(),Te=!0}},k.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _(re,j,J){return j===0&&J===re.length?W.fromByteArray(re):W.fromByteArray(re.slice(j,J))}function g(re,j,J){J=Math.min(re.length,J);for(var Y=[],he=j;he<J;){var we=re[he],Te=null,Xe=we>239?4:we>223?3:we>191?2:1;if(he+Xe<=J){var Ze,et,rt,At;switch(Xe){case 1:we<128&&(Te=we);break;case 2:Ze=re[he+1],(Ze&192)===128&&(At=(we&31)<<6|Ze&63,At>127&&(Te=At));break;case 3:Ze=re[he+1],et=re[he+2],(Ze&192)===128&&(et&192)===128&&(At=(we&15)<<12|(Ze&63)<<6|et&63,At>2047&&(At<55296||At>57343)&&(Te=At));break;case 4:Ze=re[he+1],et=re[he+2],rt=re[he+3],(Ze&192)===128&&(et&192)===128&&(rt&192)===128&&(At=(we&15)<<18|(Ze&63)<<12|(et&63)<<6|rt&63,At>65535&&At<1114112&&(Te=At))}}Te===null?(Te=65533,Xe=1):Te>65535&&(Te-=65536,Y.push(Te>>>10&1023|55296),Te=56320|Te&1023),Y.push(Te),he+=Xe}return F(Y)}var m=4096;function F(re){var j=re.length;if(j<=m)return String.fromCharCode.apply(String,re);for(var J="",Y=0;Y<j;)J+=String.fromCharCode.apply(String,re.slice(Y,Y+=m));return J}function H(re,j,J){var Y="";J=Math.min(re.length,J);for(var he=j;he<J;++he)Y+=String.fromCharCode(re[he]&127);return Y}function B(re,j,J){var Y="";J=Math.min(re.length,J);for(var he=j;he<J;++he)Y+=String.fromCharCode(re[he]);return Y}function Q(re,j,J){var Y=re.length;(!j||j<0)&&(j=0),(!J||J<0||J>Y)&&(J=Y);for(var he="",we=j;we<J;++we)he+=Se(re[we]);return he}function z(re,j,J){for(var Y=re.slice(j,J),he="",we=0;we<Y.length;we+=2)he+=String.fromCharCode(Y[we]+Y[we+1]*256);return he}k.prototype.slice=function(j,J){var Y=this.length;j=~~j,J=J===void 0?Y:~~J,j<0?(j+=Y,j<0&&(j=0)):j>Y&&(j=Y),J<0?(J+=Y,J<0&&(J=0)):J>Y&&(J=Y),J<j&&(J=j);var he;if(k.TYPED_ARRAY_SUPPORT)he=this.subarray(j,J),he.__proto__=k.prototype;else{var we=J-j;he=new k(we,void 0);for(var Te=0;Te<we;++Te)he[Te]=this[Te+j]}return he};function N(re,j,J){if(re%1!==0||re<0)throw new RangeError("offset is not uint");if(re+j>J)throw new RangeError("Trying to access beyond buffer length")}k.prototype.readUIntLE=function(j,J,Y){j=j|0,J=J|0,Y||N(j,J,this.length);for(var he=this[j],we=1,Te=0;++Te<J&&(we*=256);)he+=this[j+Te]*we;return he},k.prototype.readUIntBE=function(j,J,Y){j=j|0,J=J|0,Y||N(j,J,this.length);for(var he=this[j+--J],we=1;J>0&&(we*=256);)he+=this[j+--J]*we;return he},k.prototype.readUInt8=function(j,J){return J||N(j,1,this.length),this[j]},k.prototype.readUInt16LE=function(j,J){return J||N(j,2,this.length),this[j]|this[j+1]<<8},k.prototype.readUInt16BE=function(j,J){return J||N(j,2,this.length),this[j]<<8|this[j+1]},k.prototype.readUInt32LE=function(j,J){return J||N(j,4,this.length),(this[j]|this[j+1]<<8|this[j+2]<<16)+this[j+3]*16777216},k.prototype.readUInt32BE=function(j,J){return J||N(j,4,this.length),this[j]*16777216+(this[j+1]<<16|this[j+2]<<8|this[j+3])},k.prototype.readIntLE=function(j,J,Y){j=j|0,J=J|0,Y||N(j,J,this.length);for(var he=this[j],we=1,Te=0;++Te<J&&(we*=256);)he+=this[j+Te]*we;return we*=128,he>=we&&(he-=Math.pow(2,8*J)),he},k.prototype.readIntBE=function(j,J,Y){j=j|0,J=J|0,Y||N(j,J,this.length);for(var he=J,we=1,Te=this[j+--he];he>0&&(we*=256);)Te+=this[j+--he]*we;return we*=128,Te>=we&&(Te-=Math.pow(2,8*J)),Te},k.prototype.readInt8=function(j,J){return J||N(j,1,this.length),this[j]&128?(255-this[j]+1)*-1:this[j]},k.prototype.readInt16LE=function(j,J){J||N(j,2,this.length);var Y=this[j]|this[j+1]<<8;return Y&32768?Y|4294901760:Y},k.prototype.readInt16BE=function(j,J){J||N(j,2,this.length);var Y=this[j+1]|this[j]<<8;return Y&32768?Y|4294901760:Y},k.prototype.readInt32LE=function(j,J){return J||N(j,4,this.length),this[j]|this[j+1]<<8|this[j+2]<<16|this[j+3]<<24},k.prototype.readInt32BE=function(j,J){return J||N(j,4,this.length),this[j]<<24|this[j+1]<<16|this[j+2]<<8|this[j+3]},k.prototype.readFloatLE=function(j,J){return J||N(j,4,this.length),L.read(this,j,!0,23,4)},k.prototype.readFloatBE=function(j,J){return J||N(j,4,this.length),L.read(this,j,!1,23,4)},k.prototype.readDoubleLE=function(j,J){return J||N(j,8,this.length),L.read(this,j,!0,52,8)},k.prototype.readDoubleBE=function(j,J){return J||N(j,8,this.length),L.read(this,j,!1,52,8)};function ee(re,j,J,Y,he,we){if(!k.isBuffer(re))throw new TypeError('"buffer" argument must be a Buffer instance');if(j>he||j<we)throw new RangeError('"value" argument is out of bounds');if(J+Y>re.length)throw new RangeError("Index out of range")}k.prototype.writeUIntLE=function(j,J,Y,he){if(j=+j,J=J|0,Y=Y|0,!he){var we=Math.pow(2,8*Y)-1;ee(this,j,J,Y,we,0)}var Te=1,Xe=0;for(this[J]=j&255;++Xe<Y&&(Te*=256);)this[J+Xe]=j/Te&255;return J+Y},k.prototype.writeUIntBE=function(j,J,Y,he){if(j=+j,J=J|0,Y=Y|0,!he){var we=Math.pow(2,8*Y)-1;ee(this,j,J,Y,we,0)}var Te=Y-1,Xe=1;for(this[J+Te]=j&255;--Te>=0&&(Xe*=256);)this[J+Te]=j/Xe&255;return J+Y},k.prototype.writeUInt8=function(j,J,Y){return j=+j,J=J|0,Y||ee(this,j,J,1,255,0),k.TYPED_ARRAY_SUPPORT||(j=Math.floor(j)),this[J]=j&255,J+1};function le(re,j,J,Y){j<0&&(j=65535+j+1);for(var he=0,we=Math.min(re.length-J,2);he<we;++he)re[J+he]=(j&255<<8*(Y?he:1-he))>>>(Y?he:1-he)*8}k.prototype.writeUInt16LE=function(j,J,Y){return j=+j,J=J|0,Y||ee(this,j,J,2,65535,0),k.TYPED_ARRAY_SUPPORT?(this[J]=j&255,this[J+1]=j>>>8):le(this,j,J,!0),J+2},k.prototype.writeUInt16BE=function(j,J,Y){return j=+j,J=J|0,Y||ee(this,j,J,2,65535,0),k.TYPED_ARRAY_SUPPORT?(this[J]=j>>>8,this[J+1]=j&255):le(this,j,J,!1),J+2};function Be(re,j,J,Y){j<0&&(j=4294967295+j+1);for(var he=0,we=Math.min(re.length-J,4);he<we;++he)re[J+he]=j>>>(Y?he:3-he)*8&255}k.prototype.writeUInt32LE=function(j,J,Y){return j=+j,J=J|0,Y||ee(this,j,J,4,4294967295,0),k.TYPED_ARRAY_SUPPORT?(this[J+3]=j>>>24,this[J+2]=j>>>16,this[J+1]=j>>>8,this[J]=j&255):Be(this,j,J,!0),J+4},k.prototype.writeUInt32BE=function(j,J,Y){return j=+j,J=J|0,Y||ee(this,j,J,4,4294967295,0),k.TYPED_ARRAY_SUPPORT?(this[J]=j>>>24,this[J+1]=j>>>16,this[J+2]=j>>>8,this[J+3]=j&255):Be(this,j,J,!1),J+4},k.prototype.writeIntLE=function(j,J,Y,he){if(j=+j,J=J|0,!he){var we=Math.pow(2,8*Y-1);ee(this,j,J,Y,we-1,-we)}var Te=0,Xe=1,Ze=0;for(this[J]=j&255;++Te<Y&&(Xe*=256);)j<0&&Ze===0&&this[J+Te-1]!==0&&(Ze=1),this[J+Te]=(j/Xe>>0)-Ze&255;return J+Y},k.prototype.writeIntBE=function(j,J,Y,he){if(j=+j,J=J|0,!he){var we=Math.pow(2,8*Y-1);ee(this,j,J,Y,we-1,-we)}var Te=Y-1,Xe=1,Ze=0;for(this[J+Te]=j&255;--Te>=0&&(Xe*=256);)j<0&&Ze===0&&this[J+Te+1]!==0&&(Ze=1),this[J+Te]=(j/Xe>>0)-Ze&255;return J+Y},k.prototype.writeInt8=function(j,J,Y){return j=+j,J=J|0,Y||ee(this,j,J,1,127,-128),k.TYPED_ARRAY_SUPPORT||(j=Math.floor(j)),j<0&&(j=255+j+1),this[J]=j&255,J+1},k.prototype.writeInt16LE=function(j,J,Y){return j=+j,J=J|0,Y||ee(this,j,J,2,32767,-32768),k.TYPED_ARRAY_SUPPORT?(this[J]=j&255,this[J+1]=j>>>8):le(this,j,J,!0),J+2},k.prototype.writeInt16BE=function(j,J,Y){return j=+j,J=J|0,Y||ee(this,j,J,2,32767,-32768),k.TYPED_ARRAY_SUPPORT?(this[J]=j>>>8,this[J+1]=j&255):le(this,j,J,!1),J+2},k.prototype.writeInt32LE=function(j,J,Y){return j=+j,J=J|0,Y||ee(this,j,J,4,2147483647,-2147483648),k.TYPED_ARRAY_SUPPORT?(this[J]=j&255,this[J+1]=j>>>8,this[J+2]=j>>>16,this[J+3]=j>>>24):Be(this,j,J,!0),J+4},k.prototype.writeInt32BE=function(j,J,Y){return j=+j,J=J|0,Y||ee(this,j,J,4,2147483647,-2147483648),j<0&&(j=4294967295+j+1),k.TYPED_ARRAY_SUPPORT?(this[J]=j>>>24,this[J+1]=j>>>16,this[J+2]=j>>>8,this[J+3]=j&255):Be(this,j,J,!1),J+4};function Ce(re,j,J,Y,he,we){if(J+Y>re.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("Index out of range")}function Me(re,j,J,Y,he){return he||Ce(re,j,J,4,34028234663852886e22,-34028234663852886e22),L.write(re,j,J,Y,23,4),J+4}k.prototype.writeFloatLE=function(j,J,Y){return Me(this,j,J,!0,Y)},k.prototype.writeFloatBE=function(j,J,Y){return Me(this,j,J,!1,Y)};function Le(re,j,J,Y,he){return he||Ce(re,j,J,8,17976931348623157e292,-17976931348623157e292),L.write(re,j,J,Y,52,8),J+8}k.prototype.writeDoubleLE=function(j,J,Y){return Le(this,j,J,!0,Y)},k.prototype.writeDoubleBE=function(j,J,Y){return Le(this,j,J,!1,Y)},k.prototype.copy=function(j,J,Y,he){if(Y||(Y=0),!he&&he!==0&&(he=this.length),J>=j.length&&(J=j.length),J||(J=0),he>0&&he<Y&&(he=Y),he===Y)return 0;if(j.length===0||this.length===0)return 0;if(J<0)throw new RangeError("targetStart out of bounds");if(Y<0||Y>=this.length)throw new RangeError("sourceStart out of bounds");if(he<0)throw new RangeError("sourceEnd out of bounds");he>this.length&&(he=this.length),j.length-J<he-Y&&(he=j.length-J+Y);var we=he-Y,Te;if(this===j&&Y<J&&J<he)for(Te=we-1;Te>=0;--Te)j[Te+J]=this[Te+Y];else if(we<1e3||!k.TYPED_ARRAY_SUPPORT)for(Te=0;Te<we;++Te)j[Te+J]=this[Te+Y];else Uint8Array.prototype.set.call(j,this.subarray(Y,Y+we),J);return we},k.prototype.fill=function(j,J,Y,he){if(typeof j=="string"){if(typeof J=="string"?(he=J,J=0,Y=this.length):typeof Y=="string"&&(he=Y,Y=this.length),j.length===1){var we=j.charCodeAt(0);we<256&&(j=we)}if(he!==void 0&&typeof he!="string")throw new TypeError("encoding must be a string");if(typeof he=="string"&&!k.isEncoding(he))throw new TypeError("Unknown encoding: "+he)}else typeof j=="number"&&(j=j&255);if(J<0||this.length<J||this.length<Y)throw new RangeError("Out of range index");if(Y<=J)return this;J=J>>>0,Y=Y===void 0?this.length:Y>>>0,j||(j=0);var Te;if(typeof j=="number")for(Te=J;Te<Y;++Te)this[Te]=j;else{var Xe=k.isBuffer(j)?j:$(new k(j,he).toString()),Ze=Xe.length;for(Te=0;Te<Y-J;++Te)this[Te+J]=Xe[Te%Ze]}return this};var je=/[^+\/0-9A-Za-z-_]/g;function He(re){if(re=Je(re).replace(je,""),re.length<2)return"";for(;re.length%4!==0;)re=re+"=";return re}function Je(re){return re.trim?re.trim():re.replace(/^\s+|\s+$/g,"")}function Se(re){return re<16?"0"+re.toString(16):re.toString(16)}function $(re,j){j=j||Infinity;for(var J,Y=re.length,he=null,we=[],Te=0;Te<Y;++Te){if(J=re.charCodeAt(Te),J>55295&&J<57344){if(!he){if(J>56319){(j-=3)>-1&&we.push(239,191,189);continue}else if(Te+1===Y){(j-=3)>-1&&we.push(239,191,189);continue}he=J;continue}if(J<56320){(j-=3)>-1&&we.push(239,191,189),he=J;continue}J=(he-55296<<10|J-56320)+65536}else he&&((j-=3)>-1&&we.push(239,191,189));if(he=null,J<128){if((j-=1)<0)break;we.push(J)}else if(J<2048){if((j-=2)<0)break;we.push(J>>6|192,J&63|128)}else if(J<65536){if((j-=3)<0)break;we.push(J>>12|224,J>>6&63|128,J&63|128)}else if(J<1114112){if((j-=4)<0)break;we.push(J>>18|240,J>>12&63|128,J>>6&63|128,J&63|128)}else throw new Error("Invalid code point")}return we}function D(re){for(var j=[],J=0;J<re.length;++J)j.push(re.charCodeAt(J)&255);return j}function M(re,j){for(var J,Y,he,we=[],Te=0;Te<re.length&&!((j-=2)<0);++Te)J=re.charCodeAt(Te),Y=J>>8,he=J%256,we.push(he),we.push(Y);return we}function te(re){return W.toByteArray(He(re))}function oe(re,j,J,Y){for(var he=0;he<Y&&!(he+J>=j.length||he>=re.length);++he)j[he+J]=re[he];return he}function G(re){return re!==re}}).call(this,K("IyRk"))},IBYe:function(ft,Oe,K){"use strict";function fe(W){return null}Oe.a=fe},JYp7:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return fe});var fe;(function(W){function L(t){return t&&typeof t=="object"&&typeof t[Symbol.iterator]=="function"}W.is=L;const V=Object.freeze([]);function U(){return V}W.empty=U;function*O(t){yield t}W.single=O;function q(t){return t||V}W.from=q;function k(t){return!t||t[Symbol.iterator]().next().done===!0}W.isEmpty=k;function e(t){return t[Symbol.iterator]().next().value}W.first=e;function I(t,y){for(const b of t)if(y(b))return!0;return!1}W.some=I;function d(t,y){for(const b of t)if(y(b))return b;return}W.find=d;function*p(t,y){for(const b of t)y(b)&&(yield b)}W.filter=p;function*A(t,y){let b=0;for(const E of t)yield y(E,b++)}W.map=A;function*s(...t){for(const y of t)for(const b of y)yield b}W.concat=s;function*i(t){for(const y of t)for(const b of y)yield b}W.concatNested=i;function o(t,y,b){let E=b;for(const T of t)E=y(E,T);return E}W.reduce=o;function*n(t,y,b=t.length){for(y<0&&(y+=t.length),b<0?b+=t.length:b>t.length&&(b=t.length);y<b;y++)yield t[y]}W.slice=n;function a(t,y=Number.POSITIVE_INFINITY){const b=[];if(y===0)return[b,t];const E=t[Symbol.iterator]();for(let T=0;T<y;T++){const C=E.next();if(C.done)return[b,W.empty()];b.push(C.value)}return[b,{[Symbol.iterator](){return E}}]}W.consume=a;function r(t,y,b=(E,T)=>E===T){const E=t[Symbol.iterator](),T=y[Symbol.iterator]();for(;;){const C=E.next(),h=T.next();if(C.done!==h.done)return!1;if(C.done)return!0;if(!b(C.value,h.value))return!1}}W.equals=r})(fe||(fe={}))},LdHM:function(ft,Oe,K){"use strict";K.d(Oe,"b",function(){return t}),K.d(Oe,"a",function(){return b});var fe=K("1OyB"),W=K("vuIU"),L=K("Ji7U"),V=K("LK+K"),U=K("q1tI"),O=K("rePB"),q=K("Ff2n"),k=K("ODXe"),e=K("4IlW"),I=K("bX4T"),d=K("YrtM"),p=K("TSYQ"),A=K.n(p),s=K("+nKL"),i=K("8OUc"),o=function(ee,le){var Be=ee.prefixCls,Ce=ee.id,Me=ee.flattenOptions,Le=ee.childrenAsData,je=ee.values,He=ee.searchValue,Je=ee.multiple,Se=ee.defaultActiveFirstOption,$=ee.height,D=ee.itemHeight,M=ee.notFoundContent,te=ee.open,oe=ee.menuItemSelectedIcon,G=ee.virtual,re=ee.onSelect,j=ee.onToggleOpen,J=ee.onActiveValue,Y=ee.onScroll,he=ee.onMouseEnter,we="".concat(Be,"-item"),Te=Object(d.a)(function(){return Me},[te,Me],function(ne,ie){return ie[0]&&ne[1]!==ie[1]}),Xe=U.useRef(null),Ze=function(ie){ie.preventDefault()},et=function(ie){Xe.current&&Xe.current.scrollTo({index:ie})},rt=function(ie){for(var de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ge=Te.length,se=0;se<ge;se+=1){var Ae=(ie+se*de+ge)%ge,Ee=Te[Ae],xe=Ee.group,ke=Ee.data;if(!xe&&!ke.disabled)return Ae}return-1},At=U.useState(function(){return rt(0)}),pt=Object(k.a)(At,2),Pe=pt[0],Ye=pt[1],tt=function(ie){Ye(ie);var de=Te[ie];if(!de){J(null,-1);return}J(de.data.value,ie)};U.useEffect(function(){tt(Se!==!1?rt(0):-1)},[Te.length,He]),U.useEffect(function(){var ne=setTimeout(function(){if(!Je&&te&&je.size===1){var ie=Array.from(je)[0],de=Te.findIndex(function(ge){var se=ge.data;return se.value===ie});tt(de),et(de)}});return function(){return clearTimeout(ne)}},[te]);var ot=function(ie){ie!==void 0&&re(ie,{selected:!je.has(ie)}),Je||j(!1)};if(U.useImperativeHandle(le,function(){return{onKeyDown:function(ie){var de=ie.which;switch(de){case e.a.UP:case e.a.DOWN:{var ge=0;if(de===e.a.UP?ge=-1:de===e.a.DOWN&&(ge=1),ge!==0){var se=rt(Pe+ge,ge);et(se),tt(se)}break}case e.a.ENTER:{var Ae=Te[Pe];Ae&&!Ae.data.disabled?ot(Ae.data.value):ot(void 0),te&&ie.preventDefault();break}case e.a.ESC:j(!1)}},onKeyUp:function(){},scrollTo:function(ie){et(ie)}}}),Te.length===0)return U.createElement("div",{role:"listbox",id:"".concat(Ce,"_list"),className:"".concat(we,"-empty"),onMouseDown:Ze},M);function pe(ne){var ie=Te[ne];if(!ie)return null;var de=ie.data||{},ge=de.value,se=de.label,Ae=de.children,Ee=Object(I.a)(de,!0),xe=Le?Ae:se;return ie?U.createElement("div",Object.assign({"aria-label":typeof xe=="string"?xe:null},Ee,{key:ne,role:"option",id:"".concat(Ce,"_list_").concat(ne),"aria-selected":je.has(ge)}),ge):null}return U.createElement(U.Fragment,null,U.createElement("div",{role:"listbox",id:"".concat(Ce,"_list"),style:{height:0,width:0,overflow:"hidden"}},pe(Pe-1),pe(Pe),pe(Pe+1)),U.createElement(s.a,{itemKey:"key",ref:Xe,data:Te,height:$,itemHeight:D,fullHeight:!1,onMouseDown:Ze,onScroll:Y,virtual:G,onMouseEnter:he},function(ne,ie){var de,ge=ne.group,se=ne.groupOption,Ae=ne.data,Ee=Ae.label,xe=Ae.key;if(ge)return U.createElement("div",{className:A()(we,"".concat(we,"-group"))},Ee!==void 0?Ee:xe);var ke=Ae.disabled,Qe=Ae.value,nt=Ae.title,dt=Ae.children,wt=Ae.style,gt=Ae.className,$t=Object(q.a)(Ae,["disabled","value","title","children","style","className"]),xt=je.has(Qe),ut="".concat(we,"-option"),Ot=A()(we,ut,gt,(de={},Object(O.a)(de,"".concat(ut,"-grouped"),se),Object(O.a)(de,"".concat(ut,"-active"),Pe===ie&&!ke),Object(O.a)(de,"".concat(ut,"-disabled"),ke),Object(O.a)(de,"".concat(ut,"-selected"),xt),de)),jt=Le?dt:Ee,Tt=!oe||typeof oe=="function"||xt;return U.createElement("div",Object.assign({},$t,{"aria-selected":xt,className:Ot,title:nt,onMouseMove:function(){if(Pe===ie||ke)return;tt(ie)},onClick:function(){ke||ot(Qe)},style:wt}),U.createElement("div",{className:"".concat(ut,"-content")},jt||Qe),U.isValidElement(oe)||xt,Tt&&U.createElement(i.a,{className:"".concat(we,"-option-state"),customizeIcon:oe,customizeIconProps:{isSelected:xt}},xt?"\u2713":null))}))},n=U.forwardRef(o);n.displayName="OptionList";var a=n,r=function(){return null};r.isSelectOption=!0;var t=r,y=function(){return null};y.isSelectOptGroup=!0;var b=y,E=K("VTBJ"),T=K("Zm9Q");function C(N){var ee=N.key,le=N.props,Be=le.children,Ce=le.value,Me=Object(q.a)(le,["children","value"]);return Object(E.a)({key:ee,value:Ce!==void 0?Ce:ee,children:Be},Me)}function h(N){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(T.a)(N).map(function(le,Be){if(!U.isValidElement(le)||!le.type)return null;var Ce=le.type.isSelectOptGroup,Me=le.key,Le=le.props,je=Le.children,He=Object(q.a)(Le,["children"]);return ee||!Ce?C(le):Object(E.a)(Object(E.a)({key:"__RC_SELECT_GRP__".concat(Me===null?Be:Me,"__"),label:Me},He),{},{options:h(je)})}).filter(function(le){return le})}var c=K("2Qr1"),l=K("qNPg"),u=K("U8pU"),_=K("Kwbf"),g=K("WKfj");function m(N){var ee=N.mode,le=N.options,Be=N.children,Ce=N.backfill,Me=N.allowClear,Le=N.placeholder,je=N.getInputElement,He=N.showSearch,Je=N.onSearch,Se=N.defaultOpen,$=N.autoFocus,D=N.labelInValue,M=N.value,te=N.inputValue,oe=N.optionLabelProp,G=ee==="multiple"||ee==="tags",re=He!==void 0?He:G||ee==="combobox",j=le||h(Be);if(Object(_.a)(ee!=="tags"||j.every(function(we){return!we.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ee==="tags"||ee==="combobox"){var J=j.some(function(we){return we.options?we.options.some(function(Te){return typeof("value"in Te?Te.value:Te.key)=="number"}):typeof("value"in we?we.value:we.key)=="number"});Object(_.a)(!J,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(_.a)(ee!=="combobox"||!oe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(_.a)(ee==="combobox"||!Ce,"`backfill` only works with `combobox` mode."),Object(_.a)(ee==="combobox"||!je,"`getInputElement` only work with `combobox` mode."),Object(_.b)(ee!=="combobox"||!je||!Me||!Le,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Je&&!re&&ee!=="combobox"&&ee!=="tags"&&Object(_.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(_.b)(!Se||$,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),M!=null){var Y=Object(g.d)(M);Object(_.a)(!D||Y.every(function(we){return Object(u.a)(we)==="object"&&("key"in we||"value"in we)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(_.a)(!G||Array.isArray(M),"`value` should be array when `mode` is `multiple` or `tags`")}if(Be){var he=null;Object(T.a)(Be).some(function(we){if(!U.isValidElement(we)||!we.type)return!1;var Te=we.type;if(Te.isSelectOption)return!1;if(Te.isSelectOptGroup){var Xe=Object(T.a)(we.props.children).every(function(Ze){return!U.isValidElement(Ze)||!we.type||Ze.type.isSelectOption?!0:(he=Ze.type,!1)});return!Xe}return he=Te,!0}),he&&Object(_.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(he.displayName||he.name||he,"`.")),Object(_.a)(te===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var F=m,H=Object(l.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:h,flattenOptions:c.d,getLabeledValue:c.e,filterOptions:c.b,isValueDisabled:c.g,findValueOption:c.c,warningProps:F,fillOptionsWithMissingValue:c.a}),B=function(N){Object(L.a)(le,N);var ee=Object(V.a)(le);function le(){var Be;return Object(fe.a)(this,le),Be=ee.apply(this,arguments),Be.selectRef=U.createRef(),Be.focus=function(){Be.selectRef.current.focus()},Be.blur=function(){Be.selectRef.current.blur()},Be}return Object(W.a)(le,[{key:"render",value:function(){return U.createElement(H,Object.assign({ref:this.selectRef},this.props))}}]),le}(U.Component);B.Option=t,B.OptGroup=b;var Q=B,z=Oe.c=Q},MI8n:function(ft,Oe,K){"use strict";K.d(Oe,"c",function(){return U}),K.d(Oe,"b",function(){return e}),K.d(Oe,"e",function(){return I}),K.d(Oe,"a",function(){return d}),K.d(Oe,"d",function(){return p}),K.d(Oe,"f",function(){return A});var fe=K("/cxE"),W=K("pmY6"),L=K("24hK"),V=K("5Y4S"),U;(function(s){s.None=()=>W.a.None;function i(m){return(F,H=null,B)=>{let Q=!1,z;return z=m(N=>Q?void 0:(z?z.dispose():Q=!0,F.call(H,N)),null,B),Q&&z.dispose(),z}}s.once=i;function o(m,F){return b((H,B=null,Q)=>m(z=>H.call(B,F(z)),null,Q))}s.map=o;function n(m,F){return b((H,B=null,Q)=>m(z=>{F(z),H.call(B,z)},null,Q))}s.forEach=n;function a(m,F){return b((H,B=null,Q)=>m(z=>F(z)&&H.call(B,z),null,Q))}s.filter=a;function r(m){return m}s.signal=r;function t(...m){return(F,H=null,B)=>Object(W.e)(...m.map(Q=>Q(z=>F.call(H,z),null,B)))}s.any=t;function y(m,F,H){let B=H;return o(m,Q=>(B=F(B,Q),B))}s.reduce=y;function b(m){let F;const H=new e({onFirstListenerAdd(){F=m(H.fire,H)},onLastListenerRemove(){F.dispose()}});return H.event}function E(m,F,H=100,B=!1,Q){let z,N,ee,le=0;const Be=new e({leakWarningThreshold:Q,onFirstListenerAdd(){z=m(Ce=>{le++,N=F(N,Ce),B&&!ee&&(Be.fire(N),N=void 0),clearTimeout(ee),ee=setTimeout(()=>{const Me=N;N=void 0,ee=void 0,(!B||le>1)&&Be.fire(Me),le=0},H)})},onLastListenerRemove(){z.dispose()}});return Be.event}s.debounce=E;function T(m,F=(H,B)=>H===B){let H=!0,B;return a(m,Q=>{const z=H||!F(Q,B);return H=!1,B=Q,z})}s.latch=T;function C(m,F){return[s.filter(m,F),s.filter(m,H=>!F(H))]}s.split=C;function h(m,F=!1,H=[]){let B=H.slice(),Q=m(ee=>{B?B.push(ee):N.fire(ee)});const z=()=>{B&&B.forEach(ee=>N.fire(ee)),B=null},N=new e({onFirstListenerAdd(){Q||(Q=m(ee=>N.fire(ee)))},onFirstListenerDidAdd(){B&&(F?setTimeout(z):z())},onLastListenerRemove(){Q&&Q.dispose(),Q=null}});return N.event}s.buffer=h;class c{constructor(m){this.event=m}map(m){return new c(o(this.event,m))}forEach(m){return new c(n(this.event,m))}filter(m){return new c(a(this.event,m))}reduce(m,F){return new c(y(this.event,m,F))}latch(){return new c(T(this.event))}debounce(m,F=100,H=!1,B){return new c(E(this.event,m,F,H,B))}on(m,F,H){return this.event(m,F,H)}once(m,F,H){return i(this.event)(m,F,H)}}function l(m){return new c(m)}s.chain=l;function u(m,F,H=B=>B){const B=(...ee)=>N.fire(H(...ee)),Q=()=>m.on(F,B),z=()=>m.removeListener(F,B),N=new e({onFirstListenerAdd:Q,onLastListenerRemove:z});return N.event}s.fromNodeEventEmitter=u;function _(m,F,H=B=>B){const B=(...ee)=>N.fire(H(...ee)),Q=()=>m.addEventListener(F,B),z=()=>m.removeEventListener(F,B),N=new e({onFirstListenerAdd:Q,onLastListenerRemove:z});return N.event}s.fromDOMEventEmitter=_;function g(m){return new Promise(F=>i(m)(F))}s.toPromise=g})(U||(U={}));class O{constructor(s){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${s}_${O._idPool++}`}start(s){this._stopWatch=new V.a(!0),this._listenerCount=s}stop(){if(this._stopWatch){const s=this._stopWatch.elapsed();this._elapsedOverall+=s,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${s.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}O._idPool=0;let q=-1;class k{constructor(s,i=Math.random().toString(18).slice(2,5)){this.customThreshold=s,this.name=i,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(s){let i=q;if(typeof this.customThreshold=="number"&&(i=this.customThreshold),i<=0||s<i)return;this._stacks||(this._stacks=new Map);const o=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),n=this._stacks.get(o)||0;if(this._stacks.set(o,n+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=i*.5;let a,r=0;for(const[t,y]of this._stacks)(!a||r<y)&&(a=t,r=y);console.warn(`[${this.name}] potential listener LEAK detected, having ${s} listeners already. MOST frequent listener (${r}):`),console.warn(a)}return()=>{const a=this._stacks.get(o)||0;this._stacks.set(o,a-1)}}}class e{constructor(s){var i;this._disposed=!1,this._options=s,this._leakageMon=q>0?new k(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((i=this._options)===null||i===void 0?void 0:i._profName)?new O(this._options._profName):void 0}get event(){return this._event||(this._event=(s,i,o)=>{var n;this._listeners||(this._listeners=new L.a);const a=this._listeners.isEmpty();a&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const r=this._listeners.push(i?[s,i]:s);a&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,s,i);const t=(n=this._leakageMon)===null||n===void 0?void 0:n.check(this._listeners.size),y=Object(W.i)(()=>{if(t&&t(),!this._disposed&&(r(),this._options&&this._options.onLastListenerRemove)){const b=this._listeners&&!this._listeners.isEmpty();b||this._options.onLastListenerRemove(this)}});return o instanceof W.b?o.add(y):Array.isArray(o)&&o.push(y),y}),this._event}fire(s){var i,o;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new L.a);for(let n of this._listeners)this._deliveryQueue.push([n,s]);for((i=this._perfMon)===null||i===void 0||i.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[n,a]=this._deliveryQueue.shift();try{typeof n=="function"?n.call(void 0,a):n[0].call(n[1],a)}catch(r){Object(fe.f)(r)}}(o=this._perfMon)===null||o===void 0||o.stop()}}dispose(){var s,i,o,n,a;this._disposed||(this._disposed=!0,(s=this._listeners)===null||s===void 0||s.clear(),(i=this._deliveryQueue)===null||i===void 0||i.clear(),(n=(o=this._options)===null||o===void 0?void 0:o.onLastListenerRemove)===null||n===void 0||n.call(o),(a=this._leakageMon)===null||a===void 0||a.dispose())}}class I extends e{constructor(s){super(s);this._isPaused=0,this._eventQueue=new L.a,this._mergeFn=s==null?void 0:s.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const s=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(s))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(s){this._listeners&&(this._isPaused!==0?this._eventQueue.push(s):super.fire(s))}}class d extends I{constructor(s){var i;super(s);this._delay=(i=s.delay)!==null&&i!==void 0?i:100}fire(s){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(s)}}class p{constructor(){this.buffers=[]}wrapEvent(s){return(i,o,n)=>s(a=>{const r=this.buffers[this.buffers.length-1];r?r.push(()=>i.call(o,a)):i.call(o,a)},void 0,n)}bufferEvents(s){const i=[];this.buffers.push(i);const o=s();return this.buffers.pop(),i.forEach(n=>n()),o}}class A{constructor(){this.listening=!1,this.inputEvent=U.None,this.inputEventListener=W.a.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(s){this.inputEvent=s,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=s(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(ft,Oe,K){"use strict";(function(fe,W){K.d(Oe,"b",function(){return o}),K.d(Oe,"i",function(){return t}),K.d(Oe,"f",function(){return y}),K.d(Oe,"d",function(){return b}),K.d(Oe,"g",function(){return E}),K.d(Oe,"h",function(){return T}),K.d(Oe,"c",function(){return C}),K.d(Oe,"k",function(){return h}),K.d(Oe,"j",function(){return c}),K.d(Oe,"a",function(){return l}),K.d(Oe,"e",function(){return g});var L;const V="en";let U=!1,O=!1,q=!1,k=!1,e=!1,I=!1,d=!1,p,A=V,s,i;const o=typeof self=="object"?self:typeof fe=="object"?fe:{};let n;typeof o.vscode!="undefined"&&typeof o.vscode.process!="undefined"?n=o.vscode.process:typeof W!="undefined"&&(n=W);const a=typeof((L=n==null?void 0:n.versions)===null||L===void 0?void 0:L.electron)=="string"&&n.type==="renderer";if(typeof navigator=="object"&&!a)i=navigator.userAgent,U=i.indexOf("Windows")>=0,O=i.indexOf("Macintosh")>=0,d=(i.indexOf("Macintosh")>=0||i.indexOf("iPad")>=0||i.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,q=i.indexOf("Linux")>=0,I=!0,p=navigator.language,A=p;else if(typeof n=="object"){U=n.platform==="win32",O=n.platform==="darwin",q=n.platform==="linux",k=q&&!!n.env.SNAP&&!!n.env.SNAP_REVISION,p=V,A=V;const m=n.env.VSCODE_NLS_CONFIG;if(m)try{const F=JSON.parse(m),H=F.availableLanguages["*"];p=F.locale,A=H||V,s=F._translationsConfigFile}catch(F){}e=!0}else console.error("Unable to resolve platform.");let r=0;O?r=1:U?r=3:q&&(r=2);const t=U,y=O,b=q,E=e,T=I,C=d,h=i,c=function(){if(o.setImmediate)return o.setImmediate.bind(o);if(typeof o.postMessage=="function"&&!o.importScripts){let H=[];o.addEventListener("message",Q=>{if(Q.data&&Q.data.vscodeSetImmediateId)for(let z=0,N=H.length;z<N;z++){const ee=H[z];if(ee.id===Q.data.vscodeSetImmediateId){H.splice(z,1),ee.callback();return}}});let B=0;return Q=>{const z=++B;H.push({id:z,callback:Q}),o.postMessage({vscodeSetImmediateId:z},"*")}}if(typeof(n==null?void 0:n.nextTick)=="function")return n.nextTick.bind(n);const F=Promise.resolve();return H=>F.then(H)}(),l=O||d?2:U?1:3;let u=!0,_=!1;function g(){if(!_){_=!0;const m=new Uint8Array(2);m[0]=1,m[1]=2;const F=new Uint16Array(m.buffer);u=F[0]===(2<<8)+1}return u}}).call(this,K("IyRk"),K("Q2Ig"))},N0LK:function(ft,Oe,K){"use strict";K.d(Oe,"C",function(){return fe}),K.d(Oe,"v",function(){return L}),K.d(Oe,"s",function(){return V}),K.d(Oe,"t",function(){return U}),K.d(Oe,"U",function(){return O}),K.d(Oe,"J",function(){return q}),K.d(Oe,"O",function(){return k}),K.d(Oe,"p",function(){return e}),K.d(Oe,"T",function(){return I}),K.d(Oe,"q",function(){return d}),K.d(Oe,"N",function(){return p}),K.d(Oe,"M",function(){return A}),K.d(Oe,"Q",function(){return s}),K.d(Oe,"u",function(){return i}),K.d(Oe,"x",function(){return o}),K.d(Oe,"I",function(){return n}),K.d(Oe,"f",function(){return a}),K.d(Oe,"h",function(){return r}),K.d(Oe,"g",function(){return t}),K.d(Oe,"i",function(){return y}),K.d(Oe,"G",function(){return b}),K.d(Oe,"H",function(){return E}),K.d(Oe,"r",function(){return T}),K.d(Oe,"R",function(){return C}),K.d(Oe,"d",function(){return h}),K.d(Oe,"e",function(){return c}),K.d(Oe,"E",function(){return l}),K.d(Oe,"F",function(){return u}),K.d(Oe,"j",function(){return _}),K.d(Oe,"z",function(){return g}),K.d(Oe,"K",function(){return F}),K.d(Oe,"L",function(){return H}),K.d(Oe,"m",function(){return Q}),K.d(Oe,"k",function(){return N}),K.d(Oe,"A",function(){return le}),K.d(Oe,"a",function(){return Be}),K.d(Oe,"n",function(){return Ce}),K.d(Oe,"l",function(){return Me}),K.d(Oe,"D",function(){return Le}),K.d(Oe,"B",function(){return je}),K.d(Oe,"b",function(){return He}),K.d(Oe,"S",function(){return Je}),K.d(Oe,"o",function(){return Se}),K.d(Oe,"P",function(){return $}),K.d(Oe,"w",function(){return D}),K.d(Oe,"c",function(){return M}),K.d(Oe,"y",function(){return G});function fe(Y){return!Y||typeof Y!="string"?!0:Y.trim().length===0}const W=/{(\d+)}/g;function L(Y,...he){return he.length===0?Y:Y.replace(W,function(we,Te){const Xe=parseInt(Te,10);return isNaN(Xe)||Xe<0||Xe>=he.length?we:he[Xe]})}function V(Y){return Y.replace(/[<>&]/g,function(he){switch(he){case"<":return"<";case">":return">";case"&":return"&";default:return he}})}function U(Y){return Y.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function O(Y,he=" "){const we=q(Y,he);return k(we,he)}function q(Y,he){if(!Y||!he)return Y;const we=he.length;if(we===0||Y.length===0)return Y;let Te=0;for(;Y.indexOf(he,Te)===Te;)Te=Te+we;return Y.substring(Te)}function k(Y,he){if(!Y||!he)return Y;const we=he.length,Te=Y.length;if(we===0||Te===0)return Y;let Xe=Te,Ze=-1;for(;!(Ze=Y.lastIndexOf(he,Xe-1),Ze===-1||Ze+we!==Xe);){if(Ze===0)return"";Xe=Ze}return Y.substring(0,Xe)}function e(Y){return Y.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function I(Y){return Y.replace(/\*/g,"")}function d(Y,he,we={}){if(!Y)throw new Error("Cannot create regex from empty string");he||(Y=U(Y)),we.wholeWord&&(/\B/.test(Y.charAt(0))||(Y="\\b"+Y),/\B/.test(Y.charAt(Y.length-1))||(Y=Y+"\\b"));let Te="";return we.global&&(Te+="g"),we.matchCase||(Te+="i"),we.multiline&&(Te+="m"),we.unicode&&(Te+="u"),new RegExp(Y,Te)}function p(Y){if(Y.source==="^"||Y.source==="^$"||Y.source==="$"||Y.source==="^\\s*$")return!1;const he=Y.exec("");return!!(he&&Y.lastIndex===0)}function A(Y){return(Y.global?"g":"")+(Y.ignoreCase?"i":"")+(Y.multiline?"m":"")+(Y.unicode?"u":"")}function s(Y){return Y.split(/\r\n|\r|\n/)}function i(Y){for(let he=0,we=Y.length;he<we;he++){const Te=Y.charCodeAt(he);if(Te!==32&&Te!==9)return he}return-1}function o(Y,he=0,we=Y.length){for(let Te=he;Te<we;Te++){const Xe=Y.charCodeAt(Te);if(Xe!==32&&Xe!==9)return Y.substring(he,Te)}return Y.substring(he,we)}function n(Y,he=Y.length-1){for(let we=he;we>=0;we--){const Te=Y.charCodeAt(we);if(Te!==32&&Te!==9)return we}return-1}function a(Y,he){return Y<he?-1:Y>he?1:0}function r(Y,he,we=0,Te=Y.length,Xe=0,Ze=he.length){for(;we<Te&&Xe<Ze;we++,Xe++){let At=Y.charCodeAt(we),pt=he.charCodeAt(Xe);if(At<pt)return-1;if(At>pt)return 1}const et=Te-we,rt=Ze-Xe;return et<rt?-1:et>rt?1:0}function t(Y,he){return y(Y,he,0,Y.length,0,he.length)}function y(Y,he,we=0,Te=Y.length,Xe=0,Ze=he.length){for(;we<Te&&Xe<Ze;we++,Xe++){let At=Y.charCodeAt(we),pt=he.charCodeAt(Xe);if(At===pt)continue;if(At>=128||pt>=128)return r(Y.toLowerCase(),he.toLowerCase(),we,Te,Xe,Ze);b(At)&&(At-=32),b(pt)&&(pt-=32);const Pe=At-pt;if(Pe===0)continue;return Pe}const et=Te-we,rt=Ze-Xe;return et<rt?-1:et>rt?1:0}function b(Y){return Y>=97&&Y<=122}function E(Y){return Y>=65&&Y<=90}function T(Y,he){return Y.length===he.length&&y(Y,he)===0}function C(Y,he){const we=he.length;return he.length>Y.length?!1:y(Y,he,0,we)===0}function h(Y,he){let we,Te=Math.min(Y.length,he.length);for(we=0;we<Te;we++)if(Y.charCodeAt(we)!==he.charCodeAt(we))return we;return Te}function c(Y,he){let we,Te=Math.min(Y.length,he.length);const Xe=Y.length-1,Ze=he.length-1;for(we=0;we<Te;we++)if(Y.charCodeAt(Xe-we)!==he.charCodeAt(Ze-we))return we;return Te}function l(Y){return 55296<=Y&&Y<=56319}function u(Y){return 56320<=Y&&Y<=57343}function _(Y,he){return(Y-55296<<10)+(he-56320)+65536}function g(Y,he,we){const Te=Y.charCodeAt(we);if(l(Te)&&we+1<he){const Xe=Y.charCodeAt(we+1);if(u(Xe))return _(Te,Xe)}return Te}function m(Y,he){const we=Y.charCodeAt(he-1);if(u(we)&&he>1){const Te=Y.charCodeAt(he-2);if(l(Te))return _(Te,we)}return we}function F(Y,he){const we=te.getInstance(),Te=he,Xe=Y.length,Ze=g(Y,Xe,he);he+=Ze>=65536?2:1;let et=we.getGraphemeBreakType(Ze);for(;he<Xe;){const rt=g(Y,Xe,he),At=we.getGraphemeBreakType(rt);if(M(et,At))break;he+=rt>=65536?2:1,et=At}return he-Te}function H(Y,he){const we=te.getInstance(),Te=he,Xe=m(Y,he);he-=Xe>=65536?2:1;let Ze=we.getGraphemeBreakType(Xe);for(;he>0;){const et=m(Y,he),rt=we.getGraphemeBreakType(et);if(M(rt,Ze))break;he-=et>=65536?2:1,Ze=rt}return Te-he}const B=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function Q(Y){return B.test(Y)}const z=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function N(Y){return z.test(Y)}const ee=/^[\t\n\r\x20-\x7E]*$/;function le(Y){return ee.test(Y)}const Be=/[\u2028\u2029]/;function Ce(Y){return Be.test(Y)}function Me(Y){for(let he=0,we=Y.length;he<we;he++)if(Le(Y.charCodeAt(he)))return!0;return!1}function Le(Y){return Y=+Y,Y>=11904&&Y<=55215||Y>=63744&&Y<=64255||Y>=65281&&Y<=65374}function je(Y){return Y>=127462&&Y<=127487||Y===8986||Y===8987||Y===9200||Y===9203||Y>=9728&&Y<=10175||Y===11088||Y===11093||Y>=127744&&Y<=128591||Y>=128640&&Y<=128764||Y>=128992&&Y<=129003||Y>=129280&&Y<=129535||Y>=129648&&Y<=129750}const He=String.fromCharCode(65279);function Je(Y){return!!(Y&&Y.length>0&&Y.charCodeAt(0)===65279)}function Se(Y,he=!1){return Y?(he&&(Y=Y.replace(/\\./g,"")),Y.toLowerCase()!==Y):!1}function $(Y){const he=90-65+1;return Y=Y%(2*he),Y<he?String.fromCharCode(97+Y):String.fromCharCode(65+Y-he)}function D(Y){const he=te.getInstance();return he.getGraphemeBreakType(Y)}function M(Y,he){return Y===0?he!==5&&he!==7:Y===2&&he===3?!1:Y===4||Y===2||Y===3||(he===4||he===2||he===3)?!0:Y===8&&(he===8||he===9||he===11||he===12)||((Y===11||Y===9)&&(he===9||he===10)||((Y===12||Y===10)&&he===10||(he===5||he===13||(he===7||(Y===1||Y===13&&he===14)))))?!1:!(Y===6&&he===6)}class te{constructor(){this._data=oe()}static getInstance(){return te._INSTANCE||(te._INSTANCE=new te),te._INSTANCE}getGraphemeBreakType(Y){if(Y<32)return Y===10?3:Y===13?2:4;if(Y<127)return 0;const he=this._data,we=he.length/3;let Te=1;for(;Te<=we;)if(Y<he[3*Te])Te=2*Te;else if(Y>he[3*Te+1])Te=2*Te+1;else return he[3*Te+2];return 0}}te._INSTANCE=null;function oe(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function G(Y,he){if(Y===0)return 0;const we=re(Y,he);if(we!==void 0)return we;const Te=m(he,Y);return Y-=j(Te),Y}function re(Y,he){let we=m(he,Y);for(Y-=j(we);J(we)||we===65039||we===8419;){if(Y===0)return;we=m(he,Y),Y-=j(we)}if(!je(we))return;if(Y>=0){const Te=m(he,Y);Te===8205&&(Y-=j(Te))}return Y}function j(Y){return Y>=65536?2:1}function J(Y){return 127995<=Y&&Y<=127999}},NNiE:function(ft,Oe,K){"use strict";var fe=K("7Kak"),W=K("9yH6"),L=K("tJVT"),V=K("q1tI"),U=K.n(V),O=K("9Bee"),q=K("+M/w"),k=K.n(q),e=["A\uFF0E","B\uFF0E","C\uFF0E","D\uFF0E","E\uFF0E","F\uFF0E","G\uFF0E","H\uFF0E","I\uFF0E","J\uFF0E","K\uFF0E","L\uFF0E","M\uFF0E","N\uFF0E","O\uFF0E","P\uFF0E","Q\uFF0E","R\uFF0E","S\uFF0E","T\uFF0E","U\uFF0E","V\uFF0E","W\uFF0E","X\uFF0E","Y\uFF0E","Z\uFF0E"],I=function(p){var A=p.index,s=p.typeName,i=p.type,o=p.data,n=o===void 0?{}:o,a=p.inMouseId,r=p.isshow,t=p.onSetScore,y=t===void 0?function(){}:t,b=p.onDelete,E=b===void 0?function(){}:b,T=p.onMouseEnter,C=T===void 0?function(){}:T,h=p.showAnswer,c=h===void 0?!1:h,l=Object(V.useState)(!1),u=Object(L.a)(l,2),_=u[0],g=u[1],m=function(){var Ce;return U.a.createElement("div",{className:k.a.answerWrap},n==null||((Ce=n.choices)===null||Ce===void 0)?void 0:Ce.map(function(Me,Le){return U.a.createElement("div",{className:"".concat(k.a.flexRow," mt15"),key:Le},U.a.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},e[Le]),U.a.createElement("div",{className:"".concat(k.a.answer," ml5")},U.a.createElement(O.a,{value:Me==null?void 0:Me.choice_text})))}),c&&U.a.createElement("div",{className:"mt10 ".concat(k.a.answerText)},"\u53C2\u8003\u7B54\u6848\uFF1A",n==null?void 0:n.standard_answer_show))},F=function(){var Ce;return U.a.createElement("div",{className:k.a.answerWrap},U.a.createElement("div",{className:"".concat(k.a.flexRow," mt15")},n==null||((Ce=n.choices)===null||Ce===void 0)?void 0:Ce.map(function(Me,Le){return U.a.createElement(W.a,{disabled:!0,key:Le},Me==null?void 0:Me.choice_text)})),c&&U.a.createElement("div",{className:"mt10 ".concat(k.a.answerText)},"\u53C2\u8003\u7B54\u6848\uFF1A",n==null?void 0:n.standard_answer_show))},H=function(){var Ce;return U.a.createElement("div",{className:k.a.answerWrap},U.a.createElement("div",{className:"".concat(k.a.flexRow," mt15")},U.a.createElement(O.a,{value:n==null||((Ce=n.program_attr)===null||Ce===void 0)?void 0:Ce.description})))},B=function(){var Ce;return U.a.createElement("div",{className:k.a.answerWrap},c&&U.a.createElement("div",{className:"".concat(k.a.flexColumn," mt15")},n==null||((Ce=n.standard_answer)===null||Ce===void 0)?void 0:Ce.map(function(Me,Le){return U.a.createElement(O.a,{key:Le,value:"\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A".concat(Me.position,"\uFF09\uFF1A").concat(Me.answer_text.join("\u3001"))})})))},Q=function(){var Ce;return U.a.createElement("div",{className:k.a.answerWrap},c&&U.a.createElement("div",{className:"mt15"},U.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A"),U.a.createElement(O.a,{value:n==null||((Ce=n.answer_texts)===null||Ce===void 0)?void 0:Ce[0]})))},z=function(){var Ce;return U.a.createElement("div",{className:k.a.answerWrap},U.a.createElement("div",{className:"mt10"},"\u5173\u5361"),n==null||((Ce=n.shixun)===null||Ce===void 0)?void 0:Ce.map(function(Me,Le){return U.a.createElement("div",{className:"mt10 font14",key:Le},Le+1,". ",Me==null?void 0:Me.challenge_name)}))},N=function(){var Ce;return U.a.createElement("div",{className:k.a.answerWrap,style:{display:_&&"none"}},n==null||((Ce=n.sub_questions)===null||Ce===void 0)?void 0:Ce.map(function(Me,Le){var je,He='<span style="margin-right: 10px">'.concat(A+1,".").concat(Le+1,'</span><span>\uFF08\u5355\u9009\u9898\uFF09</span><span class="c-grey-999">\uFF08').concat(Me.score,"\u5206\uFF09</span>");return U.a.createElement(V.Fragment,{key:Me==null?void 0:Me.id},U.a.createElement("div",{className:k.a.titleWrap,style:{marginTop:16}},U.a.createElement(O.a,{className:k.a.titleHtml,value:He+Me.name})),Me==null||((je=Me.choices)===null||je===void 0)?void 0:je.map(function(Je,Se){return U.a.createElement("div",{className:"".concat(k.a.flexRow," mt15"),key:Se},U.a.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},e[Se]),U.a.createElement("div",{className:"".concat(k.a.answer," ml5")},U.a.createElement(O.a,{value:Je==null?void 0:Je.choice_text})))}),c&&U.a.createElement("div",{className:"mt10 ".concat(k.a.answerText)},"\u53C2\u8003\u7B54\u6848\uFF1A",Me==null?void 0:Me.standard_answer_show))}))},ee=function(){var Ce={SINGLE:m,MULTIPLE:m,JUDGMENT:F,PROGRAM:H,COMPLETION:B,SUBJECTIVE:Q,PRACTICAL:z,COMBINATION:N};return Ce[i]?Ce[i]():null},le=function(Ce,Me){var Le,je='<span style="margin-right: -10px">'.concat(Me+1,'\u3001</span><span class="c-grey-999">\uFF08').concat((Ce==null?void 0:Ce.item_type)==="combination"?"\u5171".concat(Ce==null||((Le=Ce.sub_questions)===null||Le===void 0)?void 0:Le.length,"\u5C0F\u9898\uFF0C"):"").concat(Ce.score,"\u5206\uFF09</span> ");return je};return U.a.createElement("div",{onMouseEnter:function(){return C(n.id)}},a===n.id&&U.a.createElement("div",{className:k.a.action},U.a.createElement("div",{className:k.a.setScore,onClick:function(){return y(n.id,s,n==null?void 0:n.shixun,n.score,n)}},"\u8BBE\u7F6E\u5F97\u5206"),U.a.createElement("div",{className:k.a.delete,onClick:function(){return E(n.id)}},"\u5220\u9664")),U.a.createElement("div",{className:k.a.content},U.a.createElement("div",{className:k.a.titleWrap,style:{justifyContent:"space-between"}},U.a.createElement(O.a,{className:k.a.titleHtml,value:le(n,A)+((n==null?void 0:n.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":"")+(n.name||(n==null?void 0:n.shixun_name))}),(n==null?void 0:n.item_type)==="combination"&&!r&&U.a.createElement("span",{onClick:function(Ce){g(!_)},style:{textAlign:"end",flexShrink:0}},_?"\u5C55\u5F00":"\u6536\u8D77")),ee()))};Oe.a=I},NvD2:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return O});var fe=K("Kwbf");function W(q,k){var e=new Set;return q.forEach(function(I){k.has(I)||e.add(I)}),e}function L(q){var k=q||{},e=k.disabled,I=k.disableCheckbox,d=k.checkable;return!!(e||I)||d===!1}function V(q,k,e,I){for(var d=new Set(q),p=new Set,A=0;A<=e;A+=1){var s=k.get(A)||new Set;s.forEach(function(a){var r=a.key,t=a.node,y=a.children,b=y===void 0?[]:y;d.has(r)&&!I(t)&&b.filter(function(E){return!I(E.node)}).forEach(function(E){d.add(E.key)})})}for(var i=new Set,o=e;o>=0;o-=1){var n=k.get(o)||new Set;n.forEach(function(a){var r=a.parent,t=a.node;if(I(t)||!a.parent||i.has(a.parent.key))return;if(I(a.parent.node)){i.add(r.key);return}var y=!0,b=!1;(r.children||[]).filter(function(E){return!I(E.node)}).forEach(function(E){var T=E.key,C=d.has(T);y&&!C&&(y=!1),!b&&(C||p.has(T))&&(b=!0)}),y&&d.add(r.key),b&&p.add(r.key),i.add(r.key)})}return{checkedKeys:Array.from(d),halfCheckedKeys:Array.from(W(p,d))}}function U(q,k,e,I,d){for(var p=new Set(q),A=new Set(k),s=0;s<=I;s+=1){var i=e.get(s)||new Set;i.forEach(function(r){var t=r.key,y=r.node,b=r.children,E=b===void 0?[]:b;!p.has(t)&&!A.has(t)&&!d(y)&&E.filter(function(T){return!d(T.node)}).forEach(function(T){p.delete(T.key)})})}A=new Set;for(var o=new Set,n=I;n>=0;n-=1){var a=e.get(n)||new Set;a.forEach(function(r){var t=r.parent,y=r.node;if(d(y)||!r.parent||o.has(r.parent.key))return;if(d(r.parent.node)){o.add(t.key);return}var b=!0,E=!1;(t.children||[]).filter(function(T){return!d(T.node)}).forEach(function(T){var C=T.key,h=p.has(C);b&&!h&&(b=!1),!E&&(h||A.has(C))&&(E=!0)}),b||p.delete(t.key),E&&A.add(t.key),o.add(t.key)})}return{checkedKeys:Array.from(p),halfCheckedKeys:Array.from(W(A,p))}}function O(q,k,e,I){var d=[],p;I?p=I:p=L;var A=new Set(q.filter(function(n){var a=!!e[n];return a||d.push(n),a})),s=new Map,i=0;Object.keys(e).forEach(function(n){var a=e[n],r=a.level,t=s.get(r);t||(t=new Set,s.set(r,t)),t.add(a),i=Math.max(i,r)}),Object(fe.a)(!d.length,"Tree missing follow keys: ".concat(d.slice(0,100).map(function(n){return"'".concat(n,"'")}).join(", ")));var o;return k===!0?o=V(A,s,i,p):o=U(A,k.halfCheckedKeys,s,i,p),o}},ORPY:function(ft,Oe,K){ft.exports={sendToClass:"sendToClass___2FQ8x"}},OZM5:function(ft,Oe,K){"use strict";K.d(Oe,"b",function(){return I}),K.d(Oe,"a",function(){return d}),K.d(Oe,"k",function(){return p}),K.d(Oe,"h",function(){return A}),K.d(Oe,"i",function(){return s}),K.d(Oe,"g",function(){return i}),K.d(Oe,"c",function(){return o}),K.d(Oe,"d",function(){return n}),K.d(Oe,"j",function(){return t}),K.d(Oe,"e",function(){return y}),K.d(Oe,"f",function(){return b});var fe=K("KQm4"),W=K("U8pU"),L=K("Ff2n"),V=K("q1tI"),U=K.n(V),O=K("Kwbf"),q=K("WaYH"),k=.25,e=2;function I(E,T){var C=E.slice(),h=C.indexOf(T);return h>=0&&C.splice(h,1),C}function d(E,T){var C=E.slice();return C.indexOf(T)===-1&&C.push(T),C}function p(E){return E.split("-")}function A(E,T){return"".concat(E,"-").concat(T)}function s(E){return E&&E.type&&E.type.isTreeNode}function i(E,T){var C=[E],h=T[E];function c(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];l.forEach(function(u){var _=u.key,g=u.children;C.push(_),c(g)})}return c(h.children),C}function o(E,T){var C=E.clientY,h=T.selectHandle.getBoundingClientRect(),c=h.top,l=h.bottom,u=h.height,_=Math.max(u*k,e);return C<=c+_?-1:C>=l-_?1:0}function n(E,T){if(!E)return;var C=T.multiple;return C?E.slice():E.length?[E[0]]:E}var a=function(T){return T};function r(E,T){if(!E)return[];var C=T||{},h=C.processProps,c=h===void 0?a:h,l=Array.isArray(E)?E:[E];return l.map(function(u){var _=u.children,g=Object(L.a)(u,["children"]),m=r(_,T);return U.a.createElement(q.a,Object.assign({},c(g)),m)})}function t(E){if(!E)return null;var T;if(Array.isArray(E))T={checkedKeys:E,halfCheckedKeys:void 0};else if(Object(W.a)(E)==="object")T={checkedKeys:E.checked||void 0,halfCheckedKeys:E.halfChecked||void 0};else return Object(O.a)(!1,"`checkedKeys` is not an array or an object"),null;return T}function y(E,T){var C=new Set;function h(c){if(C.has(c))return;var l=T[c];if(!l)return;C.add(c);var u=l.parent,_=l.node;if(_.disabled)return;u&&h(u.key)}return(E||[]).forEach(function(c){h(c)}),Object(fe.a)(C)}function b(E){var T={};return Object.keys(E).forEach(function(C){(C.startsWith("data-")||C.startsWith("aria-"))&&(T[C]=E[C])}),T}},PEfE:function(ft,Oe,K){ft.exports={title:"title___316_5",radioWrap:"radioWrap___2b58p",row:"row___3Y_zu",radio:"radio___3wz7l",colorFF0000:"colorFF0000___3JfbP",pagination:"pagination___3UF9N",modalColumn:"modalColumn___2C76i",modalRow:"modalRow___3eIQ6",sup:"sup___1b5Qg"}},"SA+Z":function(ft,Oe,K){var fe=K("wTVA"),W=K("EbDI"),L=K("ZhPi"),V=K("wkBT");function U(O){return fe(O)||W(O)||L(O)||V()}ft.exports=U,ft.exports.__esModule=!0,ft.exports.default=ft.exports},SJMd:function(ft,Oe){/**
|
|
* @license
|
|
* Copyright (C) 2006 Google Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/var K,fe,W,L=!1,V,U;window.PR_SHOULD_USE_CONTINUATION=!0;var O,q;(function(){var k=window,e=["break,continue,do,else,for,if,return,while"],I=[e,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],d=[I,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],p=[d,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],A=[d,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],s=[d,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],i="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",o=[d,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],n="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",a=[e,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],r=[e,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],t=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],y=[p,s,A,o,n,a,r,t],b=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,E="str",T="kwd",C="com",h="typ",c="lit",l="pun",u="pln",_="tag",g="dec",m="src",F="atn",H="atv",B="nocode",Q="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function z(re){for(var j=0,J=!1,Y=!1,he=0,we=re.length;he<we;++he){var Te=re[he];if(Te.ignoreCase)Y=!0;else if(/[a-z]/i.test(Te.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){J=!0,Y=!1;break}}var Xe={b:8,t:9,n:10,v:11,f:12,r:13};function Ze(Pe){var Ye=Pe.charCodeAt(0);if(Ye!==92)return Ye;var tt=Pe.charAt(1);return Ye=Xe[tt],Ye||("0"<=tt&&tt<="7"?parseInt(Pe.substring(1),8):tt==="u"||tt==="x"?parseInt(Pe.substring(2),16):Pe.charCodeAt(1))}function et(Pe){if(Pe<32)return(Pe<16?"\\x0":"\\x")+Pe.toString(16);var Ye=String.fromCharCode(Pe);return Ye==="\\"||Ye==="-"||Ye==="]"||Ye==="^"?"\\"+Ye:Ye}function rt(Pe){var Ye=Pe.substring(1,Pe.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),tt=[],ot=Ye[0]==="^",pe=["["];ot&&pe.push("^");for(var ne=ot?1:0,ie=Ye.length;ne<ie;++ne){var de=Ye[ne];if(/\\[bdsw]/i.test(de))pe.push(de);else{var ge=Ze(de),se;ne+2<ie&&Ye[ne+1]==="-"?(se=Ze(Ye[ne+2]),ne+=2):se=ge,tt.push([ge,se]),se<65||ge>122||(se<65||ge>90||tt.push([Math.max(65,ge)|32,Math.min(se,90)|32]),se<97||ge>122||tt.push([Math.max(97,ge)&~32,Math.min(se,122)&~32]))}}tt.sort(function(ke,Qe){return ke[0]-Qe[0]||Qe[1]-ke[1]});for(var Ae=[],Ee=[],ne=0;ne<tt.length;++ne){var xe=tt[ne];xe[0]<=Ee[1]+1?Ee[1]=Math.max(Ee[1],xe[1]):Ae.push(Ee=xe)}for(var ne=0;ne<Ae.length;++ne){var xe=Ae[ne];pe.push(et(xe[0])),xe[1]>xe[0]&&(xe[1]+1>xe[0]&&pe.push("-"),pe.push(et(xe[1])))}return pe.push("]"),pe.join("")}function At(Pe){for(var Ye=Pe.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),tt=Ye.length,ot=[],pe=0,ne=0;pe<tt;++pe){var ie=Ye[pe];if(ie==="(")++ne;else if(ie.charAt(0)==="\\"){var de=+ie.substring(1);de&&(de<=ne?ot[de]=-1:Ye[pe]=et(de))}}for(var pe=1;pe<ot.length;++pe)ot[pe]===-1&&(ot[pe]=++j);for(var pe=0,ne=0;pe<tt;++pe){var ie=Ye[pe];if(ie==="(")++ne,ot[ne]||(Ye[pe]="(?:");else if(ie.charAt(0)==="\\"){var de=+ie.substring(1);de&&de<=ne&&(Ye[pe]="\\"+ot[de])}}for(var pe=0;pe<tt;++pe)Ye[pe]==="^"&&Ye[pe+1]!=="^"&&(Ye[pe]="");if(Pe.ignoreCase&&J)for(var pe=0;pe<tt;++pe){var ie=Ye[pe],ge=ie.charAt(0);ie.length>=2&&ge==="["?Ye[pe]=rt(ie):ge!=="\\"&&(Ye[pe]=ie.replace(/[a-zA-Z]/g,function(Ee){var xe=Ee.charCodeAt(0);return"["+String.fromCharCode(xe&~32,xe|32)+"]"}))}return Ye.join("")}for(var pt=[],he=0,we=re.length;he<we;++he){var Te=re[he];if(Te.global||Te.multiline)throw new Error(""+Te);pt.push("(?:"+At(Te)+")")}return new RegExp(pt.join("|"),Y?"gi":"g")}function N(re,j){var J=/(?:^|\s)nocode(?:\s|$)/,Y=[],he=0,we=[],Te=0;function Xe(Ze){var et=Ze.nodeType;if(et==1){if(J.test(Ze.className))return;for(var rt=Ze.firstChild;rt;rt=rt.nextSibling)Xe(rt);var At=Ze.nodeName.toLowerCase();(At==="br"||At==="li")&&(Y[Te]=`
|
|
`,we[Te<<1]=he++,we[Te++<<1|1]=Ze)}else if(et==3||et==4){var pt=Ze.nodeValue;pt.length&&(j?pt=pt.replace(/\r\n?/g,`
|
|
`):pt=pt.replace(/[ \t\r\n]+/g," "),Y[Te]=pt,we[Te<<1]=he,he+=pt.length,we[Te++<<1|1]=Ze)}}return Xe(re),{sourceCode:Y.join("").replace(/\n$/,""),spans:we}}function ee(re,j,J,Y,he){if(!J)return;var we={sourceNode:re,pre:1,langExtension:null,numberLines:null,sourceCode:J,spans:null,basePos:j,decorations:null};Y(we),he.push.apply(he,we.decorations)}var le=/\S/;function Be(re){for(var j=void 0,J=re.firstChild;J;J=J.nextSibling){var Y=J.nodeType;j=Y===1?j?re:J:Y===3&&le.test(J.nodeValue)?re:j}return j===re?void 0:j}function Ce(re,j){var J={},Y;(function(){for(var Te=re.concat(j),Xe=[],Ze={},et=0,rt=Te.length;et<rt;++et){var At=Te[et],pt=At[3];if(pt)for(var Pe=pt.length;--Pe>=0;)J[pt.charAt(Pe)]=At;var Ye=At[1],tt=""+Ye;Ze.hasOwnProperty(tt)||(Xe.push(Ye),Ze[tt]=null)}Xe.push(/[\0-\uffff]/),Y=z(Xe)})();var he=j.length,we=function(Te){for(var Xe=Te.sourceCode,Ze=Te.basePos,et=Te.sourceNode,rt=[Ze,u],At=0,pt=Xe.match(Y)||[],Pe={},Ye=0,tt=pt.length;Ye<tt;++Ye){var ot=pt[Ye],pe=Pe[ot],ne=void 0,ie;if(typeof pe=="string")ie=!1;else{var de=J[ot.charAt(0)];if(de)ne=ot.match(de[1]),pe=de[0];else{for(var ge=0;ge<he;++ge)if(de=j[ge],ne=ot.match(de[1]),ne){pe=de[0];break}ne||(pe=u)}ie=pe.length>=5&&pe.substring(0,5)==="lang-",ie&&!(ne&&typeof ne[1]=="string")&&(ie=!1,pe=m),ie||(Pe[ot]=pe)}var se=At;if(At+=ot.length,!ie)rt.push(Ze+se,pe);else{var Ae=ne[1],Ee=ot.indexOf(Ae),xe=Ee+Ae.length;ne[2]&&(xe=ot.length-ne[2].length,Ee=xe-Ae.length);var ke=pe.substring(5);ee(et,Ze+se,ot.substring(0,Ee),we,rt),ee(et,Ze+se+Ee,Ae,$(ke,Ae),rt),ee(et,Ze+se+xe,ot.substring(xe),we,rt)}}Te.decorations=rt};return we}function Me(re){var j=[],J=[];re.tripleQuotedStrings?j.push([E,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):re.multiLineStrings?j.push([E,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):j.push([E,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),re.verbatimStrings&&J.push([E,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Y=re.hashComments;Y&&(re.cStyleComments?(Y>1?j.push([C,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):j.push([C,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),J.push([E,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):j.push([C,/^#[^\r\n]*/,null,"#"])),re.cStyleComments&&(J.push([C,/^\/\/[^\r\n]*/,null]),J.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var he=re.regexLiterals;if(he){var we=he>1?"":`
|
|
\r`,Te=we?".":"[\\S\\s]",Xe="/(?=[^/*"+we+"])(?:[^/\\x5B\\x5C"+we+"]|\\x5C"+Te+"|\\x5B(?:[^\\x5C\\x5D"+we+"]|\\x5C"+Te+")*(?:\\x5D|$))+/";J.push(["lang-regex",RegExp("^"+Q+"("+Xe+")")])}var Ze=re.types;Ze&&J.push([h,Ze]);var et=(""+re.keywords).replace(/^ | $/g,"");et.length&&J.push([T,new RegExp("^(?:"+et.replace(/[\s,]+/g,"|")+")\\b"),null]),j.push([u,/^\s+/,null,` \r
|
|
\xA0`]);var rt="^.[^\\s\\w.$@'\"`/\\\\]*";return re.regexLiterals&&(rt+="(?!s*/)"),J.push([c,/^@[a-z_$][a-z_$@0-9]*/i,null],[h,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[u,/^[a-z_$][a-z_$@0-9]*/i,null],[c,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[u,/^\\[\s\S]?/,null],[l,new RegExp(rt),null]),Ce(j,J)}var Le=Me({keywords:y,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function je(re,j,J){for(var Y=/(?:^|\s)nocode(?:\s|$)/,he=/\r\n?|\n/,we=re.ownerDocument,Te=we.createElement("li");re.firstChild;)Te.appendChild(re.firstChild);var Xe=[Te];function Ze(Ye){var tt=Ye.nodeType;if(tt==1&&!Y.test(Ye.className))if(Ye.nodeName==="br")et(Ye),Ye.parentNode&&Ye.parentNode.removeChild(Ye);else for(var ot=Ye.firstChild;ot;ot=ot.nextSibling)Ze(ot);else if((tt==3||tt==4)&&J){var pe=Ye.nodeValue,ne=pe.match(he);if(ne){var ie=pe.substring(0,ne.index);Ye.nodeValue=ie;var de=pe.substring(ne.index+ne[0].length);if(de){var ge=Ye.parentNode;ge.insertBefore(we.createTextNode(de),Ye.nextSibling)}et(Ye),ie||Ye.parentNode.removeChild(Ye)}}}function et(Ye){for(;!Ye.nextSibling;)if(Ye=Ye.parentNode,!Ye)return;function tt(ne,ie){var de=ie?ne.cloneNode(!1):ne,ge=ne.parentNode;if(ge){var se=tt(ge,1),Ae=ne.nextSibling;se.appendChild(de);for(var Ee=Ae;Ee;Ee=Ae)Ae=Ee.nextSibling,se.appendChild(Ee)}return de}for(var ot=tt(Ye.nextSibling,0),pe;(pe=ot.parentNode)&&pe.nodeType===1;)ot=pe;Xe.push(ot)}for(var rt=0;rt<Xe.length;++rt)Ze(Xe[rt]);j===(j|0)&&Xe[0].setAttribute("value",j);var At=we.createElement("ol");At.className="linenums";for(var pt=Math.max(0,j-1|0)||0,rt=0,Pe=Xe.length;rt<Pe;++rt)Te=Xe[rt],Te.className="L"+(rt+pt)%10,Te.firstChild||Te.appendChild(we.createTextNode("\xA0")),At.appendChild(Te);re.appendChild(At)}function He(re){var j=/\bMSIE\s(\d+)/.exec(navigator.userAgent);j=j&&+j[1]<=8;var J=/\n/g,Y=re.sourceCode,he=Y.length,we=0,Te=re.spans,Xe=Te.length,Ze=0,et=re.decorations,rt=et.length,At=0;et[rt]=he;var pt,Pe;for(Pe=pt=0;Pe<rt;)et[Pe]!==et[Pe+2]?(et[pt++]=et[Pe++],et[pt++]=et[Pe++]):Pe+=2;for(rt=pt,Pe=pt=0;Pe<rt;){for(var Ye=et[Pe],tt=et[Pe+1],ot=Pe+2;ot+2<=rt&&et[ot+1]===tt;)ot+=2;et[pt++]=Ye,et[pt++]=tt,Pe=ot}rt=et.length=pt;var pe=re.sourceNode,ne="";pe&&(ne=pe.style.display,pe.style.display="none");try{for(var ie=null;Ze<Xe;){var de=Te[Ze],ge=Te[Ze+2]||he,se=et[At+2]||he,ot=Math.min(ge,se),Ae=Te[Ze+1],Ee;if(Ae.nodeType!==1&&(Ee=Y.substring(we,ot))){j&&(Ee=Ee.replace(J,"\r")),Ae.nodeValue=Ee;var xe=Ae.ownerDocument,ke=xe.createElement("span");ke.className=et[At+1];var Qe=Ae.parentNode;Qe.replaceChild(ke,Ae),ke.appendChild(Ae),we<ge&&(Te[Ze+1]=Ae=xe.createTextNode(Y.substring(ot,ge)),Qe.insertBefore(Ae,ke.nextSibling))}we=ot,we>=ge&&(Ze+=2),we>=se&&(At+=2)}}finally{pe&&(pe.style.display=ne)}}var Je={};function Se(re,j){for(var J=j.length;--J>=0;){var Y=j[J];Je.hasOwnProperty(Y)?k.console&&console.warn("cannot override language handler %s",Y):Je[Y]=re}}function $(re,j){return re&&Je.hasOwnProperty(re)||(re=/^\s*</.test(j)?"default-markup":"default-code"),Je[re]}Se(Le,["default-code"]),Se(Ce([],[[u,/^[^<?]+/],[g,/^<!\w[^>]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[l,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),Se(Ce([[u,/^[\s]+/,null,` \r
|
|
`],[H,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[_,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[F,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[l,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),Se(Ce([],[[H,/^[\s\S]+/]]),["uq.val"]),Se(Me({keywords:p,hashComments:!0,cStyleComments:!0,types:b}),["c","cc","cpp","cxx","cyc","m"]),Se(Me({keywords:"null,true,false"}),["json"]),Se(Me({keywords:s,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:b}),["cs"]),Se(Me({keywords:A,cStyleComments:!0}),["java"]),Se(Me({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),Se(Me({keywords:a,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),Se(Me({keywords:n,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),Se(Me({keywords:r,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),Se(Me({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),Se(Me({keywords:i,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),Se(Ce([],[[E,/^[\s\S]+/]]),["regex"]);function D(re){var j=re.langExtension;try{var J=N(re.sourceNode,re.pre),Y=J.sourceCode;re.sourceCode=Y,re.spans=J.spans,re.basePos=0,$(j,Y)(re),He(re)}catch(he){k.console&&console.log(he&&he.stack||he)}}function M(re,j,J){var Y=J||!1,he=j||null,we=document.createElement("div");we.innerHTML="<pre>"+re+"</pre>",we=we.firstChild,Y&&je(we,Y,!0);var Te={langExtension:he,numberLines:Y,sourceNode:we,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return D(Te),we.innerHTML}function te(re,j){var J=j||document.body,Y=J.ownerDocument||document;function he(de){return J.getElementsByTagName(de)}for(var we=[he("pre"),he("code"),he("xmp")],Te=[],Xe=0;Xe<we.length;++Xe)for(var Ze=0,et=we[Xe].length;Ze<et;++Ze)Te.push(we[Xe][Ze]);we=null;var rt=Date;rt.now||(rt={now:function(){return+new Date}});var At=0,pt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Pe=/\bprettyprint\b/,Ye=/\bprettyprinted\b/,tt=/pre|xmp/i,ot=/^code$/i,pe=/^(?:pre|code|xmp)$/i,ne={};function ie(){for(var de=k.PR_SHOULD_USE_CONTINUATION?rt.now()+250:Infinity;At<Te.length&&rt.now()<de;At++){for(var ge=Te[At],se=ne,Ae=ge;Ae=Ae.previousSibling;){var Ee=Ae.nodeType,xe=(Ee===7||Ee===8)&&Ae.nodeValue;if(xe?!/^\??prettify\b/.test(xe):Ee!==3||/\S/.test(Ae.nodeValue))break;if(xe){se={},xe.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Yt,Qt,Xt){se[Qt]=Xt});break}}var ke=ge.className;if((se!==ne||Pe.test(ke))&&!Ye.test(ke)){for(var Qe=!1,nt=ge.parentNode;nt;nt=nt.parentNode){var dt=nt.tagName;if(pe.test(dt)&&nt.className&&Pe.test(nt.className)){Qe=!0;break}}if(!Qe){ge.className+=" prettyprinted";var wt=se.lang;if(!wt){wt=ke.match(pt);var gt;!wt&&(gt=Be(ge))&&ot.test(gt.tagName)&&(wt=gt.className.match(pt)),wt&&(wt=wt[1])}var $t;if(tt.test(ge.tagName))$t=1;else{var xt=ge.currentStyle,ut=Y.defaultView,Ot=xt?xt.whiteSpace:ut&&ut.getComputedStyle?ut.getComputedStyle(ge,null).getPropertyValue("white-space"):0;$t=Ot&&Ot.substring(0,3)==="pre"}var jt=se.linenums;(jt=jt==="true"||+jt)||(jt=ke.match(/\blinenums\b(?::(\d+))?/),jt=jt?jt[1]&&jt[1].length?+jt[1]:!0:!1),jt&&je(ge,jt,$t);var Tt={langExtension:wt,sourceNode:ge,numberLines:jt,pre:$t,sourceCode:null,basePos:null,spans:null,decorations:null};D(Tt)}}}At<Te.length?k.setTimeout(ie,250):typeof re=="function"&&re()}ie()}var oe=k.PR={createSimpleLexer:Ce,registerLangHandler:Se,sourceDecorator:Me,PR_ATTRIB_NAME:F,PR_ATTRIB_VALUE:H,PR_COMMENT:C,PR_DECLARATION:g,PR_KEYWORD:T,PR_LITERAL:c,PR_NOCODE:B,PR_PLAIN:u,PR_PUNCTUATION:l,PR_SOURCE:m,PR_STRING:E,PR_TAG:_,PR_TYPE:h,prettyPrintOne:L?k.prettyPrintOne=M:O=M,prettyPrint:q=L?k.prettyPrint=te:q=te},G=k.define;typeof G=="function"&&G.amd&&G("google-code-prettify",[],function(){return oe})})()},STEk:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return Se});/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var fe=function($,D){return(fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,te){M.__proto__=te}||function(M,te){for(var oe in te)Object.prototype.hasOwnProperty.call(te,oe)&&(M[oe]=te[oe])})($,D)};function W($,D){function M(){this.constructor=$}fe($,D),$.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}function L($,D,M,te){return new(M||(M=Promise))(function(oe,G){function re(Y){try{J(te.next(Y))}catch(he){G(he)}}function j(Y){try{J(te.throw(Y))}catch(he){G(he)}}function J(Y){var he;Y.done?oe(Y.value):(he=Y.value,he instanceof M?he:new M(function(we){we(he)})).then(re,j)}J((te=te.apply($,D||[])).next())})}function V($,D){var M,te,oe,G,re={label:0,sent:function(){if(1&oe[0])throw oe[1];return oe[1]},trys:[],ops:[]};return G={next:j(0),throw:j(1),return:j(2)},typeof Symbol=="function"&&(G[Symbol.iterator]=function(){return this}),G;function j(J){return function(Y){return function(he){if(M)throw new TypeError("Generator is already executing.");for(;re;)try{if(M=1,te&&(oe=2&he[0]?te.return:he[0]?te.throw||((oe=te.return)&&oe.call(te),0):te.next)&&!(oe=oe.call(te,he[1])).done)return oe;switch(te=0,oe&&(he=[2&he[0],oe.value]),he[0]){case 0:case 1:oe=he;break;case 4:return re.label++,{value:he[1],done:!1};case 5:re.label++,te=he[1],he=[0];continue;case 7:he=re.ops.pop(),re.trys.pop();continue;default:if(!(oe=re.trys,(oe=oe.length>0&&oe[oe.length-1])||he[0]!==6&&he[0]!==2)){re=0;continue}if(he[0]===3&&(!oe||he[1]>oe[0]&&he[1]<oe[3])){re.label=he[1];break}if(he[0]===6&&re.label<oe[1]){re.label=oe[1],oe=he;break}if(oe&&re.label<oe[2]){re.label=oe[2],re.ops.push(he);break}oe[2]&&re.ops.pop(),re.trys.pop();continue}he=D.call($,re)}catch(we){he=[6,we],te=0}finally{M=oe=0}if(5&he[0])throw he[1];return{value:he[0]?he[1]:void 0,done:!0}}([J,Y])}}}function U(){for(var $=0,D=0,M=arguments.length;D<M;D++)$+=arguments[D].length;var te=Array($),oe=0;for(D=0;D<M;D++)for(var G=arguments[D],re=0,j=G.length;re<j;re++,oe++)te[oe]=G[re];return te}var O=function(){function $(){}return $.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},$.setAttributes=function(D,M){for(var te=0,oe=M;te<oe.length;te++){var G=oe[te],re=G[0],j=G[1];D.setAttribute(re,j)}},$.createRect=function(D,M,te){var oe=document.createElementNS("http://www.w3.org/2000/svg","rect");return oe.setAttribute("width",D.toString()),oe.setAttribute("height",M.toString()),te&&$.setAttributes(oe,te),oe},$.createLine=function(D,M,te,oe,G){var re=document.createElementNS("http://www.w3.org/2000/svg","line");return re.setAttribute("x1",D.toString()),re.setAttribute("y1",M.toString()),re.setAttribute("x2",te.toString()),re.setAttribute("y2",oe.toString()),G&&$.setAttributes(re,G),re},$.createPolygon=function(D,M){var te=document.createElementNS("http://www.w3.org/2000/svg","polygon");return te.setAttribute("points",D),M&&$.setAttributes(te,M),te},$.createCircle=function(D,M){var te=document.createElementNS("http://www.w3.org/2000/svg","circle");return te.setAttribute("cx",(D/2).toString()),te.setAttribute("cy",(D/2).toString()),te.setAttribute("r",D.toString()),M&&$.setAttributes(te,M),te},$.createEllipse=function(D,M,te){var oe=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return oe.setAttribute("cx",(D/2).toString()),oe.setAttribute("cy",(M/2).toString()),oe.setAttribute("rx",(D/2).toString()),oe.setAttribute("ry",(M/2).toString()),te&&$.setAttributes(oe,te),oe},$.createGroup=function(D){var M=document.createElementNS("http://www.w3.org/2000/svg","g");return D&&$.setAttributes(M,D),M},$.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},$.createMarker=function(D,M,te,oe,G,re,j){var J=document.createElementNS("http://www.w3.org/2000/svg","marker");return $.setAttributes(J,[["id",D],["orient",M],["markerWidth",te.toString()],["markerHeight",oe.toString()],["refX",G.toString()],["refY",re.toString()]]),J.appendChild(j),J},$.createText=function(D){var M=document.createElementNS("http://www.w3.org/2000/svg","text");return M.setAttribute("x","0"),M.setAttribute("y","0"),D&&$.setAttributes(M,D),M},$.createTSpan=function(D,M){var te=document.createElementNS("http://www.w3.org/2000/svg","tspan");return te.textContent=D,M&&$.setAttributes(te,M),te},$.createImage=function(D){var M=document.createElementNS("http://www.w3.org/2000/svg","image");return D&&$.setAttributes(M,D),M},$.createPoint=function(D,M){var te=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return te.x=D,te.y=M,te},$.createPath=function(D,M){var te=document.createElementNS("http://www.w3.org/2000/svg","path");return te.setAttribute("d",D),M&&$.setAttributes(te,M),te},$}(),q=function(){function $(){}return $.addKey=function(D){$.key=D},Object.defineProperty($,"isLicensed",{get:function(){return!!$.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test($.key)},enumerable:!1,configurable:!0}),$}(),k=function(){function $(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return $.prototype.rasterize=function(D,M,te){var oe=this;return new Promise(function(G){var re=te!==void 0?te:document.createElement("canvas");D===null&&(oe.markersOnly=!0,oe.naturalSize=!1);var j=document.createElementNS("http://www.w3.org/2000/svg","svg");j.setAttribute("xmlns","http://www.w3.org/2000/svg"),j.setAttribute("width",M.width.baseVal.valueAsString),j.setAttribute("height",M.height.baseVal.valueAsString),j.setAttribute("viewBox","0 0 "+M.viewBox.baseVal.width.toString()+" "+M.viewBox.baseVal.height.toString()),j.innerHTML=M.innerHTML,oe.naturalSize===!0?(j.width.baseVal.value=D.naturalWidth,j.height.baseVal.value=D.naturalHeight):oe.width!==void 0&&oe.height!==void 0&&(j.width.baseVal.value=oe.width,j.height.baseVal.value=oe.height),re.width=j.width.baseVal.value,re.height=j.height.baseVal.value;var J=j.outerHTML,Y=re.getContext("2d");oe.markersOnly!==!0&&Y.drawImage(D,0,0,re.width,re.height);var he=window.URL,we=new Image(re.width,re.height);we.setAttribute("crossOrigin","anonymous");var Te=new Blob([J],{type:"image/svg+xml"}),Xe=he.createObjectURL(Te);we.onload=function(){Y.drawImage(we,0,0),he.revokeObjectURL(Xe);var Ze=re.toDataURL(oe.imageType,oe.imageQuality);G(Ze)},we.src=Xe})},$}(),e=function(){},I=function(){function $(D){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+D+"_"}return Object.defineProperty($.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),$.prototype.addClass=function(D){return this.styleSheet===void 0&&this.addStyleSheet(),D.name=""+this.classNamePrefix+D.localName,this.classes.push(D),this.styleSheet.sheet.insertRule("."+D.name+" {"+D.style+"}",this.styleSheet.sheet.cssRules.length),D},$.prototype.addRule=function(D){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(D),this.styleSheet.sheet.insertRule(D.selector+" {"+D.style+"}",this.styleSheet.sheet.cssRules.length)},$.prototype.addStyleSheet=function(){var D;this.styleSheet=document.createElement("style"),((D=this.styleSheetRoot)!==null&&D!==void 0?D:document.head).appendChild(this.styleSheet),this.addRule(new d("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new d("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new d("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new p("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new p("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},$.prototype.removeStyleSheet=function(){var D;this.styleSheet&&(((D=this.styleSheetRoot)!==null&&D!==void 0?D:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},$}(),d=function($,D){this.selector=$,this.style=D},p=function($,D){this.localName=$,this.style=D},A=function(){function $(D,M,te,oe,G){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=D,this.displayMode=M,this.markerItems=te,this.uiStyleSettings=oe,this.styles=G,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return $.prototype.show=function(D){var M=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=D,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var te=document.createElement("div");te.className=this.toolbarBlockStyleClass.name,te.style.whiteSpace="nowrap",this.uiContainer.appendChild(te),this.addActionButton(te,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(te,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(te,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(te,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(te,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(te,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(te,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(te,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(G){var re=document.createElement("div");re.className=""+M.toolbarButtonStyleClass.name,re.setAttribute("data-type-name",G.typeName),re.innerHTML=G.icon,re.addEventListener("click",function(){M.markerToolbarButtonClicked(re,G)}),M.buttons.push(re),M.markerButtons.push(re)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var oe=document.createElement("div");oe.className=this.toolbarBlockStyleClass.name,oe.style.whiteSpace="nowrap",oe.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(oe),this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(oe,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},$.prototype.addButtonClickListener=function(D){this.buttonClickListeners.push(D)},$.prototype.removeButtonClickListener=function(D){this.buttonClickListeners.indexOf(D)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(D),1)},$.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},$.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var D=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var M=0;M<this.markerButtons.length;M++)M<D||M===D&&this.markerButtons.length-1===D?this.markerButtonBlock.appendChild(this.markerButtons[M]):(M===D&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[M]))}},$.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},$.prototype.resetButtonStyles=function(){var D=this;this.buttons.forEach(function(M){M.className=M.className.replace(D.uiStyleSettings.toolbarButtonStyleColorsClassName?D.uiStyleSettings.toolbarButtonStyleColorsClassName:D.toolbarButtonStyleColorsClass.name,"").trim(),M.className=M.className.replace(D.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?D.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:D.toolbarActiveButtonStyleColorsClass.name,"").trim(),M.className+=" "+(D.uiStyleSettings.toolbarButtonStyleColorsClassName?D.uiStyleSettings.toolbarButtonStyleColorsClassName:D.toolbarButtonStyleColorsClass.name)})},$.prototype.addActionButton=function(D,M,te){var oe=this,G=document.createElement("div");switch(G.className=""+this.toolbarButtonStyleClass.name,G.innerHTML=M,G.setAttribute("data-action",te),G.addEventListener("click",function(){oe.actionToolbarButtonClicked(G,te)}),te){case"select":G.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":G.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":G.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":G.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":G.style.fill=this.uiStyleSettings.closeButtonColor}D.appendChild(G),this.buttons.push(G)},$.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new p("toolbar",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new p("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new p("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new p("toolbar-overflow-block",`
|
|
position: absolute;
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
z-index: 10;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new p("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var D=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new p("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*D)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*D)+`px;
|
|
padding: `+D+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new p("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new p("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new d("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new d("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},$.prototype.markerToolbarButtonClicked=function(D,M){this.setActiveButton(D),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(te){return te("marker",M)}),this.markerButtonOverflowBlock.style.display="none"},$.prototype.actionToolbarButtonClicked=function(D,M){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(te){return te("action",M)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},$.prototype.setActiveButton=function(D){this.resetButtonStyles(),D.className=D.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),D.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},$.prototype.setActiveMarkerButton=function(D){var M=this.markerButtons.find(function(te){return te.getAttribute("data-type-name")===D});M&&this.setActiveButton(M)},$.prototype.setCurrentMarker=function(D){var M=this;this.currentMarker=D,this.buttons.filter(function(te){return/delete|notes/.test(te.getAttribute("data-action"))}).forEach(function(te){M.currentMarker===void 0?(te.style.fillOpacity="0.4",te.style.pointerEvents="none"):(te.style.fillOpacity="1",te.style.pointerEvents="all")})},$}(),s=function(){function $(D,M,te,oe){this.panels=[],this.panelButtons=[],this.markerjsContainer=D,this.displayMode=M,this.uiStyleSettings=te,this.styles=oe,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return $.prototype.addStyles=function(){var D;this.toolboxStyleClass=this.styles.addClass(new p("toolbox",`
|
|
width: 100%;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
font-family: sans-serif;
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
box-sizing: content-box;
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
overflow: hidden;
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new p("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var M=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new p("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new p("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new p("toolbox-panel-row",`
|
|
display: flex;
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
cursor: default;
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
box-sizing: content-box;
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new p("toolbox-panel-row_colors",`
|
|
background-color: `+((D=this.uiStyleSettings.toolboxBackgroundColor)!==null&&D!==void 0?D:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new p("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*M)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*M)+`px;
|
|
padding: `+M+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new p("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new p("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new d("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new d("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},$.prototype.show=function(D){var M;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=D,this.uiContainer.className=this.toolboxStyleClass.name+" "+((M=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&M!==void 0?M:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},$.prototype.setPanelButtons=function(D){var M,te,oe=this;this.panels=D,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((M=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&M!==void 0?M:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((te=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&te!==void 0?te:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(G){var re;G.uiStyleSettings=oe.uiStyleSettings;var j=document.createElement("div");j.className=oe.toolboxButtonStyleClass.name+" "+((re=oe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&re!==void 0?re:oe.toolboxButtonStyleColorsClass.name),j.innerHTML=G.icon,j.title=G.title,j.addEventListener("click",function(){oe.panelButtonClick(G)}),oe.panelButtons.push(j),oe.buttonRow.appendChild(j)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},$.prototype.panelButtonClick=function(D){var M=this,te=-1;if(D!==this.activePanel){te=this.panels.indexOf(D),this.panelRow.innerHTML="";var oe=D.getUi();oe.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(oe),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=D}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){M.displayMode==="inline"?M.panelRow.style.display="none":M.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(G,re){var j,J;G.className=M.toolboxButtonStyleClass.name+" "+(re===te?""+((j=M.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&j!==void 0?j:M.toolboxActiveButtonStyleColorsClass.name):""+((J=M.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&J!==void 0?J:M.toolboxButtonStyleColorsClass.name))})},$}(),i=function($,D){this.title=$,this.icon=D},o=function($){function D(M,te,oe,G){var re=$.call(this,M,G||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return re.colors=[],re.addTransparent=!1,re.colorBoxes=[],re.colors=te,re.currentColor=oe,re.setCurrentColor=re.setCurrentColor.bind(re),re.getColorBox=re.getColorBox.bind(re),re}return W(D,$),D.prototype.getUi=function(){var M=this,te=document.createElement("div");return te.style.overflow="hidden",te.style.whiteSpace="nowrap",this.colors.forEach(function(oe){var G=M.getColorBox(oe);te.appendChild(G),M.colorBoxes.push(G)}),te},D.prototype.getColorBox=function(M){var te=this,oe=this.uiStyleSettings.toolbarHeight/4,G=this.uiStyleSettings.toolbarHeight-oe,re=document.createElement("div");re.style.display="inline-block",re.style.boxSizing="content-box",re.style.width=G-2+"px",re.style.height=G-2+"px",re.style.padding="1px",re.style.marginRight="2px",re.style.marginBottom="2px",re.style.borderWidth="2px",re.style.borderStyle="solid",re.style.borderRadius=(G+2)/2+"px",re.style.borderColor=M===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",re.addEventListener("click",function(){te.setCurrentColor(M,re)});var j=document.createElement("div");return j.style.display="inline-block",j.style.width=G-2+"px",j.style.height=G-2+"px",j.style.backgroundColor=M,j.style.borderRadius=G/2+"px",M==="transparent"&&(j.style.fill=this.uiStyleSettings.toolboxAccentColor,j.innerHTML=`<svg viewBox="0 0 24 24">
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
</svg>`),re.appendChild(j),re},D.prototype.setCurrentColor=function(M,te){var oe=this;this.currentColor=M,this.colorBoxes.forEach(function(G){G.style.borderColor=G===te?oe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(M)},D}(i),n=function(){function $(D,M,te){this._state="new",this._isSelected=!1,this._container=D,this._overlayContainer=M,this.globalSettings=te,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty($.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),$.prototype.ownsTarget=function(D){return!1},Object.defineProperty($.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),$.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},$.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},$.prototype.pointerDown=function(D,M){},$.prototype.dblClick=function(D,M){},$.prototype.manipulate=function(D){},$.prototype.pointerUp=function(D){this.stateChanged()},$.prototype.dispose=function(){},$.prototype.addMarkerVisualToContainer=function(D){this.container.childNodes.length>0?this.container.insertBefore(D,this.container.childNodes[0]):this.container.appendChild(D)},$.prototype.getState=function(){return{typeName:$.typeName,state:this.state,notes:this.notes}},$.prototype.restoreState=function(D){this._state=D.state,this.notes=D.notes},$.prototype.scale=function(D,M){},$.prototype.colorChanged=function(D){this.onColorChanged&&this.onColorChanged(D),this.stateChanged()},$.prototype.fillColorChanged=function(D){this.onFillColorChanged&&this.onFillColorChanged(D),this.stateChanged()},$.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var D=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),D.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(D)&&this.onStateChanged(this)}},$.typeName="MarkerBase",$}(),a=function(){function $(){this.findGripByVisual=this.findGripByVisual.bind(this)}return $.prototype.findGripByVisual=function(D){return this.topLeft.ownsTarget(D)?this.topLeft:this.topCenter.ownsTarget(D)?this.topCenter:this.topRight.ownsTarget(D)?this.topRight:this.centerLeft.ownsTarget(D)?this.centerLeft:this.centerRight.ownsTarget(D)?this.centerRight:this.bottomLeft.ownsTarget(D)?this.bottomLeft:this.bottomCenter.ownsTarget(D)?this.bottomCenter:this.bottomRight.ownsTarget(D)?this.bottomRight:void 0},$}(),r=function(){function $(){this.GRIP_SIZE=10,this.visual=O.createGroup(),this.visual.appendChild(O.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(O.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return $.prototype.ownsTarget=function(D){return D===this.visual||D===this.visual.childNodes[0]||D===this.visual.childNodes[1]},$}(),t=function(){function $(){}return $.toITransformMatrix=function(D){return{a:D.a,b:D.b,c:D.c,d:D.d,e:D.e,f:D.f}},$.toSVGMatrix=function(D,M){return D.a=M.a,D.b=M.b,D.c=M.c,D.d=M.d,D.e=M.e,D.f=M.f,D},$}(),y=function($){function D(M,te,oe){var G=$.call(this,M,te,oe)||this;return G.left=0,G.top=0,G.width=0,G.height=0,G.defaultSize={x:50,y:20},G.offsetX=0,G.offsetY=0,G.rotationAngle=0,G.CB_DISTANCE=10,G._suppressMarkerCreateEvent=!1,G.container.transform.baseVal.appendItem(O.createTransform()),G.setupControlBox(),G}return W(D,$),Object.defineProperty(D.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"visual",{get:function(){return this._visual},set:function(M){this._visual=M;var te=O.createTransform();this._visual.transform.baseVal.appendItem(te)},enumerable:!1,configurable:!0}),D.prototype.ownsTarget=function(M){return!!$.prototype.ownsTarget.call(this,M)||!!(this.controlGrips.findGripByVisual(M)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(M))},D.prototype.pointerDown=function(M,te){$.prototype.pointerDown.call(this,M,te),this.state==="new"&&(this.left=M.x,this.top=M.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var oe=this.unrotatePoint(M);if(this.manipulationStartX=oe.x,this.manipulationStartY=oe.y,this.offsetX=oe.x-this.left,this.offsetY=oe.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(te),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(te)){this.activeGrip=this.rotatorGrip;var G=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=G.x-this.width/2,this.top=G.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var re=this.container.transform.baseVal.getItem(0);re.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(re,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},D.prototype.pointerUp=function(M){var te=this.state;$.prototype.pointerUp.call(this,M),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(M),this._state="select",te==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},D.prototype.moveVisual=function(M){this.visual.style.transform="translate("+M.x+"px, "+M.y+"px)"},D.prototype.manipulate=function(M){var te=this.unrotatePoint(M);this.state==="creating"?this.resize(M):this.state==="move"?(this.left=this.manipulationStartLeft+(te.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(te.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(te):this.state==="rotate"&&this.rotate(M)},D.prototype.resize=function(M){var te=this.manipulationStartLeft,oe=this.manipulationStartWidth,G=this.manipulationStartTop,re=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:te=this.manipulationStartLeft+M.x-this.manipulationStartX,oe=this.manipulationStartWidth+this.manipulationStartLeft-te;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:oe=this.manipulationStartWidth+M.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:G=this.manipulationStartTop+M.y-this.manipulationStartY,re=this.manipulationStartHeight+this.manipulationStartTop-G;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:re=this.manipulationStartHeight+M.y-this.manipulationStartY}oe>=0?(this.left=te,this.width=oe):(this.left=te+oe,this.width=-oe),re>=0?(this.top=G,this.height=re):(this.top=G+re,this.height=-re),this.setSize()},D.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},D.prototype.rotate=function(M){if(Math.abs(M.x-this.centerX)>.1){var te=Math.sign(M.x-this.centerX);this.rotationAngle=180*Math.atan((M.y-this.centerY)/(M.x-this.centerX))/Math.PI+90*te,this.applyRotation()}},D.prototype.applyRotation=function(){var M=this.container.transform.baseVal.getItem(0);M.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(M,0)},D.prototype.rotatePoint=function(M){if(this.rotationAngle===0)return M;var te=this.container.getCTM(),oe=O.createPoint(M.x,M.y);return{x:(oe=oe.matrixTransform(te)).x,y:oe.y}},D.prototype.unrotatePoint=function(M){if(this.rotationAngle===0)return M;var te=this.container.getCTM();te=te.inverse();var oe=O.createPoint(M.x,M.y);return{x:(oe=oe.matrixTransform(te)).x,y:oe.y}},D.prototype.select=function(){$.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},D.prototype.deselect=function(){$.prototype.deselect.call(this),this.controlBox.style.display="none"},D.prototype.setupControlBox=function(){this.controlBox=O.createGroup();var M=O.createTransform();M.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(M),this.container.appendChild(this.controlBox),this.controlRect=O.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=O.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new a,this.addControlGrips(),this.controlBox.style.display="none"},D.prototype.adjustControlBox=function(){var M=this.controlBox.transform.baseVal.getItem(0);M.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(M,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},D.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},D.prototype.createGrip=function(){var M=new r;return M.visual.transform.baseVal.appendItem(O.createTransform()),this.controlBox.appendChild(M.visual),M},D.prototype.positionGrips=function(){var M=this.controlGrips.topLeft.GRIP_SIZE,te=-M/2,oe=te,G=(this.width+this.CB_DISTANCE)/2-M/2,re=(this.height+this.CB_DISTANCE)/2-M/2,j=this.height+this.CB_DISTANCE-M/2,J=this.width+this.CB_DISTANCE-M/2;this.positionGrip(this.controlGrips.topLeft.visual,te,oe),this.positionGrip(this.controlGrips.topCenter.visual,G,oe),this.positionGrip(this.controlGrips.topRight.visual,J,oe),this.positionGrip(this.controlGrips.centerLeft.visual,te,re),this.positionGrip(this.controlGrips.centerRight.visual,J,re),this.positionGrip(this.controlGrips.bottomLeft.visual,te,j),this.positionGrip(this.controlGrips.bottomCenter.visual,G,j),this.positionGrip(this.controlGrips.bottomRight.visual,J,j),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,G,oe-3*this.CB_DISTANCE)},D.prototype.positionGrip=function(M,te,oe){var G=M.transform.baseVal.getItem(0);G.setTranslate(te,oe),M.transform.baseVal.replaceItem(G,0)},D.prototype.hideControlBox=function(){this.controlBox.style.display="none"},D.prototype.showControlBox=function(){this.controlBox.style.display=""},D.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:t.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:t.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},$.prototype.getState.call(this))},D.prototype.restoreState=function(M){$.prototype.restoreState.call(this,M);var te=M;this.left=te.left,this.top=te.top,this.width=te.width,this.height=te.height,this.rotationAngle=te.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(t.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,te.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(t.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,te.containerTransformMatrix))},D.prototype.scale=function(M,te){$.prototype.scale.call(this,M,te);var oe=this.rotatePoint({x:this.left,y:this.top}),G=this.unrotatePoint({x:oe.x*M,y:oe.y*te});this.left=G.x,this.top=G.y,this.width=this.width*M,this.height=this.height*te,this.adjustControlBox()},D}(n),b=function($){function D(M,te,oe){var G=$.call(this,M,te,oe)||this;return G.fillColor="transparent",G.strokeColor="transparent",G.strokeWidth=0,G.strokeDasharray="",G.opacity=1,G.setStrokeColor=G.setStrokeColor.bind(G),G.setFillColor=G.setFillColor.bind(G),G.setStrokeWidth=G.setStrokeWidth.bind(G),G.setStrokeDasharray=G.setStrokeDasharray.bind(G),G.createVisual=G.createVisual.bind(G),G}return W(D,$),D.prototype.ownsTarget=function(M){return!(!$.prototype.ownsTarget.call(this,M)&&M!==this.visual)},D.prototype.createVisual=function(){this.visual=O.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},D.prototype.pointerDown=function(M,te){$.prototype.pointerDown.call(this,M,te),this.state==="new"&&(this.createVisual(),this.moveVisual(M),this._state="creating")},D.prototype.manipulate=function(M){$.prototype.manipulate.call(this,M)},D.prototype.resize=function(M){$.prototype.resize.call(this,M),this.setSize()},D.prototype.setSize=function(){$.prototype.setSize.call(this),O.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},D.prototype.pointerUp=function(M){$.prototype.pointerUp.call(this,M),this.setSize()},D.prototype.setStrokeColor=function(M){this.strokeColor=M,this.visual&&O.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(M),this.stateChanged()},D.prototype.setFillColor=function(M){this.fillColor=M,this.visual&&O.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},D.prototype.setStrokeWidth=function(M){this.strokeWidth=M,this.visual&&O.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},D.prototype.setStrokeDasharray=function(M){this.strokeDasharray=M,this.visual&&O.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},D.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},$.prototype.getState.call(this))},D.prototype.restoreState=function(M){var te=M;this.fillColor=te.fillColor,this.strokeColor=te.strokeColor,this.strokeWidth=te.strokeWidth,this.strokeDasharray=te.strokeDasharray,this.opacity=te.opacity,this.createVisual(),$.prototype.restoreState.call(this,M),this.setSize()},D.prototype.scale=function(M,te){$.prototype.scale.call(this,M,te),this.setSize()},D.title="Rectangle marker",D}(y),E=function($){function D(M,te,oe,G){var re=$.call(this,M,G||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return re.widths=[],re.widthBoxes=[],re.widths=te,re.currentWidth=oe,re.setCurrentWidth=re.setCurrentWidth.bind(re),re}return W(D,$),D.prototype.getUi=function(){var M=this,te=document.createElement("div");return te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2",this.widths.forEach(function(oe){var G=document.createElement("div");G.style.display="flex",G.style.flexGrow="2",G.style.alignItems="center",G.style.justifyContent="space-between",G.style.padding="5px",G.style.borderWidth="2px",G.style.borderStyle="solid",G.style.borderColor=oe===M.currentWidth?M.uiStyleSettings.toolboxAccentColor:"transparent",G.addEventListener("click",function(){M.setCurrentWidth(oe,G)}),te.appendChild(G);var re=document.createElement("div");re.innerText=oe.toString(),re.style.marginRight="5px",G.appendChild(re);var j=document.createElement("div");j.style.minHeight="20px",j.style.flexGrow="2",j.style.display="flex",j.style.alignItems="center";var J=document.createElement("hr");J.style.minWidth="20px",J.style.border="0px",J.style.borderTop=oe+"px solid "+M.uiStyleSettings.toolboxColor,J.style.flexGrow="2",j.appendChild(J),G.appendChild(j),M.widthBoxes.push(G)}),te},D.prototype.setCurrentWidth=function(M,te){var oe=this;this.currentWidth=M,this.widthBoxes.forEach(function(G){G.style.borderColor=G===te?oe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},D}(i),T=function($){function D(M,te,oe,G){var re=$.call(this,M,G||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return re.styles=[],re.styleBoxes=[],re.styles=te,re.currentStyle=oe,re.setCurrentStyle=re.setCurrentStyle.bind(re),re}return W(D,$),D.prototype.getUi=function(){var M=this,te=document.createElement("div");return te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2",this.styles.forEach(function(oe){var G=document.createElement("div");G.style.display="flex",G.style.alignItems="center",G.style.justifyContent="space-between",G.style.padding="5px",G.style.borderWidth="2px",G.style.borderStyle="solid",G.style.overflow="hidden",G.style.maxWidth=100/M.styles.length-5+"%",G.style.borderColor=oe===M.currentStyle?M.uiStyleSettings.toolboxAccentColor:"transparent",G.addEventListener("click",function(){M.setCurrentStyle(oe,G)}),te.appendChild(G);var re=document.createElement("div");re.style.minHeight="20px",re.style.flexGrow="2",re.style.overflow="hidden";var j=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+M.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(oe!==""?'stroke-dasharray="'+oe+'"':"")+` />
|
|
</svg>`;re.innerHTML=j,G.appendChild(re),M.styleBoxes.push(G)}),te},D.prototype.setCurrentStyle=function(M,te){var oe=this;this.currentStyle=M,this.styleBoxes.forEach(function(G){G.style.borderColor=G===te?oe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},D}(i),C=function($){function D(M,te,oe){var G=$.call(this,M,te,oe)||this;return G.strokeColor=oe.defaultColor,G.strokeWidth=oe.defaultStrokeWidth,G.strokeDasharray=oe.defaultStrokeDasharray,G.strokePanel=new o("Line color",oe.defaultColorSet,oe.defaultColor),G.strokePanel.onColorChanged=G.setStrokeColor,G.strokeWidthPanel=new E("Line width",oe.defaultStrokeWidths,oe.defaultStrokeWidth),G.strokeWidthPanel.onWidthChanged=G.setStrokeWidth,G.strokeStylePanel=new T("Line style",oe.defaultStrokeDasharrays,oe.defaultStrokeDasharray),G.strokeStylePanel.onStyleChanged=G.setStrokeDasharray,G}return W(D,$),Object.defineProperty(D.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),D.prototype.getState=function(){var M=$.prototype.getState.call(this);return M.typeName=D.typeName,M},D.typeName="FrameMarker",D.title="Frame marker",D.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',D}(b),h=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1},c=function($){function D(M,te,oe){var G=$.call(this,M,te,oe)||this;return G.x1=0,G.y1=0,G.x2=0,G.y2=0,G.defaultLength=50,G.manipulationStartX=0,G.manipulationStartY=0,G.manipulationStartX1=0,G.manipulationStartY1=0,G.manipulationStartX2=0,G.manipulationStartY2=0,G.setupControlBox(),G}return W(D,$),D.prototype.ownsTarget=function(M){return!!$.prototype.ownsTarget.call(this,M)||!(!this.grip1.ownsTarget(M)&&!this.grip2.ownsTarget(M))},D.prototype.pointerDown=function(M,te){$.prototype.pointerDown.call(this,M,te),this.manipulationStartX=M.x,this.manipulationStartY=M.y,this.state==="new"&&(this.x1=M.x,this.y1=M.y,this.x2=M.x,this.y2=M.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(te)?this.activeGrip=this.grip1:this.grip2.ownsTarget(te)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},D.prototype.pointerUp=function(M){var te=this.state;$.prototype.pointerUp.call(this,M),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(M),this._state="select",te==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},D.prototype.adjustVisual=function(){},D.prototype.manipulate=function(M){this.state==="creating"?this.resize(M):this.state==="move"?(this.x1=this.manipulationStartX1+M.x-this.manipulationStartX,this.y1=this.manipulationStartY1+M.y-this.manipulationStartY,this.x2=this.manipulationStartX2+M.x-this.manipulationStartX,this.y2=this.manipulationStartY2+M.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(M)},D.prototype.resize=function(M){switch(this.activeGrip){case this.grip1:this.x1=M.x,this.y1=M.y;break;case this.grip2:case void 0:this.x2=M.x,this.y2=M.y}this.adjustVisual(),this.adjustControlBox()},D.prototype.select=function(){$.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},D.prototype.deselect=function(){$.prototype.deselect.call(this),this.controlBox.style.display="none"},D.prototype.setupControlBox=function(){this.controlBox=O.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},D.prototype.adjustControlBox=function(){this.positionGrips()},D.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},D.prototype.createGrip=function(){var M=new r;return M.visual.transform.baseVal.appendItem(O.createTransform()),this.controlBox.appendChild(M.visual),M},D.prototype.positionGrips=function(){var M=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-M/2,this.y1-M/2),this.positionGrip(this.grip2.visual,this.x2-M/2,this.y2-M/2)},D.prototype.positionGrip=function(M,te,oe){var G=M.transform.baseVal.getItem(0);G.setTranslate(te,oe),M.transform.baseVal.replaceItem(G,0)},D.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},$.prototype.getState.call(this))},D.prototype.restoreState=function(M){$.prototype.restoreState.call(this,M);var te=M;this.x1=te.x1,this.y1=te.y1,this.x2=te.x2,this.y2=te.y2},D.prototype.scale=function(M,te){$.prototype.scale.call(this,M,te),this.x1=this.x1*M,this.y1=this.y1*te,this.x2=this.x2*M,this.y2=this.y2*te,this.adjustVisual(),this.adjustControlBox()},D}(n),l=function($){function D(M,te,oe){var G=$.call(this,M,te,oe)||this;return G.strokeColor="transparent",G.strokeWidth=0,G.strokeDasharray="",G.setStrokeColor=G.setStrokeColor.bind(G),G.setStrokeWidth=G.setStrokeWidth.bind(G),G.setStrokeDasharray=G.setStrokeDasharray.bind(G),G.strokeColor=oe.defaultColor,G.strokeWidth=oe.defaultStrokeWidth,G.strokeDasharray=oe.defaultStrokeDasharray,G.strokePanel=new o("Line color",oe.defaultColorSet,oe.defaultColor),G.strokePanel.onColorChanged=G.setStrokeColor,G.strokeWidthPanel=new E("Line width",oe.defaultStrokeWidths,oe.defaultStrokeWidth),G.strokeWidthPanel.onWidthChanged=G.setStrokeWidth,G.strokeStylePanel=new T("Line style",oe.defaultStrokeDasharrays,oe.defaultStrokeDasharray),G.strokeStylePanel.onStyleChanged=G.setStrokeDasharray,G}return W(D,$),D.prototype.ownsTarget=function(M){return!(!$.prototype.ownsTarget.call(this,M)&&M!==this.visual&&M!==this.selectorLine&&M!==this.visibleLine)},D.prototype.createVisual=function(){this.visual=O.createGroup(),this.selectorLine=O.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=O.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},D.prototype.pointerDown=function(M,te){$.prototype.pointerDown.call(this,M,te),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},D.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),O.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),O.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),O.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},D.prototype.setStrokeColor=function(M){this.strokeColor=M,this.adjustVisual(),this.colorChanged(M)},D.prototype.setStrokeWidth=function(M){this.strokeWidth=M,this.adjustVisual()},D.prototype.setStrokeDasharray=function(M){this.strokeDasharray=M,this.adjustVisual(),this.stateChanged()},Object.defineProperty(D.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),D.prototype.getState=function(){var M=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},$.prototype.getState.call(this));return M.typeName=D.typeName,M},D.prototype.restoreState=function(M){$.prototype.restoreState.call(this,M);var te=M;this.strokeColor=te.strokeColor,this.strokeWidth=te.strokeWidth,this.strokeDasharray=te.strokeDasharray,this.createVisual(),this.adjustVisual()},D.typeName="LineMarker",D.title="Line marker",D.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',D}(c),u=function($){function D(M,te,oe,G){var re=$.call(this,M,G||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return re.fonts=[],re.fontBoxes=[],re.fonts=te,re.currentFont=oe,re.setCurrentFont=re.setCurrentFont.bind(re),re}return W(D,$),D.prototype.getUi=function(){var M=this,te=document.createElement("div");return te.style.overflow="hidden",te.style.flexGrow="2",this.fonts.forEach(function(oe){var G=document.createElement("div");G.style.display="inline-block",G.style.alignItems="center",G.style.justifyContent="space-between",G.style.padding="5px",G.style.borderWidth="2px",G.style.borderStyle="solid",G.style.overflow="hidden",G.style.maxWidth=100/M.fonts.length-5+"%",G.style.borderColor=oe===M.currentFont?M.uiStyleSettings.toolboxAccentColor:"transparent",G.addEventListener("click",function(){M.setCurrentFont(oe,G)}),te.appendChild(G);var re=document.createElement("div");re.style.display="flex",re.style.minHeight="20px",re.style.flexGrow="2",re.style.fontFamily=oe,re.style.overflow="hidden";var j=document.createElement("div");j.style.whiteSpace="nowrap",j.style.overflow="hidden",j.style.textOverflow="ellipsis",j.innerHTML="The quick brown fox jumps over the lazy dog",re.appendChild(j),G.appendChild(re),M.fontBoxes.push(G)}),te},D.prototype.setCurrentFont=function(M,te){var oe=this;this.currentFont=M,this.fontBoxes.forEach(function(G){G.style.borderColor=G===te?oe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},D}(i),_=function($){function D(M,te,oe){var G=$.call(this,M,te,oe)||this;return G.color="transparent",G.padding=5,G.DEFAULT_TEXT="your text here",G.text=G.DEFAULT_TEXT,G.isMoved=!1,G.color=oe.defaultColor,G.fontFamily=oe.defaultFontFamily,G.defaultSize={x:100,y:30},G.setColor=G.setColor.bind(G),G.setFont=G.setFont.bind(G),G.renderText=G.renderText.bind(G),G.sizeText=G.sizeText.bind(G),G.textEditDivClicked=G.textEditDivClicked.bind(G),G.showTextEditor=G.showTextEditor.bind(G),G.setSize=G.setSize.bind(G),G.positionTextEditor=G.positionTextEditor.bind(G),G.colorPanel=new o("Color",oe.defaultColorSet,oe.defaultColor),G.colorPanel.onColorChanged=G.setColor,G.fontFamilyPanel=new u("Font",oe.defaultFontFamilies,oe.defaultFontFamily),G.fontFamilyPanel.onFontChanged=G.setFont,G}return W(D,$),D.prototype.ownsTarget=function(M){if($.prototype.ownsTarget.call(this,M)||M===this.visual||M===this.textElement||M===this.bgRectangle)return!0;var te=!1;return this.textElement.childNodes.forEach(function(oe){oe===M&&(te=!0)}),te},D.prototype.createVisual=function(){this.visual=O.createGroup(),this.bgRectangle=O.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=O.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(O.createTransform()),this.textElement.transform.baseVal.appendItem(O.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},D.prototype.pointerDown=function(M,te){$.prototype.pointerDown.call(this,M,te),this.isMoved=!1,this.pointerDownPoint=M,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(M),this._state="creating")},D.prototype.renderText=function(){var M=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(te){M.textElement.appendChild(O.createTSpan(te.trim()===""?" ":te.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},D.prototype.getTextScale=function(){var M=this.textElement.getBBox(),te=1;if(M.width>0&&M.height>0){var oe=(1*this.width-this.width*this.padding*2/100)/M.width,G=(1*this.height-this.height*this.padding*2/100)/M.height;te=Math.min(oe,G)}return te},D.prototype.getTextPosition=function(M){var te=this.textElement.getBBox(),oe=0,G=0;return te.width>0&&te.height>0&&(oe=(this.width-te.width*M)/2,G=this.height/2-te.height*M/2),{x:oe,y:G}},D.prototype.sizeText=function(){var M=this.textElement.getBBox(),te=this.getTextScale(),oe=this.getTextPosition(te);oe.y-=M.y*te,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+oe.x+"px, "+oe.y+"px) scale("+te+", "+te+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(oe.x,oe.y),this.textElement.transform.baseVal.getItem(1).setScale(te,te))},D.prototype.manipulate=function(M){$.prototype.manipulate.call(this,M),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(M.x-this.pointerDownPoint.x)>5||Math.abs(M.y-this.pointerDownPoint.y)>5)},D.prototype.resize=function(M){$.prototype.resize.call(this,M),this.isMoved=!0,this.setSize(),this.sizeText()},D.prototype.setSize=function(){$.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(O.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),O.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},D.prototype.pointerUp=function(M){var te=this.state;te==="creating"&&(this._suppressMarkerCreateEvent=!0),$.prototype.pointerUp.call(this,M),this.setSize(),(te==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},D.prototype.showTextEditor=function(){var M=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(te){te.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var te=Number.parseFloat(M.textEditor.style.fontSize);M.textEditor.clientWidth>=Number.parseInt(M.textEditor.style.maxWidth)&&te>.9;)te-=.1,M.textEditor.style.fontSize=Math.max(te,.9)+"em"}),this.textEditor.addEventListener("keyup",function(te){te.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(te){if(te.clipboardData){var oe=te.clipboardData.getData("text"),G=window.getSelection();if(!G.rangeCount)return!1;G.deleteFromDocument(),G.getRangeAt(0).insertNode(document.createTextNode(oe)),te.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){M.textEditDivClicked(M.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},D.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var M=this.getTextScale(),te=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),oe=this.textElement.getBBox(),G={x:oe.width*M,y:oe.height*M};te.x-=G.x/2,te.y-=G.y/2,this.textEditor.style.top=te.y+"px",this.textEditor.style.left=te.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-te.x+"px",this.textEditor.style.fontSize=Math.max(16*M,12)+"px",this.textElement.style.display="none"}},D.prototype.textEditDivClicked=function(M){this.text=M.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},D.prototype.select=function(){$.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},D.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),$.prototype.deselect.call(this)},D.prototype.dblClick=function(M,te){$.prototype.dblClick.call(this,M,te),this.showTextEditor()},D.prototype.setColor=function(M){this.textElement&&O.setAttributes(this.textElement,[["fill",M]]),this.color=M,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(M)},D.prototype.setFont=function(M){this.textElement&&O.setAttributes(this.textElement,[["font-family",M]]),this.fontFamily=M,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},D.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},D.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(D.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),D.prototype.getState=function(){var M=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},$.prototype.getState.call(this));return M.typeName=D.typeName,M},D.prototype.restoreState=function(M){var te=M;this.color=te.color,this.fontFamily=te.fontFamily,this.padding=te.padding,this.text=te.text,this.createVisual(),$.prototype.restoreState.call(this,M),this.setSize()},D.prototype.scale=function(M,te){$.prototype.scale.call(this,M,te),this.setSize(),this.sizeText(),this.positionTextEditor()},D.typeName="TextMarker",D.title="Text marker",D.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',D}(y),g=function($){function D(M,te,oe){var G=$.call(this,M,te,oe)||this;return G.color="transparent",G.lineWidth=3,G.drawing=!1,G.pixelRatio=1,G.color=oe.defaultColor,G.lineWidth=oe.defaultStrokeWidth,G.pixelRatio=oe.freehandPixelRatio,G.setColor=G.setColor.bind(G),G.addCanvas=G.addCanvas.bind(G),G.finishCreation=G.finishCreation.bind(G),G.setLineWidth=G.setLineWidth.bind(G),G.colorPanel=new o("Color",oe.defaultColorSet,oe.defaultColor),G.colorPanel.onColorChanged=G.setColor,G.lineWidthPanel=new E("Line width",oe.defaultStrokeWidths,oe.defaultStrokeWidth),G.lineWidthPanel.onWidthChanged=G.setLineWidth,G}return W(D,$),D.prototype.ownsTarget=function(M){return!(!$.prototype.ownsTarget.call(this,M)&&M!==this.visual&&M!==this.drawingImage)},D.prototype.createVisual=function(){this.visual=O.createGroup(),this.drawingImage=O.createImage(),this.visual.appendChild(this.drawingImage);var M=O.createTransform();this.visual.transform.baseVal.appendItem(M),this.addMarkerVisualToContainer(this.visual)},D.prototype.pointerDown=function(M,te){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(M.x,M.y),this.drawing=!0):$.prototype.pointerDown.call(this,M,te)},D.prototype.manipulate=function(M){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(M.x,M.y),this.canvasContext.stroke()):$.prototype.manipulate.call(this,M)},D.prototype.resize=function(M){$.prototype.resize.call(this,M),O.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),O.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},D.prototype.pointerUp=function(M){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):$.prototype.pointerUp.call(this,M)},D.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},D.prototype.select=function(){this.state==="creating"&&this.finishCreation(),$.prototype.select.call(this)},D.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),$.prototype.deselect.call(this)},D.prototype.finishCreation=function(){for(var M=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),te=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],oe=te[0],G=te[1],re=te[2],j=te[3],J=!1,Y=0;Y<this.canvasElement.height;Y++)for(var he=0;he<this.canvasElement.width;he++)M.data[Y*this.canvasElement.width*4+4*he+3]>0&&(J=!0,Y<G&&(G=Y),he<oe&&(oe=he),Y>j&&(j=Y),he>re&&(re=he));if(J){this.left=oe/this.pixelRatio,this.top=G/this.pixelRatio,this.width=(re-oe)/this.pixelRatio,this.height=(j-G)/this.pixelRatio;var we=document.createElement("canvas");we.width=re-oe,we.height=j-G,we.getContext("2d").putImageData(this.canvasContext.getImageData(oe,G,re-oe,j-G),0,0),this.drawingImgUrl=we.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},D.prototype.setDrawingImage=function(){O.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),O.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},D.prototype.setColor=function(M){this.color=M,this.colorChanged(M)},D.prototype.setLineWidth=function(M){this.lineWidth=M},Object.defineProperty(D.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),D.prototype.getState=function(){var M=Object.assign({drawingImgUrl:this.drawingImgUrl},$.prototype.getState.call(this));return M.typeName=D.typeName,M},D.prototype.restoreState=function(M){this.createVisual(),$.prototype.restoreState.call(this,M),this.drawingImgUrl=M.drawingImgUrl,this.setDrawingImage()},D.prototype.scale=function(M,te){$.prototype.scale.call(this,M,te),this.setDrawingImage()},D.typeName="FreehandMarker",D.title="Freehand marker",D.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',D}(y),m=function($){function D(M,te,oe){var G=$.call(this,M,oe||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return G.typeBoxes=[],G.currentType=te,G.setCurrentType=G.setCurrentType.bind(G),G}return W(D,$),D.prototype.getUi=function(){var M=this,te=document.createElement("div");te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2";for(var oe=function(j){var J="both";switch(j){case 0:J="both";break;case 1:J="start";break;case 2:J="end";break;case 3:J="none"}var Y=document.createElement("div");if(Y.style.display="flex",Y.style.flexGrow="2",Y.style.alignItems="center",Y.style.justifyContent="space-between",Y.style.padding="5px",Y.style.borderWidth="2px",Y.style.borderStyle="solid",Y.style.borderColor=J===G.currentType?G.uiStyleSettings.toolboxAccentColor:"transparent",Y.addEventListener("click",function(){M.setCurrentType(J,Y)}),te.appendChild(Y),J==="both"||J==="start"){var he=document.createElement("div");he.style.display="flex",he.style.alignItems="center",he.style.minHeight="20px",he.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,5 10,0 10,10" fill="`+(G.uiStyleSettings!==void 0?G.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,he.style.marginLeft="5px",Y.appendChild(he)}var we=document.createElement("div");we.style.display="flex",we.style.alignItems="center",we.style.minHeight="20px",we.style.flexGrow="2";var Te=document.createElement("hr");if(Te.style.minWidth="20px",Te.style.border="0px",Te.style.borderTop="3px solid "+(G.uiStyleSettings!==void 0?G.uiStyleSettings.toolboxColor:"#eeeeee"),Te.style.flexGrow="2",we.appendChild(Te),Y.appendChild(we),J==="both"||J==="end"){var Xe=document.createElement("div");Xe.style.display="flex",Xe.style.alignItems="center",Xe.style.minHeight="20px",Xe.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
<polygon points="0,0 10,5 0,10" fill="`+(G.uiStyleSettings!==void 0?G.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Xe.style.marginRight="5px",Y.appendChild(Xe)}G.typeBoxes.push(Y)},G=this,re=0;re<4;re++)oe(re);return te},D.prototype.setCurrentType=function(M,te){var oe=this;this.currentType=M,this.typeBoxes.forEach(function(G){G.style.borderColor=G===te?oe.uiStyleSettings!==void 0?oe.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},D}(i),F=function($){function D(M,te,oe){var G=$.call(this,M,te,oe)||this;return G.arrowType="end",G.arrowBaseHeight=10,G.arrowBaseWidth=10,G.getArrowPoints=G.getArrowPoints.bind(G),G.setArrowType=G.setArrowType.bind(G),G.arrowTypePanel=new m("Arrow type","end"),G.arrowTypePanel.onArrowTypeChanged=G.setArrowType,G}return W(D,$),D.prototype.ownsTarget=function(M){return!(!$.prototype.ownsTarget.call(this,M)&&M!==this.arrow1&&M!==this.arrow2)},D.prototype.getArrowPoints=function(M,te){var oe=this.arrowBaseWidth+2*this.strokeWidth,G=this.arrowBaseHeight+2*this.strokeWidth;return M-oe/2+","+(te+G/2)+" "+M+","+(te-G/2)+" "+(M+oe/2)+","+(te+G/2)},D.prototype.createTips=function(){this.arrow1=O.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(O.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=O.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(O.createTransform()),this.visual.appendChild(this.arrow2)},D.prototype.pointerDown=function(M,te){$.prototype.pointerDown.call(this,M,te),this.state==="creating"&&this.createTips()},D.prototype.adjustVisual=function(){if($.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",O.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),O.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var M=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),te=this.arrow1.transform.baseVal.getItem(0);te.setRotate(M,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(te,0);var oe=this.arrow2.transform.baseVal.getItem(0);oe.setRotate(M+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(oe,0)}},D.prototype.setArrowType=function(M){this.arrowType=M,this.adjustVisual(),this.stateChanged()},Object.defineProperty(D.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),D.prototype.getState=function(){var M=Object.assign({arrowType:this.arrowType},$.prototype.getState.call(this));return M.typeName=D.typeName,M},D.prototype.restoreState=function(M){$.prototype.restoreState.call(this,M);var te=M;this.arrowType=te.arrowType,this.createTips(),this.adjustVisual()},D.typeName="ArrowMarker",D.title="Arrow marker",D.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',D}(l),H=function($){function D(M,te,oe){var G=$.call(this,M,te,oe)||this;return G.fillColor=oe.defaultFillColor,G.strokeWidth=0,G.fillPanel=new o("Color",oe.defaultColorSet,oe.defaultFillColor),G.fillPanel.onColorChanged=G.setFillColor,G}return W(D,$),Object.defineProperty(D.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),D.prototype.getState=function(){var M=$.prototype.getState.call(this);return M.typeName=D.typeName,M},D.typeName="CoverMarker",D.title="Cover marker",D.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',D}(b),B=function($){function D(M,te,oe,G){var re=$.call(this,M,G||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return re.opacities=[],re.opacityBoxes=[],re.opacities=te,re.currentOpacity=oe,re.setCurrentOpacity=re.setCurrentOpacity.bind(re),re}return W(D,$),D.prototype.getUi=function(){var M=this,te=document.createElement("div");return te.style.display="flex",te.style.overflow="hidden",te.style.flexGrow="2",te.style.justifyContent="space-between",this.opacities.forEach(function(oe){var G=document.createElement("div");G.style.display="flex",G.style.alignItems="center",G.style.justifyContent="center",G.style.padding="5px",G.style.borderWidth="2px",G.style.borderStyle="solid",G.style.borderColor=oe===M.currentOpacity?M.uiStyleSettings.toolboxAccentColor:"transparent",G.addEventListener("click",function(){M.setCurrentOpacity(oe,G)}),te.appendChild(G);var re=document.createElement("div");re.innerText=100*oe+"%",G.appendChild(re),M.opacityBoxes.push(G)}),te},D.prototype.setCurrentOpacity=function(M,te){var oe=this;this.currentOpacity=M,this.opacityBoxes.forEach(function(G){G.style.borderColor=G===te?oe.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},D}(i),Q=function($){function D(M,te,oe){var G=$.call(this,M,te,oe)||this;return G.setOpacity=G.setOpacity.bind(G),G.fillColor=oe.defaultHighlightColor,G.strokeWidth=0,G.opacity=oe.defaultHighlightOpacity,G.fillPanel=new o("Color",oe.defaultColorSet,G.fillColor),G.fillPanel.onColorChanged=G.setFillColor,G.opacityPanel=new B("Opacity",oe.defaultOpacitySteps,G.opacity),G.opacityPanel.onOpacityChanged=G.setOpacity,G}return W(D,$),D.prototype.setOpacity=function(M){this.opacity=M,this.visual&&O.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(D.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),D.prototype.getState=function(){var M=$.prototype.getState.call(this);return M.typeName=D.typeName,M},D.typeName="HighlightMarker",D.title="Highlight marker",D.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',D}(H),z='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',N=function($){function D(M,te,oe){var G=$.call(this,M,te,oe)||this;return G.bgColor="transparent",G.tipPosition={x:0,y:0},G.tipBase1Position={x:0,y:0},G.tipBase2Position={x:0,y:0},G.tipMoving=!1,G.color=oe.defaultStrokeColor,G.bgColor=oe.defaultFillColor,G.fontFamily=oe.defaultFontFamily,G.defaultSize={x:100,y:30},G.setBgColor=G.setBgColor.bind(G),G.getTipPoints=G.getTipPoints.bind(G),G.positionTip=G.positionTip.bind(G),G.setTipPoints=G.setTipPoints.bind(G),G.colorPanel=new o("Text color",oe.defaultColorSet,G.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),G.colorPanel.onColorChanged=G.setColor,G.bgColorPanel=new o("Fill color",oe.defaultColorSet,G.bgColor,z),G.bgColorPanel.onColorChanged=G.setBgColor,G.fontFamilyPanel=new u("Font",oe.defaultFontFamilies,oe.defaultFontFamily),G.fontFamilyPanel.onFontChanged=G.setFont,G.tipGrip=new r,G.tipGrip.visual.transform.baseVal.appendItem(O.createTransform()),G.controlBox.appendChild(G.tipGrip.visual),G}return W(D,$),D.prototype.ownsTarget=function(M){return $.prototype.ownsTarget.call(this,M)||this.tipGrip.ownsTarget(M)||this.tip===M},D.prototype.createTip=function(){O.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=O.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},D.prototype.pointerDown=function(M,te){this.state==="new"&&$.prototype.pointerDown.call(this,M,te),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(te)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):$.prototype.pointerDown.call(this,M,te)},D.prototype.pointerUp=function(M){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,$.prototype.pointerUp.call(this,M);else{var te=this.state==="creating";$.prototype.pointerUp.call(this,M),this.setTipPoints(te),this.positionTip()}},D.prototype.manipulate=function(M){if(this.tipMoving){var te=this.unrotatePoint(M);this.tipPosition={x:te.x-this.manipulationStartLeft,y:te.y-this.manipulationStartTop},this.positionTip()}else $.prototype.manipulate.call(this,M)},D.prototype.setBgColor=function(M){this.bgRectangle&&this.tip&&(O.setAttributes(this.bgRectangle,[["fill",M]]),O.setAttributes(this.tip,[["fill",M]])),this.bgColor=M,this.fillColorChanged(M)},D.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},D.prototype.setTipPoints=function(M){M===void 0&&(M=!1);var te=Math.min(this.height/2,15),oe=this.height/5;M&&(this.tipPosition={x:te+oe/2,y:this.height+20});var G=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?G<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(oe=this.width/5,te=Math.min(this.width/2,15),this.tipBase1Position={x:te,y:0},this.tipBase2Position={x:te+oe,y:0}):(this.tipBase1Position={x:0,y:te},this.tipBase2Position={x:0,y:te+oe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?G<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(oe=this.width/5,te=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-te-oe,y:0},this.tipBase2Position={x:this.width-te,y:0}):(this.tipBase1Position={x:this.width,y:te},this.tipBase2Position={x:this.width,y:te+oe}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?G<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(oe=this.width/5,te=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-te-oe,y:this.height},this.tipBase2Position={x:this.width-te,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-te-oe},this.tipBase2Position={x:this.width,y:this.height-te}):G<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(oe=this.width/5,te=Math.min(this.width/2,15),this.tipBase1Position={x:te,y:this.height},this.tipBase2Position={x:te+oe,y:this.height}):(this.tipBase1Position={x:0,y:this.height-te},this.tipBase2Position={x:0,y:this.height-te-oe})},D.prototype.resize=function(M){$.prototype.resize.call(this,M),this.positionTip()},D.prototype.positionTip=function(){O.setAttributes(this.tip,[["points",this.getTipPoints()]]);var M=this.tipGrip.visual.transform.baseVal.getItem(0);M.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(M,0)},Object.defineProperty(D.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),D.prototype.select=function(){this.positionTip(),$.prototype.select.call(this)},D.prototype.getState=function(){var M=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},$.prototype.getState.call(this));return M.typeName=D.typeName,M},D.prototype.restoreState=function(M){var te=M;this.bgColor=te.bgColor,this.tipPosition=te.tipPosition,$.prototype.restoreState.call(this,M),this.createTip(),this.setTipPoints()},D.prototype.scale=function(M,te){$.prototype.scale.call(this,M,te),this.tipPosition={x:this.tipPosition.x*M,y:this.tipPosition.y*te},this.positionTip()},D.typeName="CalloutMarker",D.title="Callout marker",D.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',D}(_),ee=function($){function D(M,te,oe){var G=$.call(this,M,te,oe)||this;return G.fillColor="transparent",G.strokeColor="transparent",G.strokeWidth=0,G.strokeDasharray="",G.opacity=1,G.strokeColor=oe.defaultColor,G.strokeWidth=oe.defaultStrokeWidth,G.strokeDasharray=oe.defaultStrokeDasharray,G.fillColor=oe.defaultFillColor,G.setStrokeColor=G.setStrokeColor.bind(G),G.setFillColor=G.setFillColor.bind(G),G.setStrokeWidth=G.setStrokeWidth.bind(G),G.setStrokeDasharray=G.setStrokeDasharray.bind(G),G.setOpacity=G.setOpacity.bind(G),G.createVisual=G.createVisual.bind(G),G.strokePanel=new o("Line color",U(oe.defaultColorSet,["transparent"]),oe.defaultColor),G.strokePanel.onColorChanged=G.setStrokeColor,G.fillPanel=new o("Fill color",U(oe.defaultColorSet,["transparent"]),G.fillColor,z),G.fillPanel.onColorChanged=G.setFillColor,G.strokeWidthPanel=new E("Line width",oe.defaultStrokeWidths,oe.defaultStrokeWidth),G.strokeWidthPanel.onWidthChanged=G.setStrokeWidth,G.strokeStylePanel=new T("Line style",oe.defaultStrokeDasharrays,oe.defaultStrokeDasharray),G.strokeStylePanel.onStyleChanged=G.setStrokeDasharray,G.opacityPanel=new B("Opacity",oe.defaultOpacitySteps,G.opacity),G.opacityPanel.onOpacityChanged=G.setOpacity,G}return W(D,$),D.prototype.ownsTarget=function(M){return!(!$.prototype.ownsTarget.call(this,M)&&M!==this.visual)},D.prototype.createVisual=function(){this.visual=O.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},D.prototype.pointerDown=function(M,te){$.prototype.pointerDown.call(this,M,te),this.state==="new"&&(this.createVisual(),this.moveVisual(M),this._state="creating")},D.prototype.manipulate=function(M){$.prototype.manipulate.call(this,M)},D.prototype.resize=function(M){$.prototype.resize.call(this,M),this.setSize()},D.prototype.setSize=function(){$.prototype.setSize.call(this),O.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},D.prototype.pointerUp=function(M){$.prototype.pointerUp.call(this,M),this.setSize()},D.prototype.setStrokeColor=function(M){this.strokeColor=M,this.visual&&O.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(M),this.stateChanged()},D.prototype.setFillColor=function(M){this.fillColor=M,this.visual&&O.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(M),this.stateChanged()},D.prototype.setStrokeWidth=function(M){this.strokeWidth=M,this.visual&&O.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},D.prototype.setStrokeDasharray=function(M){this.strokeDasharray=M,this.visual&&O.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},D.prototype.setOpacity=function(M){this.opacity=M,this.visual&&O.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(D.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),D.prototype.getState=function(){var M=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},$.prototype.getState.call(this));return M.typeName=D.typeName,M},D.prototype.restoreState=function(M){var te=M;this.fillColor=te.fillColor,this.strokeColor=te.strokeColor,this.strokeWidth=te.strokeWidth,this.strokeDasharray=te.strokeDasharray,this.opacity=te.opacity,this.createVisual(),$.prototype.restoreState.call(this,M),this.setSize()},D.prototype.scale=function(M,te){$.prototype.scale.call(this,M,te),this.setSize()},D.typeName="EllipseMarker",D.title="Ellipse marker",D.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',D}(y),le=function($){function D(M,te,oe){return $.call(this,M,te,oe)||this}return W(D,$),Object.defineProperty(D.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),D.prototype.ownsTarget=function(M){return!(!$.prototype.ownsTarget.call(this,M)&&M!==this.tip1&&M!==this.tip2)},D.prototype.createTips=function(){this.tip1=O.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(O.createTransform()),this.visual.appendChild(this.tip1),this.tip2=O.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(O.createTransform()),this.visual.appendChild(this.tip2)},D.prototype.pointerDown=function(M,te){$.prototype.pointerDown.call(this,M,te),this.state==="creating"&&this.createTips()},D.prototype.adjustVisual=function(){if($.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(O.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),O.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var M=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),te=this.tip1.transform.baseVal.getItem(0);te.setRotate(M,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(te,0);var oe=this.tip2.transform.baseVal.getItem(0);oe.setRotate(M+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(oe,0)}},Object.defineProperty(D.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),D.prototype.getState=function(){var M=$.prototype.getState.call(this);return M.typeName=D.typeName,M},D.prototype.restoreState=function(M){$.prototype.restoreState.call(this,M),this.createTips(),this.adjustVisual()},D.typeName="MeasurementMarker",D.title="Measurement marker",D.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',D}(l),Be=function($){function D(M,te,oe){var G=$.call(this,M,te,oe)||this;return G.strokePanel.colors=oe.defaultColorSet,G.fillColor="transparent",G}return W(D,$),Object.defineProperty(D.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),D.prototype.getState=function(){var M=$.prototype.getState.call(this);return M.typeName=D.typeName,M},D.typeName="EllipseFrameMarker",D.title="Ellipse frame marker",D.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',D}(ee),Ce=function(){function $(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty($.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),$.prototype.addUndoStep=function(D){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(D)||(this.undoStack.push(D),JSON.stringify(this.lastRedoStep)!==JSON.stringify(D)&&this.redoStack.splice(0,this.redoStack.length))},$.prototype.replaceLastUndoStep=function(D){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=D)},$.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},$.prototype.undo=function(){if(this.undoStack.length>1){var D=this.undoStack.pop();return D!==void 0&&this.redoStack.push(D),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},$.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},$}(),Me=function($){function D(M,te,oe){var G=$.call(this,M,te,oe)||this;return G.strokeColor="transparent",G.strokeWidth=0,G.strokeDasharray="",G.curveX=0,G.curveY=0,G.manipulationStartCurveX=0,G.manipulationStartCurveY=0,G.setStrokeColor=G.setStrokeColor.bind(G),G.setStrokeWidth=G.setStrokeWidth.bind(G),G.setStrokeDasharray=G.setStrokeDasharray.bind(G),G.positionGrips=G.positionGrips.bind(G),G.addControlGrips=G.addControlGrips.bind(G),G.adjustVisual=G.adjustVisual.bind(G),G.setupControlBox=G.setupControlBox.bind(G),G.resize=G.resize.bind(G),G.strokeColor=oe.defaultColor,G.strokeWidth=oe.defaultStrokeWidth,G.strokeDasharray=oe.defaultStrokeDasharray,G.strokePanel=new o("Line color",oe.defaultColorSet,oe.defaultColor),G.strokePanel.onColorChanged=G.setStrokeColor,G.strokeWidthPanel=new E("Line width",oe.defaultStrokeWidths,oe.defaultStrokeWidth),G.strokeWidthPanel.onWidthChanged=G.setStrokeWidth,G.strokeStylePanel=new T("Line style",oe.defaultStrokeDasharrays,oe.defaultStrokeDasharray),G.strokeStylePanel.onStyleChanged=G.setStrokeDasharray,G}return W(D,$),D.prototype.ownsTarget=function(M){return!(!$.prototype.ownsTarget.call(this,M)&&M!==this.visual&&M!==this.selectorCurve&&M!==this.visibleCurve&&!this.curveGrip.ownsTarget(M))},D.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},D.prototype.createVisual=function(){this.visual=O.createGroup(),this.selectorCurve=O.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=O.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},D.prototype.pointerDown=function(M,te){$.prototype.pointerDown.call(this,M,te),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=M.x,this.curveY=M.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(te)&&(this.activeGrip=this.curveGrip,this._state="resize")},D.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),O.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),O.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),O.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},D.prototype.setupControlBox=function(){$.prototype.setupControlBox.call(this),this.curveControlLine1=O.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=O.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},D.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,$.prototype.addControlGrips.call(this)},D.prototype.positionGrips=function(){$.prototype.positionGrips.call(this);var M=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-M/2,this.curveY-M/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},D.prototype.manipulate=function(M){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+M.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+M.y-this.manipulationStartY),$.prototype.manipulate.call(this,M)},D.prototype.resize=function(M){this.activeGrip===this.curveGrip&&(this.curveX=M.x,this.curveY=M.y),$.prototype.resize.call(this,M),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},D.prototype.setStrokeColor=function(M){this.strokeColor=M,this.adjustVisual(),this.colorChanged(M)},D.prototype.setStrokeWidth=function(M){this.strokeWidth=M,this.adjustVisual()},D.prototype.setStrokeDasharray=function(M){this.strokeDasharray=M,this.adjustVisual()},D.prototype.scale=function(M,te){this.curveX=this.curveX*M,this.curveY=this.curveY*te,$.prototype.scale.call(this,M,te)},Object.defineProperty(D.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),D.prototype.getState=function(){var M=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},$.prototype.getState.call(this));return M.typeName=D.typeName,M},D.prototype.restoreState=function(M){$.prototype.restoreState.call(this,M);var te=M;this.strokeColor=te.strokeColor,this.strokeWidth=te.strokeWidth,this.strokeDasharray=te.strokeDasharray,this.curveX=te.curveX,this.curveY=te.curveY,this.createVisual(),this.adjustVisual()},D.typeName="CurveMarker",D.title="Curve marker",D.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',D}(c),Le=function(){function $(D,M){M===void 0&&(M=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=D,this.cancelable=M}return Object.defineProperty($.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),$.prototype.preventDefault=function(){this._defaultPrevented=!0},$}(),je=function($){function D(M,te,oe){var G=$.call(this,M,!1)||this;return G.dataUrl=te,G.state=oe,G}return W(D,$),D}(Le),He=function($){function D(M,te,oe){oe===void 0&&(oe=!1);var G=$.call(this,M,oe)||this;return G.marker=te,G}return W(D,$),D}(Le),Je=function(){function $(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return $.prototype.addEventListener=function(D,M){this[D].push(M)},$.prototype.removeEventListener=function(D,M){var te=this[D].indexOf(M);te>-1&&this[D].splice(te,1)},$}(),Se=function(){function $(D){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new h,this._isOpen=!1,this.undoRedoManager=new Ce,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new Je,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=$.instanceCounter++,this.styles=new I(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=D,this.targetRoot=document.body,this.width=D.clientWidth,this.height=D.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty($.prototype,"ALL_MARKER_TYPES",{get:function(){return[C,g,F,_,Be,ee,Q,N,le,H,l,Me]},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[C,g,F,_,ee,Q,N]},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"BASIC_MARKER_TYPES",{get:function(){return[C,g,F,_,Q]},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(D){var M=this;this._availableMarkerTypes.splice(0),D.forEach(function(te){if(typeof te=="string"){var oe=M.ALL_MARKER_TYPES.find(function(G){return G.typeName===te});oe!==void 0&&M._availableMarkerTypes.push(oe)}else M._availableMarkerTypes.push(te)})},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(D){this._zoomLevel=D,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),$.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),q.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},$.prototype.show=function(){var D=this;this.styles.styleSheetRoot===void 0&&e.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=e.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(M){return M(new Le(D))})},$.prototype.render=function(){return L(this,void 0,void 0,function(){var D;return V(this,function(M){switch(M.label){case 0:return this.setCurrentMarker(),(D=new k).naturalSize=this.renderAtNaturalSize,D.imageType=this.renderImageType,D.imageQuality=this.renderImageQuality,D.markersOnly=this.renderMarkersOnly,D.width=this.renderWidth,D.height=this.renderHeight,[4,D.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return M.sent(),[4,D.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,M.sent()]}})})},$.prototype.close=function(D){var M=this;if(D===void 0&&(D=!1),this.isOpen){var te=!1;D||this.eventListeners.beforeclose.forEach(function(oe){var G=new Le(M,!0);oe(G),G.defaultPrevented&&(te=!0)}),te||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(oe){return oe(new Le(M))}),this.detachEvents(),this._isOpen=!1)}},$.prototype.addMarkersToToolbar=function(){for(var D,M=[],te=0;te<arguments.length;te++)M[te]=arguments[te];(D=this._availableMarkerTypes).push.apply(D,M)},$.prototype.addRenderEventListener=function(D){this.addEventListener("render",function(M){D(M.dataUrl,M.state)})},$.prototype.removeRenderEventListener=function(D){},$.prototype.addCloseEventListener=function(D){this.addEventListener("close",function(){D()})},$.prototype.removeCloseEventListener=function(D){},$.prototype.setupResizeObserver=function(){var D=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){D.resize(D.target.clientWidth,D.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return D.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},$.prototype.onPopupTargetResize=function(){var D=1*this.target.clientWidth/this.target.clientHeight,M=this.editorCanvas.clientWidth/D>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*D:this.editorCanvas.clientWidth,te=M<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/D;this.resize(M,te)},$.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},$.prototype.resize=function(D,M){this._isResizing=!0;var te=D/this.imageWidth,oe=M/this.imageHeight;this.imageWidth=Math.round(D),this.imageHeight=Math.round(M),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(te,oe),this._isResizing=!1},$.prototype.scaleMarkers=function(D,M){var te,oe=this;this._currentMarker&&this._currentMarker instanceof _?this._currentMarker.scale(D,M):(te=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(G){G!==oe._currentMarker&&G.scale(D,M)}),te!==void 0&&this.setCurrentMarker(te)},$.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},$.prototype.setTopLeft=function(){var D=this.editingTarget.getBoundingClientRect(),M=this.editorCanvas.getBoundingClientRect();this.left=D.left-M.left,this.top=D.top-M.top},$.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},$.prototype.addDefs=function(){for(var D,M=[],te=0;te<arguments.length;te++)M[te]=arguments[te];this.defs=O.createDefs(),this.addDefsToImage(),(D=this.defs).append.apply(D,M)},$.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},$.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},$.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},$.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},$.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},$.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},$.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},$.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var D=document.createElement("a");D.href="https://markerjs.com/",D.target="_blank",D.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',D.title="Powered by marker.js",D.style.display="grid",D.style.alignItems="center",D.style.justifyItems="center",D.style.padding="3px",D.style.width="20px",D.style.height="20px",this.logoUI.appendChild(D),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},$.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},$.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},$.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},$.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var D=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=D+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new A(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new s(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},$.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},$.prototype.removeMarker=function(D){this.markerImage.removeChild(D.container),this.markers.indexOf(D)>-1&&this.markers.splice(this.markers.indexOf(D),1),D.dispose()},$.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},$.prototype.toolbarButtonClicked=function(D,M){if(D==="marker"&&M!==void 0)this.createNewMarker(M);else if(D==="action")switch(M){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},$.prototype.deleteSelectedMarker=function(){var D=this;if(this._currentMarker!==void 0){var M=!1;if(this.eventListeners.markerbeforedelete.forEach(function(oe){var G=new He(D,D._currentMarker,!0);oe(G),G.defaultPrevented&&(M=!0)}),!M){var te=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(oe){return oe(new He(D,te))})}}},$.prototype.clear=function(){var D=this,M=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(re){var j=new He(D,void 0,!0);re(j),j.defaultPrevented&&(M=!0)}),!M)){this.setCurrentMarker();for(var te=function(re){var j=oe.markers[re];oe.setCurrentMarker(oe.markers[re]),oe._currentMarker.dispose(),oe.markerImage.removeChild(oe._currentMarker.container),oe.markers.splice(oe.markers.indexOf(oe._currentMarker),1),oe.eventListeners.markerdelete.forEach(function(J){return J(new He(D,j))})},oe=this,G=this.markers.length-1;G>=0;G--)te(G);this.addUndoStep()}},Object.defineProperty($.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),$.prototype.showNotesEditor=function(){var D;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(D=this._currentMarker.notes)!==null&&D!==void 0?D:"",this.overlayContainer.appendChild(this.notesArea))},$.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},$.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},$.prototype.addUndoStep=function(){var D=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var M=this.getState(),te=this.undoRedoManager.getLastUndoStep();if(!te||te.width===M.width&&te.height===M.height){var oe=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(M),oe<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(G){return G(new Le(D))})}else this.undoRedoManager.replaceLastUndoStep(M),this.eventListeners.statechange.forEach(function(G){return G(new Le(D))})}},$.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},$.prototype.undoStep=function(){var D=this,M=this.undoRedoManager.undo();M!==void 0&&(this.restoreState(M),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(te){return te(new Le(D))}))},$.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},$.prototype.redoStep=function(){var D=this,M=this.undoRedoManager.redo();M!==void 0&&(this.restoreState(M),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(te){return te(new Le(D))}))},$.prototype.stepZoom=function(){var D=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=D<this.zoomSteps.length-1?this.zoomSteps[D+1]:this.zoomSteps[0]},$.prototype.panTo=function(D){this.contentDiv.scrollBy({left:this.prevPanPoint.x-D.x,top:this.prevPanPoint.y-D.y}),this.prevPanPoint=D},$.prototype.startRenderAndClose=function(){return L(this,void 0,void 0,function(){var D,M,te=this;return V(this,function(oe){switch(oe.label){case 0:return[4,this.render()];case 1:return D=oe.sent(),M=this.getState(),this.eventListeners.render.forEach(function(G){return G(new je(te,D,M))}),this.close(!0),[2]}})})},$.prototype.getState=function(D){D===!0&&this.setCurrentMarker();var M={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(te){return M.markers.push(te.getState())}),M},$.prototype.restoreState=function(D){var M=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);D.markers.forEach(function(te){var oe=M._availableMarkerTypes.find(function(re){return re.typeName===te.typeName});if(oe!==void 0){var G=M.addNewMarker(oe);G.restoreState(te),M.markers.push(G)}}),D.width&&D.height&&(D.width!==this.imageWidth||D.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/D.width,this.imageHeight/D.height),this.eventListeners.restorestate.forEach(function(te){return te(new Le(M))})},$.prototype.addNewMarker=function(D){var M=O.createGroup();return this.markerImage.appendChild(M),new D(M,this.overlayContainer,this.settings)},$.prototype.createNewMarker=function(D){var M,te=this;(M=typeof D=="string"?this._availableMarkerTypes.find(function(oe){return oe.typeName===D}):D)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(M),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(M.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(oe){return oe(new He(te,te._currentMarker))}))},$.prototype.markerCreated=function(D){var M=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(D),this.setCurrentMarker(D),D instanceof g&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(g):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(te){return te(new He(M,M._currentMarker))})},$.prototype.colorChanged=function(D){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=D,this.settings.defaultStrokeColor=D)},$.prototype.fillColorChanged=function(D){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=D)},$.prototype.markerStateChanged=function(D){var M=this;this.eventListeners.markerchange.forEach(function(te){return te(new He(M,D))})},$.prototype.setCurrentMarker=function(D){var M=this;this._currentMarker!==D&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(te){return te(new He(M,M._currentMarker))})),this._currentMarker=D,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(te){return te(new He(M,M._currentMarker))}))},$.prototype.onPointerDown=function(D){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||D.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var M=this.markers.find(function(te){return te.ownsTarget(D.target)});M!==void 0?(this.setCurrentMarker(M),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(D.clientX,D.clientY),D.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:D.clientX,y:D.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(D.clientX,D.clientY))},$.prototype.onDblClick=function(D){if(this._isFocused||this.focus(),this.mode==="select"){var M=this.markers.find(function(te){return te.ownsTarget(D.target)});M!==void 0&&M!==this._currentMarker&&this.setCurrentMarker(M),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(D.clientX,D.clientY),D.target):this.setCurrentMarker()}},$.prototype.onPointerMove=function(D){this.touchPoints!==1&&D.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||D.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(D.clientX,D.clientY)):this.zoomLevel>1&&this.panTo({x:D.clientX,y:D.clientY}))},$.prototype.onPointerUp=function(D){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(D.clientX,D.clientY)),this.isDragging=!1,this.addUndoStep()},$.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},$.prototype.onKeyUp=function(D){this._currentMarker===void 0||this.notesArea!==void 0||D.key!=="Delete"&&D.key!=="Backspace"||this.deleteSelectedMarker()},$.prototype.clientToLocalCoordinates=function(D,M){var te=this.markerImage.getBoundingClientRect();return{x:(D-te.left)/this.zoomLevel,y:(M-te.top)/this.zoomLevel}},$.prototype.onWindowResize=function(){this.positionUI()},$.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var D=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=D+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},$.prototype.addLicenseKey=function(D){q.addKey(D)},$.prototype.addEventListener=function(D,M){this.eventListeners.addEventListener(D,M)},$.prototype.removeEventListener=function(D,M){this.eventListeners.removeEventListener(D,M)},$.prototype.renderState=function(D){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(D),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty($.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),$.prototype.focus=function(){var D=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(M){return M(new Le(D))}))},$.prototype.blur=function(){var D=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(M){return M(new Le(D))}))},$.instanceCounter=0,$}()},T8No:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return q}),K.d(Oe,"e",function(){return k}),K.d(Oe,"c",function(){return l}),K.d(Oe,"b",function(){return u}),K.d(Oe,"d",function(){return _}),K.d(Oe,"f",function(){return F});var fe=K("MNsG"),W=K("N0LK"),L=K("Cg/j");let V=fe.k||"";const U=new Map;U.set("false",!1),U.set("true",!0),U.set("isMac",fe.f),U.set("isLinux",fe.d),U.set("isWindows",fe.i),U.set("isWeb",fe.h),U.set("isMacNative",fe.f&&!fe.h),U.set("isEdge",V.indexOf("Edg/")>=0),U.set("isFirefox",V.indexOf("Firefox")>=0),U.set("isChrome",V.indexOf("Chrome")>=0),U.set("isSafari",V.indexOf("Safari")>=0);const O=Object.prototype.hasOwnProperty;class q{static has(B){return p.create(B)}static equals(B,Q){return A.create(B,Q)}static regex(B,Q){return E.create(B,Q)}static not(B){return n.create(B)}static and(...B){return h.create(B,null)}static or(...B){return c.create(B,null,!0)}static deserialize(B,Q=!1){return B?this._deserializeOrExpression(B,Q):void 0}static _deserializeOrExpression(B,Q){let z=B.split("||");return c.create(z.map(N=>this._deserializeAndExpression(N,Q)),null,!0)}static _deserializeAndExpression(B,Q){let z=B.split("&&");return h.create(z.map(N=>this._deserializeOne(N,Q)),null)}static _deserializeOne(B,Q){if(B=B.trim(),B.indexOf("!=")>=0){let z=B.split("!=");return o.create(z[0].trim(),this._deserializeValue(z[1],Q))}if(B.indexOf("==")>=0){let z=B.split("==");return A.create(z[0].trim(),this._deserializeValue(z[1],Q))}if(B.indexOf("=~")>=0){let z=B.split("=~");return E.create(z[0].trim(),this._deserializeRegexValue(z[1],Q))}if(B.indexOf(" in ")>=0){let z=B.split(" in ");return s.create(z[0].trim(),z[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(B)){const z=B.split(">=");return t.create(z[0].trim(),z[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(B)){const z=B.split(">");return r.create(z[0].trim(),z[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(B)){const z=B.split("<=");return b.create(z[0].trim(),z[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(B)){const z=B.split("<");return y.create(z[0].trim(),z[1].trim())}return/^\!\s*/.test(B)?n.create(B.substr(1).trim()):p.create(B)}static _deserializeValue(B,Q){if(B=B.trim(),B==="true")return!0;if(B==="false")return!1;let z=/^'([^']*)'$/.exec(B);return z?z[1].trim():B}static _deserializeRegexValue(B,Q){if(Object(W.C)(B)){if(Q)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let z=B.indexOf("/"),N=B.lastIndexOf("/");if(z===N||z<0){if(Q)throw new Error(`bad regexp-value '${B}', missing /-enclosure`);return console.warn(`bad regexp-value '${B}', missing /-enclosure`),null}let ee=B.slice(z+1,N),le=B[N+1]==="i"?"i":"";try{return new RegExp(ee,le)}catch(Be){if(Q)throw new Error(`bad regexp-value '${B}', parse error: ${Be}`);return console.warn(`bad regexp-value '${B}', parse error: ${Be}`),null}}}function k(B,Q){const z=B?B.substituteConstants():void 0,N=Q?Q.substituteConstants():void 0;return!z&&!N?!0:!z||!N?!1:z.equals(N)}function e(B,Q){return B.cmp(Q)}class I{constructor(){this.type=0}cmp(B){return this.type-B.type}equals(B){return B.type===this.type}substituteConstants(){return this}evaluate(B){return!1}serialize(){return"false"}keys(){return[]}negate(){return d.INSTANCE}}I.INSTANCE=new I;class d{constructor(){this.type=1}cmp(B){return this.type-B.type}equals(B){return B.type===this.type}substituteConstants(){return this}evaluate(B){return!0}serialize(){return"true"}keys(){return[]}negate(){return I.INSTANCE}}d.INSTANCE=new d;class p{constructor(B,Q){this.key=B,this.negated=Q,this.type=2}static create(B,Q=null){const z=U.get(B);return typeof z=="boolean"?z?d.INSTANCE:I.INSTANCE:new p(B,Q)}cmp(B){return B.type!==this.type?this.type-B.type:g(this.key,B.key)}equals(B){return B.type===this.type?this.key===B.key:!1}substituteConstants(){const B=U.get(this.key);return typeof B=="boolean"?B?d.INSTANCE:I.INSTANCE:this}evaluate(B){return!!B.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=n.create(this.key,this)),this.negated}}class A{constructor(B,Q,z){this.key=B,this.value=Q,this.negated=z,this.type=4}static create(B,Q,z=null){if(typeof Q=="boolean")return Q?p.create(B,z):n.create(B,z);const N=U.get(B);if(typeof N=="boolean"){const ee=N?"true":"false";return Q===ee?d.INSTANCE:I.INSTANCE}return new A(B,Q,z)}cmp(B){return B.type!==this.type?this.type-B.type:m(this.key,this.value,B.key,B.value)}equals(B){return B.type===this.type?this.key===B.key&&this.value===B.value:!1}substituteConstants(){const B=U.get(this.key);if(typeof B=="boolean"){const Q=B?"true":"false";return this.value===Q?d.INSTANCE:I.INSTANCE}return this}evaluate(B){return B.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this.value,this)),this.negated}}class s{constructor(B,Q){this.key=B,this.valueKey=Q,this.type=10,this.negated=null}static create(B,Q){return new s(B,Q)}cmp(B){return B.type!==this.type?this.type-B.type:m(this.key,this.valueKey,B.key,B.valueKey)}equals(B){return B.type===this.type?this.key===B.key&&this.valueKey===B.valueKey:!1}substituteConstants(){return this}evaluate(B){const Q=B.getValue(this.valueKey),z=B.getValue(this.key);return Array.isArray(Q)?Q.indexOf(z)>=0:typeof z=="string"&&typeof Q=="object"&&Q!==null?O.call(Q,z):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=i.create(this)),this.negated}}class i{constructor(B){this._actual=B,this.type=11}static create(B){return new i(B)}cmp(B){return B.type!==this.type?this.type-B.type:this._actual.cmp(B._actual)}equals(B){return B.type===this.type?this._actual.equals(B._actual):!1}substituteConstants(){return this}evaluate(B){return!this._actual.evaluate(B)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class o{constructor(B,Q,z){this.key=B,this.value=Q,this.negated=z,this.type=5}static create(B,Q,z=null){if(typeof Q=="boolean")return Q?n.create(B,z):p.create(B,z);const N=U.get(B);if(typeof N=="boolean"){const ee=N?"true":"false";return Q===ee?I.INSTANCE:d.INSTANCE}return new o(B,Q,z)}cmp(B){return B.type!==this.type?this.type-B.type:m(this.key,this.value,B.key,B.value)}equals(B){return B.type===this.type?this.key===B.key&&this.value===B.value:!1}substituteConstants(){const B=U.get(this.key);if(typeof B=="boolean"){const Q=B?"true":"false";return this.value===Q?I.INSTANCE:d.INSTANCE}return this}evaluate(B){return B.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class n{constructor(B,Q){this.key=B,this.negated=Q,this.type=3}static create(B,Q=null){const z=U.get(B);return typeof z=="boolean"?z?I.INSTANCE:d.INSTANCE:new n(B,Q)}cmp(B){return B.type!==this.type?this.type-B.type:g(this.key,B.key)}equals(B){return B.type===this.type?this.key===B.key:!1}substituteConstants(){const B=U.get(this.key);return typeof B=="boolean"?B?I.INSTANCE:d.INSTANCE:this}evaluate(B){return!B.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this)),this.negated}}function a(B,Q){if(typeof B=="string"){const z=parseFloat(B);isNaN(z)||(B=z)}return typeof B=="string"||typeof B=="number"?Q(B):I.INSTANCE}class r{constructor(B,Q,z){this.key=B,this.value=Q,this.negated=z,this.type=12}static create(B,Q,z=null){return a(Q,N=>new r(B,N,z))}cmp(B){return B.type!==this.type?this.type-B.type:m(this.key,this.value,B.key,B.value)}equals(B){return B.type===this.type?this.key===B.key&&this.value===B.value:!1}substituteConstants(){return this}evaluate(B){return typeof this.value=="string"?!1:parseFloat(B.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this.value,this)),this.negated}}class t{constructor(B,Q,z){this.key=B,this.value=Q,this.negated=z,this.type=13}static create(B,Q,z=null){return a(Q,N=>new t(B,N,z))}cmp(B){return B.type!==this.type?this.type-B.type:m(this.key,this.value,B.key,B.value)}equals(B){return B.type===this.type?this.key===B.key&&this.value===B.value:!1}substituteConstants(){return this}evaluate(B){return typeof this.value=="string"?!1:parseFloat(B.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y.create(this.key,this.value,this)),this.negated}}class y{constructor(B,Q,z){this.key=B,this.value=Q,this.negated=z,this.type=14}static create(B,Q,z=null){return a(Q,N=>new y(B,N,z))}cmp(B){return B.type!==this.type?this.type-B.type:m(this.key,this.value,B.key,B.value)}equals(B){return B.type===this.type?this.key===B.key&&this.value===B.value:!1}substituteConstants(){return this}evaluate(B){return typeof this.value=="string"?!1:parseFloat(B.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=t.create(this.key,this.value,this)),this.negated}}class b{constructor(B,Q,z){this.key=B,this.value=Q,this.negated=z,this.type=15}static create(B,Q,z=null){return a(Q,N=>new b(B,N,z))}cmp(B){return B.type!==this.type?this.type-B.type:m(this.key,this.value,B.key,B.value)}equals(B){return B.type===this.type?this.key===B.key&&this.value===B.value:!1}substituteConstants(){return this}evaluate(B){return typeof this.value=="string"?!1:parseFloat(B.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}class E{constructor(B,Q){this.key=B,this.regexp=Q,this.type=7,this.negated=null}static create(B,Q){return new E(B,Q)}cmp(B){if(B.type!==this.type)return this.type-B.type;if(this.key<B.key)return-1;if(this.key>B.key)return 1;const Q=this.regexp?this.regexp.source:"",z=B.regexp?B.regexp.source:"";return Q<z?-1:Q>z?1:0}equals(B){if(B.type===this.type){const Q=this.regexp?this.regexp.source:"",z=B.regexp?B.regexp.source:"";return this.key===B.key&&Q===z}return!1}substituteConstants(){return this}evaluate(B){let Q=B.getValue(this.key);return this.regexp?this.regexp.test(Q):!1}serialize(){const B=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${B}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=T.create(this)),this.negated}}class T{constructor(B){this._actual=B,this.type=8}static create(B){return new T(B)}cmp(B){return B.type!==this.type?this.type-B.type:this._actual.cmp(B._actual)}equals(B){return B.type===this.type?this._actual.equals(B._actual):!1}substituteConstants(){return this}evaluate(B){return!this._actual.evaluate(B)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function C(B){let Q=null;for(let z=0,N=B.length;z<N;z++){const ee=B[z].substituteConstants();if(B[z]!==ee&&Q===null){Q=[];for(let le=0;le<z;le++)Q[le]=B[le]}Q!==null&&(Q[z]=ee)}return Q===null?B:Q}class h{constructor(B,Q){this.expr=B,this.negated=Q,this.type=6}static create(B,Q){return h._normalizeArr(B,Q)}cmp(B){if(B.type!==this.type)return this.type-B.type;if(this.expr.length<B.expr.length)return-1;if(this.expr.length>B.expr.length)return 1;for(let Q=0,z=this.expr.length;Q<z;Q++){const N=e(this.expr[Q],B.expr[Q]);if(N!==0)return N}return 0}equals(B){if(B.type===this.type){if(this.expr.length!==B.expr.length)return!1;for(let Q=0,z=this.expr.length;Q<z;Q++)if(!this.expr[Q].equals(B.expr[Q]))return!1;return!0}return!1}substituteConstants(){const B=C(this.expr);return B===this.expr?this:h.create(B,this.negated)}evaluate(B){for(let Q=0,z=this.expr.length;Q<z;Q++)if(!this.expr[Q].evaluate(B))return!1;return!0}static _normalizeArr(B,Q){const z=[];let N=!1;for(const ee of B){if(!ee)continue;if(ee.type===1){N=!0;continue}if(ee.type===0)return I.INSTANCE;if(ee.type===6){z.push(...ee.expr);continue}z.push(ee)}if(z.length===0&&N)return d.INSTANCE;if(z.length===0)return;if(z.length===1)return z[0];z.sort(e);for(let ee=1;ee<z.length;ee++)z[ee-1].equals(z[ee])&&(z.splice(ee,1),ee--);if(z.length===1)return z[0];for(;z.length>1;){const ee=z[z.length-1];if(ee.type!==9)break;z.pop();const le=z.pop(),Be=z.length===0,Ce=c.create(ee.expr.map(Me=>h.create([Me,le],null)),null,Be);Ce&&(z.push(Ce),z.sort(e))}return z.length===1?z[0]:new h(z,Q)}serialize(){return this.expr.map(B=>B.serialize()).join(" && ")}keys(){const B=[];for(let Q of this.expr)B.push(...Q.keys());return B}negate(){if(!this.negated){const B=[];for(let Q of this.expr)B.push(Q.negate());this.negated=c.create(B,this,!0)}return this.negated}}class c{constructor(B,Q){this.expr=B,this.negated=Q,this.type=9}static create(B,Q,z){return c._normalizeArr(B,Q,z)}cmp(B){if(B.type!==this.type)return this.type-B.type;if(this.expr.length<B.expr.length)return-1;if(this.expr.length>B.expr.length)return 1;for(let Q=0,z=this.expr.length;Q<z;Q++){const N=e(this.expr[Q],B.expr[Q]);if(N!==0)return N}return 0}equals(B){if(B.type===this.type){if(this.expr.length!==B.expr.length)return!1;for(let Q=0,z=this.expr.length;Q<z;Q++)if(!this.expr[Q].equals(B.expr[Q]))return!1;return!0}return!1}substituteConstants(){const B=C(this.expr);return B===this.expr?this:c.create(B,this.negated,!1)}evaluate(B){for(let Q=0,z=this.expr.length;Q<z;Q++)if(this.expr[Q].evaluate(B))return!0;return!1}static _normalizeArr(B,Q,z){let N=[],ee=!1;if(B){for(let le=0,Be=B.length;le<Be;le++){const Ce=B[le];if(!Ce)continue;if(Ce.type===0){ee=!0;continue}if(Ce.type===1)return d.INSTANCE;if(Ce.type===9){N=N.concat(Ce.expr);continue}N.push(Ce)}if(N.length===0&&ee)return I.INSTANCE;N.sort(e)}if(N.length===0)return;if(N.length===1)return N[0];for(let le=1;le<N.length;le++)N[le-1].equals(N[le])&&(N.splice(le,1),le--);if(N.length===1)return N[0];if(z){for(let le=0;le<N.length;le++)for(let Be=le+1;Be<N.length;Be++)F(N[le],N[Be])&&(N.splice(Be,1),Be--);if(N.length===1)return N[0]}return new c(N,Q)}serialize(){return this.expr.map(B=>B.serialize()).join(" || ")}keys(){const B=[];for(let Q of this.expr)B.push(...Q.keys());return B}negate(){if(!this.negated){let B=[];for(let Q of this.expr)B.push(Q.negate());for(;B.length>1;){const Q=B.shift(),z=B.shift(),N=[];for(const le of H(Q))for(const Be of H(z))N.push(h.create([le,Be],null));const ee=B.length===0;B.unshift(c.create(N,null,ee))}this.negated=B[0]}return this.negated}}class l extends p{constructor(B,Q,z){super(B,null);this._defaultValue=Q,typeof z=="object"?l._info.push(Object.assign(Object.assign({},z),{key:B})):z!==!0&&l._info.push({key:B,description:z,type:Q!=null?typeof Q:void 0})}static all(){return l._info.values()}bindTo(B){return B.createKey(this.key,this._defaultValue)}getValue(B){return B.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(B){return A.create(this.key,B)}}l._info=[];const u=Object(L.c)("contextKeyService"),_="setContext";function g(B,Q){return B<Q?-1:B>Q?1:0}function m(B,Q,z,N){return B<z?-1:B>z?1:Q<N?-1:Q>N?1:0}function F(B,Q){if(Q.type===6&&B.type!==9&&B.type!==6){for(const ee of Q.expr)if(B.equals(ee))return!0}const z=B.negate(),N=H(z).concat(H(Q));N.sort(e);for(let ee=0;ee<N.length;ee++){const le=N[ee],Be=le.negate();for(let Ce=ee+1;Ce<N.length;Ce++){const Me=N[Ce];if(Be.equals(Me))return!0}}return!1}function H(B){return B.type===9?B.expr:[B]}},TXwP:function(ft,Oe,K){var fe,W;(function(){var L;(function(){"use strict";var U=[,,function(e){function I(A){this.__parent=A,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}I.prototype.clone_empty=function(){var A=new I(this.__parent);return A.set_indent(this.__indent_count,this.__alignment_count),A},I.prototype.item=function(A){return A<0?this.__items[this.__items.length+A]:this.__items[A]},I.prototype.has_match=function(A){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(A))return!0;return!1},I.prototype.set_indent=function(A,s){this.is_empty()&&(this.__indent_count=A||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},I.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},I.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},I.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var A=this.__parent.current_line;return A.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),A.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),A.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,A.__items[0]===" "&&(A.__items.splice(0,1),A.__character_count-=1),!0}return!1},I.prototype.is_empty=function(){return this.__items.length===0},I.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},I.prototype.push=function(A){this.__items.push(A);var s=A.lastIndexOf(`
|
|
`);s!==-1?this.__character_count=A.length-s:this.__character_count+=A.length},I.prototype.pop=function(){var A=null;return this.is_empty()||(A=this.__items.pop(),this.__character_count-=A.length),A},I.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},I.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},I.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},I.prototype.toString=function(){var A="";return this.is_empty()?this.__parent.indent_empty_lines&&(A=this.__parent.get_indent_string(this.__indent_count)):(A=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),A+=this.__items.join("")),A};function d(A,s){this.__cache=[""],this.__indent_size=A.indent_size,this.__indent_string=A.indent_char,A.indent_with_tabs||(this.__indent_string=new Array(A.indent_size+1).join(A.indent_char)),s=s||"",A.indent_level>0&&(s=new Array(A.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}d.prototype.get_indent_size=function(A,s){var i=this.__base_string_length;return s=s||0,A<0&&(i=0),i+=A*this.__indent_size,i+=s,i},d.prototype.get_indent_string=function(A,s){var i=this.__base_string;return s=s||0,A<0&&(A=0,i=""),s+=A*this.__indent_size,this.__ensure_cache(s),i+=this.__cache[s],i},d.prototype.__ensure_cache=function(A){for(;A>=this.__cache.length;)this.__add_column()},d.prototype.__add_column=function(){var A=this.__cache.length,s=0,i="";this.__indent_size&&A>=this.__indent_size&&(s=Math.floor(A/this.__indent_size),A-=s*this.__indent_size,i=new Array(s+1).join(this.__indent_string)),A&&(i+=new Array(A+1).join(" ")),this.__cache.push(i)};function p(A,s){this.__indent_cache=new d(A,s),this.raw=!1,this._end_with_newline=A.end_with_newline,this.indent_size=A.indent_size,this.wrap_line_length=A.wrap_line_length,this.indent_empty_lines=A.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new I(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}p.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},p.prototype.get_line_number=function(){return this.__lines.length},p.prototype.get_indent_string=function(A,s){return this.__indent_cache.get_indent_string(A,s)},p.prototype.get_indent_size=function(A,s){return this.__indent_cache.get_indent_size(A,s)},p.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},p.prototype.add_new_line=function(A){return this.is_empty()||!A&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},p.prototype.get_code=function(A){this.trim(!0);var s=this.current_line.pop();s&&(s[s.length-1]===`
|
|
`&&(s=s.replace(/\n+$/g,"")),this.current_line.push(s)),this._end_with_newline&&this.__add_outputline();var i=this.__lines.join(`
|
|
`);return A!==`
|
|
`&&(i=i.replace(/[\n]/g,A)),i},p.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},p.prototype.set_indent=function(A,s){return A=A||0,s=s||0,this.next_line.set_indent(A,s),this.__lines.length>1?(this.current_line.set_indent(A,s),!0):(this.current_line.set_indent(),!1)},p.prototype.add_raw_token=function(A){for(var s=0;s<A.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(A.whitespace_before),this.current_line.push(A.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},p.prototype.add_token=function(A){this.__add_space_before_token(),this.current_line.push(A),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},p.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},p.prototype.remove_indent=function(A){for(var s=this.__lines.length;A<s;)this.__lines[A]._remove_indent(),A++;this.current_line._remove_wrap_indent()},p.prototype.trim=function(A){for(A=A===void 0?!1:A,this.current_line.trim();A&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},p.prototype.just_added_newline=function(){return this.current_line.is_empty()},p.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},p.prototype.ensure_empty_line_above=function(A,s){for(var i=this.__lines.length-2;i>=0;){var o=this.__lines[i];if(o.is_empty())break;if(o.item(0).indexOf(A)!==0&&o.item(-1)!==s){this.__lines.splice(i+1,0,new I(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=p},,,,function(e){function I(A,s){this.raw_options=d(A,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}I.prototype._get_array=function(A,s){var i=this.raw_options[A],o=s||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(o=i.concat()):typeof i=="string"&&(o=i.split(/[^a-zA-Z0-9_\/\-]+/)),o},I.prototype._get_boolean=function(A,s){var i=this.raw_options[A],o=i===void 0?!!s:!!i;return o},I.prototype._get_characters=function(A,s){var i=this.raw_options[A],o=s||"";return typeof i=="string"&&(o=i.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),o},I.prototype._get_number=function(A,s){var i=this.raw_options[A];s=parseInt(s,10),isNaN(s)&&(s=0);var o=parseInt(i,10);return isNaN(o)&&(o=s),o},I.prototype._get_selection=function(A,s,i){var o=this._get_selection_list(A,s,i);if(o.length!==1)throw new Error("Invalid Option Value: The option '"+A+`' can only be one of the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[A]+"'");return o[0]},I.prototype._get_selection_list=function(A,s,i){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(i=i||[s[0]],!this._is_valid_selection(i,s))throw new Error("Invalid Default Value!");var o=this._get_array(A,i);if(!this._is_valid_selection(o,s))throw new Error("Invalid Option Value: The option '"+A+`' can contain only the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[A]+"'");return o},I.prototype._is_valid_selection=function(A,s){return A.length&&s.length&&!A.some(function(i){return s.indexOf(i)===-1})};function d(A,s){var i={};A=p(A);var o;for(o in A)o!==s&&(i[o]=A[o]);if(s&&A[s])for(o in A[s])i[o]=A[s][o];return i}function p(A){var s={},i;for(i in A){var o=i.replace(/-/g,"_");s[o]=A[i]}return s}e.exports.Options=I,e.exports.normalizeOpts=p,e.exports.mergeOpts=d},,function(e){var I=RegExp.prototype.hasOwnProperty("sticky");function d(p){this.__input=p||"",this.__input_length=this.__input.length,this.__position=0}d.prototype.restart=function(){this.__position=0},d.prototype.back=function(){this.__position>0&&(this.__position-=1)},d.prototype.hasNext=function(){return this.__position<this.__input_length},d.prototype.next=function(){var p=null;return this.hasNext()&&(p=this.__input.charAt(this.__position),this.__position+=1),p},d.prototype.peek=function(p){var A=null;return p=p||0,p+=this.__position,p>=0&&p<this.__input_length&&(A=this.__input.charAt(p)),A},d.prototype.__match=function(p,A){p.lastIndex=A;var s=p.exec(this.__input);return s&&!(I&&p.sticky)&&(s.index!==A&&(s=null)),s},d.prototype.test=function(p,A){return A=A||0,A+=this.__position,A>=0&&A<this.__input_length?!!this.__match(p,A):!1},d.prototype.testChar=function(p,A){var s=this.peek(A);return p.lastIndex=0,s!==null&&p.test(s)},d.prototype.match=function(p){var A=this.__match(p,this.__position);return A?this.__position+=A[0].length:A=null,A},d.prototype.read=function(p,A,s){var i="",o;return p&&(o=this.match(p),o&&(i+=o[0])),A&&(o||!p)&&(i+=this.readUntil(A,s)),i},d.prototype.readUntil=function(p,A){var s="",i=this.__position;p.lastIndex=this.__position;var o=p.exec(this.__input);return o?(i=o.index,A&&(i+=o[0].length)):i=this.__input_length,s=this.__input.substring(this.__position,i),this.__position=i,s},d.prototype.readUntilAfter=function(p){return this.readUntil(p,!0)},d.prototype.get_regexp=function(p,A){var s=null,i="g";return A&&I&&(i="y"),typeof p=="string"&&p!==""?s=new RegExp(p,i):p&&(s=new RegExp(p.source,i)),s},d.prototype.get_literal_regexp=function(p){return RegExp(p.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},d.prototype.peekUntilAfter=function(p){var A=this.__position,s=this.readUntilAfter(p);return this.__position=A,s},d.prototype.lookBack=function(p){var A=this.__position-1;return A>=p.length&&this.__input.substring(A-p.length,A).toLowerCase()===p},e.exports.InputScanner=d},,,,,function(e){function I(d,p){d=typeof d=="string"?d:d.source,p=typeof p=="string"?p:p.source,this.__directives_block_pattern=new RegExp(d+/ beautify( \w+[:]\w+)+ /.source+p,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(d+/\sbeautify\signore:end\s/.source+p,"g")}I.prototype.get_directives=function(d){if(!d.match(this.__directives_block_pattern))return null;var p={};this.__directive_pattern.lastIndex=0;for(var A=this.__directive_pattern.exec(d);A;)p[A[1]]=A[2],A=this.__directive_pattern.exec(d);return p},I.prototype.readIgnored=function(d){return d.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=I},,function(e,I,d){var p=d(16).Beautifier,A=d(17).Options;function s(i,o){var n=new p(i,o);return n.beautify()}e.exports=s,e.exports.defaultOptions=function(){return new A}},function(e,I,d){var p=d(17).Options,A=d(2).Output,s=d(8).InputScanner,i=d(13).Directives,o=new i(/\/\*/,/\*\//),n=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,r=/\s/,t=/(?:\s|\n)+/g,y=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,b=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function E(T,C){this._source_text=T||"",this._options=new p(C),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}E.prototype.eatString=function(T){var C="";for(this._ch=this._input.next();this._ch;){if(C+=this._ch,this._ch==="\\")C+=this._input.next();else if(T.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return C},E.prototype.eatWhitespace=function(T){for(var C=r.test(this._input.peek()),h=0;r.test(this._input.peek());)this._ch=this._input.next(),T&&this._ch===`
|
|
`&&((h===0||h<this._options.max_preserve_newlines)&&(h++,this._output.add_new_line(!0)));return C},E.prototype.foundNestedPseudoClass=function(){for(var T=0,C=1,h=this._input.peek(C);h;){if(h==="{")return!0;if(h==="(")T+=1;else if(h===")"){if(T===0)return!1;T-=1}else if(h===";"||h==="}")return!1;C++,h=this._input.peek(C)}return!1},E.prototype.print_string=function(T){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(T)},E.prototype.preserveSingleSpace=function(T){T&&(this._output.space_before_token=!0)},E.prototype.indent=function(){this._indentLevel++},E.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},E.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var T=this._source_text,C=this._options.eol;C==="auto"&&(C=`
|
|
`,T&&n.test(T||"")&&(C=T.match(n)[0])),T=T.replace(a,`
|
|
`);var h=T.match(/^[\t ]*/)[0];this._output=new A(this._options,h),this._input=new s(T),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var c=0,l=!1,u=!1,_=!1,g=!1,m=!1,F=!1,H=this._ch,B=!1,Q,z,N;Q=this._input.read(t),z=Q!=="",N=H,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),H=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var ee=this._input.read(y),le=o.get_directives(ee);le&&le.ignore==="start"&&(ee+=o.readIgnored(this._input)),this.print_string(ee),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(b)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(z),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Be=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Be.match(/[ :]$/)&&(Be=this.eatString(": ").replace(/\s$/,""),this.print_string(Be),this._output.space_before_token=!0),Be=Be.replace(/\s$/,""),Be==="extend"?g=!0:Be==="import"&&(m=!0),Be in this.NESTED_AT_RULE?(this._nestedLevel+=1,Be in this.CONDITIONAL_GROUP_RULE&&(_=!0)):!l&&c===0&&Be.indexOf(":")!==-1&&(u=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(z),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")u&&(u=!1,this.outdent()),_?(_=!1,l=this._indentLevel>=this._nestedLevel):l=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&l&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(N==="("?this._output.space_before_token=!1:N!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),N==="{"&&this._output.trim(!0),m=!1,g=!1,u&&(this.outdent(),u=!1),this.print_string(this._ch),l=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var Ce=0;Ce<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Ce++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Ce])){B=!0;break}(l||_)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!g&&c===0?(this.print_string(":"),u||(u=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Me=N==='"'||N==="'";this.preserveSingleSpace(Me||z),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")B=!1,c===0?(u&&(this.outdent(),u=!1),g=!1,m=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),c++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),c&&(c--,this.outdent()));else{var Le=!1;this._input.lookBack("with")&&(Le=!0),this.preserveSingleSpace(z||Le),this.print_string(this._ch),u&&N==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),F=!0):(this.eatWhitespace(),c++,this.indent())}else if(this._ch===")")c&&(c--,this.outdent()),F&&this._input.peek()===";"&&this._options.selector_separator_newline&&(F=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!u||F)&&c===0&&!m&&!g?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!u&&c===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&r.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(z),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),r.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var je=N==='"'||N==="'";this.preserveSingleSpace(je||z),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&B&&this._output.add_new_line()}var He=this._output.get_code(C);return He},e.exports.Beautifier=E},function(e,I,d){var p=d(6).Options;function A(s){p.call(this,s,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var i=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||i;var o=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var n=0;n<o.length;n++)o[n]!=="expand"?this.brace_style="collapse":this.brace_style=o[n]}A.prototype=new p,e.exports.Options=A}],O={};function q(e){var I=O[e];if(I!==void 0)return I.exports;var d=O[e]={exports:{}};return U[e](d,d.exports,q),d.exports}var k=q(15);L=k})();var V=L;!(fe=[],W=function(){return{css_beautify:V}}.apply(Oe,fe),W!==void 0&&(ft.exports=W))})()},UUDw:function(ft,Oe,K){ft.exports={buttonFixed:"buttonFixed___2zLVJ",button:"button___-JgFH",buttonWrap:"buttonWrap___aZhhk"}},VN4U:function(ft,Oe,K){"use strict";K.r(Oe);var fe=K("0Owb"),W=K("sPJy"),L=K("bE4q"),V=K("9og8"),U=K("tJVT"),O=K("PpiC"),q=K("WmNS"),k=K.n(q),e=K("q1tI"),I=K.n(e),d=K("9kvl"),p=K("dF/Y"),A=K("ngQI"),s=K("NNiE"),i=K("9ZNV"),o=K("D3Jc"),n=K.n(o),a=K("kHHm"),r=K("1n7x"),t=K.n(r),y=K("xOOu"),b=K.n(y),E=function(){document.body.scrollIntoView()},T=function(){document.querySelectorAll("canvas").forEach(function(_){(!_.clientWidth||!_.clientHeight)&&_.remove()})},C=function(){var u=Object(V.a)(k.a.mark(function _(g,m){var F,H,B,Q,z;return k.a.wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:E(),T(),F={margin:1,html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1,width:1210},jsPDF:{unit:"in",format:"letter",orientation:"portrait"}},H=t()(),B=k.a.mark(function le(Be){return k.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return Me.next=2,H.set(F).from(g[Be]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var Le=Object(V.a)(k.a.mark(function je(He){return k.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(!(Be<g.length-1)){Se.next=3;break}return Se.next=3,He.addPage();case 3:case"end":return Se.stop()}},je)}));return function(je){return Le.apply(this,arguments)}}());case 2:case"end":return Me.stop()}},le)}),Q=0;case 6:if(!(Q<g.length)){ee.next=11;break}return ee.delegateYield(B(Q),"t0",8);case 8:Q++,ee.next=6;break;case 11:z=new b.a,z.file("".concat(m,".pdf"),H.output("blob"),{base64:!1}),z.generateAsync({type:"blob"}).then(function(le){var Be=document.createElement("a");Be.href=window.URL.createObjectURL(le),Be.download="".concat(m,".zip"),document.body.appendChild(Be);var Ce=new MouseEvent("click");Be.dispatchEvent(Ce),document.body.removeChild(Be)});case 14:case"end":return ee.stop()}},_)}));return function(g,m){return u.apply(this,arguments)}}(),h=K("ZWs3"),c=function(_){var g,m,F,H,B,Q,z,N,ee=_.paperlibrary,le=_.user,Be=_.globalSetting,Ce=_.loading,Me=_.dispatch,Le=Object(O.a)(_,["paperlibrary","user","globalSetting","loading","dispatch"]),je=Object(e.useState)(),He=Object(U.a)(je,2),Je=He[0],Se=He[1],$=Object(e.useRef)();Object(e.useEffect)(function(){return Me({type:"globalSetting/footerToggle",payload:!1}),function(){Me({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(e.useEffect)(function(){var we,Te,Xe,Ze;$.current=(we=Le.match)===null||we===void 0||((Te=we.params)===null||Te===void 0)?void 0:Te.id,Se((Xe=Le.location)===null||Xe===void 0||((Ze=Xe.query)===null||Ze===void 0)?void 0:Ze.defaultActiveKey),D()},[]);var D=function(){Me({type:"paperlibrary/getPaperData",payload:{id:$.current}})},M=function(){var we=Object(V.a)(k.a.mark(function Te(Xe,Ze){var et,rt,At;return k.a.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(!(!Xe.destination||!Xe.source)){Pe.next=2;break}return Pe.abrupt("return");case 2:return et=Ze.questions[Xe.source.index].id,rt=Xe.destination.index+1,Pe.next=6,Me({type:"paperlibrary/adjustPosition",payload:{id:$.current,itemId:et,position:rt}});case 6:if(At=Pe.sent,!(At.status===-1)){Pe.next=9;break}return Pe.abrupt("return");case 9:D();case 10:case"end":return Pe.stop()}},Te)}));return function(Xe,Ze){return we.apply(this,arguments)}}(),te=function(){Me({type:"paperlibrary/setActionTabs",payload:{key:"Paperlibrary-SendToClass",params:{id:$.current}}})},oe=Object(e.useRef)(),G=Object(e.useState)(!1),re=Object(U.a)(G,2),j=re[0],J=re[1],Y=function(){var we=Object(V.a)(k.a.mark(function Te(){return k.a.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return J(!1),Ze.next=3,C(oe.current.children,"\u5BFC\u51FA\u8BD5\u5377");case 3:case"end":return Ze.stop()}},Te)}));return function(){return we.apply(this,arguments)}}(),he=function(){var we=Object(V.a)(k.a.mark(function Te(){return k.a.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return J(!0),Ze.next=3,C(oe.current.children,"\u5BFC\u51FA\u8BD5\u5377");case 3:case"end":return Ze.stop()}},Te)}));return function(){return we.apply(this,arguments)}}();return I.a.createElement("section",{className:n.a.bg},I.a.createElement(L.a,{className:"mt30",separator:">"},I.a.createElement(L.a.Item,null,"\u8BD5\u5377\u5E93"),I.a.createElement(L.a.Item,{href:"/paperlibrary?defaultActiveKey=".concat(Je)},Je==="1"?"\u516C\u5F00\u8BD5\u5377\u5E93":"\u6211\u7684\u8BD5\u5377\u5E93"),I.a.createElement(L.a.Item,null,"\u8BD5\u5377\u67E5\u770B")),I.a.createElement("div",{className:n.a.title},I.a.createElement("div",{className:n.a.btnWrapper},I.a.createElement(h.a,{type:"primary",onClick:he},I.a.createElement(p.a,null),"\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377+\u7B54\u6848"),I.a.createElement(h.a,{type:"primary",className:"ml10",onClick:Y},I.a.createElement(p.a,null),"\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377"))),I.a.createElement("div",{className:n.a.wrap,ref:oe},I.a.createElement("div",{className:"pt20 pb20"},I.a.createElement("div",{className:n.a.titleForExport},(g=ee.paperData)===null||g===void 0||((m=g.exam)===null||m===void 0)?void 0:m.name),I.a.createElement("div",{className:"".concat(n.a.flexRow," ").concat(n.a.flexJustifyBetween)},I.a.createElement("div",null,I.a.createElement("span",{className:n.a.questionNumber},"\u9898\u6570\uFF1A",(F=ee.paperData)===null||F===void 0||((H=F.exam)===null||H===void 0)?void 0:H.all_questions_count),I.a.createElement("span",{className:n.a.score},"\u603B\u5206\uFF1A",(B=ee.paperData)===null||B===void 0||((Q=B.exam)===null||Q===void 0)?void 0:Q.all_score))),I.a.createElement("div",{className:n.a.line}),I.a.createElement("div",{className:n.a.dragTip},"\u5C0F\u9898\u4E4B\u95F4\u53EF\u4EE5\u62D6\u52A8\u6392\u5E8F"),(z=ee.paperData)===null||z===void 0||((N=z.questionList)===null||N===void 0)?void 0:N.map(function(we,Te){return I.a.createElement("div",{className:"".concat(n.a.relative," mt20 mb20"),key:Te},I.a.createElement("div",{className:n.a.typeActive},I.a.createElement("span",{className:n.a.typeName},we.number,"\u3001",we.name),I.a.createElement("span",{className:n.a.typeNumber},"\uFF08\u5171",we.questions_count,"\u9898\uFF1B\u5171",we.questions_score,"\u5206\uFF09")),I.a.createElement(A.a,{onDragEnd:function(Ze){return M(Ze,we)}},I.a.createElement(A.c,{droppableId:Te.toString()},function(Xe,Ze){var et;return I.a.createElement("div",Object(fe.a)({className:"mt20",ref:Xe.innerRef},Xe.droppableProps,{onScroll:function(){}}),(et=we.questions)===null||et===void 0?void 0:et.map(function(rt,At){return I.a.createElement(A.b,{draggableId:rt.id.toString(),index:At,key:rt.id},function(pt){return I.a.createElement("div",Object(fe.a)({ref:pt.innerRef},pt.draggableProps,pt.dragHandleProps),I.a.createElement(s.a,{index:At,typeName:we.name,type:we.type,data:rt,showAnswer:j,isshow:!1}))})}))})))}))),I.a.createElement(i.a,{okText:"\u53D1\u9001\u8BFE\u5802",onCancel:function(){return d.d.replace("/paperlibrary")},onOk:te}),I.a.createElement(a.a,null))},l=Oe.default=Object(d.a)(function(u){var _=u.paperlibrary,g=u.user,m=u.loading,F=u.globalSetting;return{paperlibrary:_,user:g,globalSetting:F,loading:m.effects}})(c)},Vhoy:function(ft,Oe,K){"use strict";K.d(Oe,"d",function(){return V}),K.d(Oe,"e",function(){return U}),K.d(Oe,"c",function(){return O}),K.d(Oe,"b",function(){return q}),K.d(Oe,"a",function(){return k});var fe=K("MI8n");class W{constructor(){this._icons=new Map,this._onDidRegister=new fe.b}add(e){const I=this._icons.get(e.id);I?e.description?I.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const L=new W,V=L;function U(e,I){return new q(e,I)}function O(e){return e?e.replace(/\$\((.*?)\)/g,(I,d)=>` ${d} `).trim():""}class q{constructor(e,I,d){this.id=e,this.definition=I,this.description=d,L.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var k;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const I=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function d(s){if(s instanceof q)return["codicon","codicon-"+s.id];const i=I.exec(s.id);if(!i)return d(q.error);let[,o,n]=i;const a=["codicon","codicon-"+o];return n&&a.push("codicon-modifier-"+n.substr(1)),a}e.asClassNameArray=d;function p(s){return d(s).join(" ")}e.asClassName=p;function A(s){return"."+d(s).join(".")}e.asCSSSelector=A})(k||(k={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",e.add.definition),e.gistNew=new e("gist-new",e.add.definition),e.repoCreate=new e("repo-create",e.add.definition),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",e.json.definition),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.lockSmall=new e("lock-small",{fontCharacter:"\\ebe7"}),e.azureDevops=new e("azure-devops",{fontCharacter:"\\ebe8"}),e.verifiedFilled=new e("verified-filled",{fontCharacter:"\\ebe9"})}(q||(q={}))},WaYH:function(ft,Oe,K){"use strict";var fe=K("rePB"),W=K("Ff2n"),L=K("VTBJ"),V=K("1OyB"),U=K("vuIU"),O=K("JX7q"),q=K("Ji7U"),k=K("LK+K"),e=K("q1tI"),I=K("TSYQ"),d=K.n(I),p=K("sboe"),A=K("OZM5"),s=function(T){var C=T.prefixCls,h=T.level,c=T.isStart,l=T.isEnd;if(!h)return null;for(var u="".concat(C,"-indent-unit"),_=[],g=0;g<h;g+=1){var m;_.push(e.createElement("span",{key:g,className:d()(u,(m={},Object(fe.a)(m,"".concat(u,"-start"),c[g+1]),Object(fe.a)(m,"".concat(u,"-end"),l[g+1]),Object(fe.a)(m,"".concat(u,"-end-first-level"),!g&&l[0]),m))}))}return e.createElement("span",{"aria-hidden":"true",className:"".concat(C,"-indent")},_)},i=s,o=K("815F"),n="open",a="close",r="---",t=function(E){Object(q.a)(C,E);var T=Object(k.a)(C);function C(){var h;return Object(V.a)(this,C),h=T.apply(this,arguments),h.state={dragNodeHighlight:!1},h.onSelectorClick=function(c){var l=h.props.context.onNodeClick;l(c,Object(o.b)(h.props)),h.isSelectable()?h.onSelect(c):h.onCheck(c)},h.onSelectorDoubleClick=function(c){var l=h.props.context.onNodeDoubleClick;l(c,Object(o.b)(h.props))},h.onSelect=function(c){if(h.isDisabled())return;var l=h.props.context.onNodeSelect;c.preventDefault(),l(c,Object(o.b)(h.props))},h.onCheck=function(c){if(h.isDisabled())return;var l=h.props,u=l.disableCheckbox,_=l.checked,g=h.props.context.onNodeCheck;if(!h.isCheckable()||u)return;c.preventDefault();var m=!_;g(c,Object(o.b)(h.props),m)},h.onMouseEnter=function(c){var l=h.props.context.onNodeMouseEnter;l(c,Object(o.b)(h.props))},h.onMouseLeave=function(c){var l=h.props.context.onNodeMouseLeave;l(c,Object(o.b)(h.props))},h.onContextMenu=function(c){var l=h.props.context.onNodeContextMenu;l(c,Object(o.b)(h.props))},h.onDragStart=function(c){var l=h.props.context.onNodeDragStart;c.stopPropagation(),h.setState({dragNodeHighlight:!0}),l(c,Object(O.a)(h));try{c.dataTransfer.setData("text/plain","")}catch(u){}},h.onDragEnter=function(c){var l=h.props.context.onNodeDragEnter;c.preventDefault(),c.stopPropagation(),l(c,Object(O.a)(h))},h.onDragOver=function(c){var l=h.props.context.onNodeDragOver;c.preventDefault(),c.stopPropagation(),l(c,Object(O.a)(h))},h.onDragLeave=function(c){var l=h.props.context.onNodeDragLeave;c.stopPropagation(),l(c,Object(O.a)(h))},h.onDragEnd=function(c){var l=h.props.context.onNodeDragEnd;c.stopPropagation(),h.setState({dragNodeHighlight:!1}),l(c,Object(O.a)(h))},h.onDrop=function(c){var l=h.props.context.onNodeDrop;c.preventDefault(),c.stopPropagation(),h.setState({dragNodeHighlight:!1}),l(c,Object(O.a)(h))},h.onExpand=function(c){var l=h.props.context.onNodeExpand;l(c,Object(o.b)(h.props))},h.setSelectHandle=function(c){h.selectHandle=c},h.getNodeState=function(){var c=h.props.expanded;return h.isLeaf()?null:c?n:a},h.hasChildren=function(){var c=h.props.eventKey,l=h.props.context.keyEntities,u=l[c]||{},_=u.children;return!!(_||[]).length},h.isLeaf=function(){var c=h.props,l=c.isLeaf,u=c.loaded,_=h.props.context.loadData,g=h.hasChildren();return l===!1?!1:l||!_&&!g||_&&u&&!g},h.isDisabled=function(){var c=h.props.disabled,l=h.props.context.disabled;return!!(l||c)},h.isCheckable=function(){var c=h.props.checkable,l=h.props.context.checkable;return!l||c===!1?!1:l},h.syncLoadData=function(c){var l=c.expanded,u=c.loading,_=c.loaded,g=h.props.context,m=g.loadData,F=g.onNodeLoad;if(u)return;m&&l&&!h.isLeaf()&&(!h.hasChildren()&&!_&&F(Object(o.b)(h.props)))},h.renderSwitcher=function(){var c=h.props,l=c.expanded,u=c.switcherIcon,_=h.props.context,g=_.prefixCls,m=_.switcherIcon,F=u||m;if(h.isLeaf())return e.createElement("span",{className:d()("".concat(g,"-switcher"),"".concat(g,"-switcher-noop"))},typeof F=="function"?F(Object(L.a)(Object(L.a)({},h.props),{},{isLeaf:!0})):F);var H=d()("".concat(g,"-switcher"),"".concat(g,"-switcher_").concat(l?n:a));return e.createElement("span",{onClick:h.onExpand,className:H},typeof F=="function"?F(Object(L.a)(Object(L.a)({},h.props),{},{isLeaf:!1})):F)},h.renderCheckbox=function(){var c=h.props,l=c.checked,u=c.halfChecked,_=c.disableCheckbox,g=h.props.context.prefixCls,m=h.isDisabled(),F=h.isCheckable();if(!F)return null;var H=typeof F!="boolean"?F:null;return e.createElement("span",{className:d()("".concat(g,"-checkbox"),l&&"".concat(g,"-checkbox-checked"),!l&&u&&"".concat(g,"-checkbox-indeterminate"),(m||_)&&"".concat(g,"-checkbox-disabled")),onClick:h.onCheck},H)},h.renderIcon=function(){var c=h.props.loading,l=h.props.context.prefixCls;return e.createElement("span",{className:d()("".concat(l,"-iconEle"),"".concat(l,"-icon__").concat(h.getNodeState()||"docu"),c&&"".concat(l,"-icon_loading"))})},h.renderSelector=function(){var c=h.state.dragNodeHighlight,l=h.props,u=l.title,_=l.selected,g=l.icon,m=l.loading,F=l.data,H=h.props.context,B=H.prefixCls,Q=H.showIcon,z=H.icon,N=H.draggable,ee=H.loadData,le=H.titleRender,Be=h.isDisabled(),Ce="".concat(B,"-node-content-wrapper"),Me;if(Q){var Le=g||z;Me=Le?e.createElement("span",{className:d()("".concat(B,"-iconEle"),"".concat(B,"-icon__customize"))},typeof Le=="function"?Le(h.props):Le):h.renderIcon()}else ee&&m&&(Me=h.renderIcon());var je;typeof u=="function"?je=u(F):le?je=le(F):je=u;var He=e.createElement("span",{className:"".concat(B,"-title")},je);return e.createElement("span",{ref:h.setSelectHandle,title:typeof u=="string"?u:"",className:d()("".concat(Ce),"".concat(Ce,"-").concat(h.getNodeState()||"normal"),!Be&&(_||c)&&"".concat(B,"-node-selected"),!Be&&N&&"draggable"),draggable:!Be&&N||void 0,"aria-grabbed":!Be&&N||void 0,onMouseEnter:h.onMouseEnter,onMouseLeave:h.onMouseLeave,onContextMenu:h.onContextMenu,onClick:h.onSelectorClick,onDoubleClick:h.onSelectorDoubleClick,onDragStart:N?h.onDragStart:void 0},Me,He)},h}return Object(U.a)(C,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var c=this.props.selectable,l=this.props.context.selectable;return typeof c=="boolean"?c:l}},{key:"render",value:function(){var c,l=this.props,u=l.eventKey,_=l.className,g=l.style,m=l.dragOver,F=l.dragOverGapTop,H=l.dragOverGapBottom,B=l.isLeaf,Q=l.isStart,z=l.isEnd,N=l.expanded,ee=l.selected,le=l.checked,Be=l.halfChecked,Ce=l.loading,Me=l.domRef,Le=l.active,je=l.onMouseMove,He=Object(W.a)(l,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Je=this.props.context,Se=Je.prefixCls,$=Je.filterTreeNode,D=Je.draggable,M=Je.keyEntities,te=this.isDisabled(),oe=Object(A.f)(He),G=M[u]||{},re=G.level,j=z[z.length-1];return e.createElement("div",Object.assign({ref:Me,className:d()(_,"".concat(Se,"-treenode"),(c={},Object(fe.a)(c,"".concat(Se,"-treenode-disabled"),te),Object(fe.a)(c,"".concat(Se,"-treenode-switcher-").concat(N?"open":"close"),!B),Object(fe.a)(c,"".concat(Se,"-treenode-checkbox-checked"),le),Object(fe.a)(c,"".concat(Se,"-treenode-checkbox-indeterminate"),Be),Object(fe.a)(c,"".concat(Se,"-treenode-selected"),ee),Object(fe.a)(c,"".concat(Se,"-treenode-loading"),Ce),Object(fe.a)(c,"".concat(Se,"-treenode-active"),Le),Object(fe.a)(c,"".concat(Se,"-treenode-leaf-last"),j),Object(fe.a)(c,"drag-over",!te&&m),Object(fe.a)(c,"drag-over-gap-top",!te&&F),Object(fe.a)(c,"drag-over-gap-bottom",!te&&H),Object(fe.a)(c,"filter-node",$&&$(Object(o.b)(this.props))),c)),style:g,onDragEnter:D?this.onDragEnter:void 0,onDragOver:D?this.onDragOver:void 0,onDragLeave:D?this.onDragLeave:void 0,onDrop:D?this.onDrop:void 0,onDragEnd:D?this.onDragEnd:void 0,onMouseMove:je},oe),e.createElement(i,{prefixCls:Se,level:re,isStart:Q,isEnd:z}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),C}(e.Component),y=function(T){return e.createElement(p.a.Consumer,null,function(C){return e.createElement(t,Object.assign({},T,{context:C}))})};y.displayName="TreeNode",y.defaultProps={title:r},y.isTreeNode=1;var b=Oe.a=y},Y1PL:function(ft,Oe,K){"use strict";K.r(Oe),K.d(Oe,"ResizableTextArea",function(){return Be});var fe=K("wx14"),W=K("1OyB"),L=K("vuIU"),V=K("Ji7U"),U=K("LK+K"),O=K("q1tI"),q=K("VTBJ"),k=K("rePB"),e=K("Zm9Q"),I=K("Kwbf"),d=K("c+Xe"),p=K("m+aA"),A=K("bdgK"),s=new Map;function i(Le){Le.forEach(function(je){var He,Je=je.target;(He=s.get(Je))===null||He===void 0||He.forEach(function(Se){return Se(Je)})})}var o=new A.default(i),n=null,a=null;function r(Le,je){s.has(Le)||(s.set(Le,new Set),o.observe(Le)),s.get(Le).add(je)}function t(Le,je){s.has(Le)&&(s.get(Le).delete(je),s.get(Le).size||(o.unobserve(Le),s.delete(Le)))}var y=function(Le){Object(V.a)(He,Le);var je=Object(U.a)(He);function He(){return Object(W.a)(this,He),je.apply(this,arguments)}return Object(L.a)(He,[{key:"render",value:function(){return this.props.children}}]),He}(O.Component),b=O.createContext(null);function E(Le){var je=Le.children,He=Le.onBatchResize,Je=O.useRef(0),Se=O.useRef([]),$=O.useContext(b),D=O.useCallback(function(M,te,oe){Je.current+=1;var G=Je.current;Se.current.push({size:M,element:te,data:oe}),Promise.resolve().then(function(){G===Je.current&&(He==null||He(Se.current),Se.current=[])}),$==null||$(M,te,oe)},[He,$]);return O.createElement(b.Provider,{value:D},je)}function T(Le){var je=Le.children,He=Le.disabled,Je=O.useRef(null),Se=O.useRef(null),$=O.useContext(b),D=O.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),M=O.isValidElement(je)&&Object(d.c)(je),te=M?je.ref:null,oe=O.useMemo(function(){return Object(d.a)(te,Je)},[te,Je]),G=O.useRef(Le);G.current=Le;var re=O.useCallback(function(j){var J=G.current,Y=J.onResize,he=J.data,we=j.getBoundingClientRect(),Te=we.width,Xe=we.height,Ze=j.offsetWidth,et=j.offsetHeight,rt=Math.floor(Te),At=Math.floor(Xe);if(D.current.width!==rt||D.current.height!==At||D.current.offsetWidth!==Ze||D.current.offsetHeight!==et){var pt={width:rt,height:At,offsetWidth:Ze,offsetHeight:et};D.current=pt;var Pe=Ze===Math.round(Te)?Te:Ze,Ye=et===Math.round(Xe)?Xe:et,tt=Object(q.a)(Object(q.a)({},pt),{},{offsetWidth:Pe,offsetHeight:Ye});$==null||$(tt,j,he),Y&&Promise.resolve().then(function(){Y(tt,j)})}},[]);return O.useEffect(function(){var j=Object(p.a)(Je.current)||Object(p.a)(Se.current);return j&&!He&&r(j,re),function(){return t(j,re)}},[Je.current,He]),O.createElement(y,{ref:Se},M?O.cloneElement(je,{ref:oe}):je)}var C="rc-observer-key";function h(Le){var je=Le.children,He=Object(e.a)(je);return He.map(function(Je,Se){var $=(Je==null?void 0:Je.key)||"".concat(C,"-").concat(Se);return O.createElement(T,Object(fe.a)({},Le,{key:$}),Je)})}h.Collection=E;var c=h,l=K("bT9E"),u=K("TSYQ"),_=K.n(u),g=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important
|
|
`,m=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],F={},H;function B(Le){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,He=Le.getAttribute("id")||Le.getAttribute("data-reactid")||Le.getAttribute("name");if(je&&F[He])return F[He];var Je=window.getComputedStyle(Le),Se=Je.getPropertyValue("box-sizing")||Je.getPropertyValue("-moz-box-sizing")||Je.getPropertyValue("-webkit-box-sizing"),$=parseFloat(Je.getPropertyValue("padding-bottom"))+parseFloat(Je.getPropertyValue("padding-top")),D=parseFloat(Je.getPropertyValue("border-bottom-width"))+parseFloat(Je.getPropertyValue("border-top-width")),M=m.map(function(oe){return"".concat(oe,":").concat(Je.getPropertyValue(oe))}).join(";"),te={sizingStyle:M,paddingSize:$,borderSize:D,boxSizing:Se};return je&&He&&(F[He]=te),te}function Q(Le){var je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,He=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Je=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;H||(H=document.createElement("textarea"),H.setAttribute("tab-index","-1"),H.setAttribute("aria-hidden","true"),document.body.appendChild(H)),Le.getAttribute("wrap")?H.setAttribute("wrap",Le.getAttribute("wrap")):H.removeAttribute("wrap");var Se=B(Le,je),$=Se.paddingSize,D=Se.borderSize,M=Se.boxSizing,te=Se.sizingStyle;H.setAttribute("style","".concat(te,";").concat(g)),H.value=Le.value||Le.placeholder||"";var oe=Number.MIN_SAFE_INTEGER,G=Number.MAX_SAFE_INTEGER,re=H.scrollHeight,j;if(M==="border-box"?re+=D:M==="content-box"&&(re-=$),He!==null||Je!==null){H.value=" ";var J=H.scrollHeight-$;He!==null&&(oe=J*He,M==="border-box"&&(oe=oe+$+D),re=Math.max(oe,re)),Je!==null&&(G=J*Je,M==="border-box"&&(G=G+$+D),j=re>G?"":"hidden",re=Math.min(G,re))}return{height:re,minHeight:oe,maxHeight:G,overflowY:j,resize:"none"}}var z=K("Gytx"),N=K.n(z),ee;(function(Le){Le[Le.NONE=0]="NONE",Le[Le.RESIZING=1]="RESIZING",Le[Le.RESIZED=2]="RESIZED"})(ee||(ee={}));var le=function(Le){Object(V.a)(He,Le);var je=Object(U.a)(He);function He(Je){var Se;return Object(W.a)(this,He),Se=je.call(this,Je),Se.nextFrameActionId=void 0,Se.resizeFrameId=void 0,Se.textArea=void 0,Se.saveTextArea=function($){Se.textArea=$},Se.handleResize=function($){var D=Se.state.resizeStatus,M=Se.props,te=M.autoSize,oe=M.onResize;if(D!==ee.NONE)return;typeof oe=="function"&&oe($),te&&Se.resizeOnNextFrame()},Se.resizeOnNextFrame=function(){cancelAnimationFrame(Se.nextFrameActionId),Se.nextFrameActionId=requestAnimationFrame(Se.resizeTextarea)},Se.resizeTextarea=function(){var $=Se.props.autoSize;if(!$||!Se.textArea)return;var D=$.minRows,M=$.maxRows,te=Q(Se.textArea,!1,D,M);Se.setState({textareaStyles:te,resizeStatus:ee.RESIZING},function(){cancelAnimationFrame(Se.resizeFrameId),Se.resizeFrameId=requestAnimationFrame(function(){Se.setState({resizeStatus:ee.RESIZED},function(){Se.resizeFrameId=requestAnimationFrame(function(){Se.setState({resizeStatus:ee.NONE}),Se.fixFirefoxAutoScroll()})})})})},Se.renderTextArea=function(){var $=Se.props,D=$.prefixCls,M=D===void 0?"rc-textarea":D,te=$.autoSize,oe=$.onResize,G=$.className,re=$.disabled,j=Se.state,J=j.textareaStyles,Y=j.resizeStatus,he=Object(l.a)(Se.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),we=_()(M,G,Object(k.a)({},"".concat(M,"-disabled"),re));"value"in he&&(he.value=he.value||"");var Te=Object(q.a)(Object(q.a)(Object(q.a)({},Se.props.style),J),Y===ee.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return O.createElement(c,{onResize:Se.handleResize,disabled:!(te||oe)},O.createElement("textarea",Object(fe.a)({},he,{className:we,style:Te,ref:Se.saveTextArea})))},Se.state={textareaStyles:{},resizeStatus:ee.NONE},Se}return Object(L.a)(He,[{key:"componentDidUpdate",value:function(Se){(Se.value!==this.props.value||!N()(Se.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var Se=this.textArea.selectionStart,$=this.textArea.selectionEnd;this.textArea.setSelectionRange(Se,$)}}catch(D){}}},{key:"render",value:function(){return this.renderTextArea()}}]),He}(O.Component),Be=le,Ce=function(Le){Object(V.a)(He,Le);var je=Object(U.a)(He);function He(Je){var Se;Object(W.a)(this,He),Se=je.call(this,Je),Se.resizableTextArea=void 0,Se.focus=function(){Se.resizableTextArea.textArea.focus()},Se.saveTextArea=function(D){Se.resizableTextArea=D},Se.handleChange=function(D){var M=Se.props.onChange;Se.setValue(D.target.value,function(){Se.resizableTextArea.resizeTextarea()}),M&&M(D)},Se.handleKeyDown=function(D){var M=Se.props,te=M.onPressEnter,oe=M.onKeyDown;D.keyCode===13&&te&&te(D),oe&&oe(D)};var $=typeof Je.value=="undefined"||Je.value===null?Je.defaultValue:Je.value;return Se.state={value:$},Se}return Object(L.a)(He,[{key:"setValue",value:function(Se,$){"value"in this.props||this.setState({value:Se},$)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return O.createElement(Be,Object(fe.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(Se){return"value"in Se?{value:Se.value}:null}}]),He}(O.Component),Me=Oe.default=Ce},ZW9T:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return z});var fe=K("k1fw"),W=K("oBTY"),L=K("miYZ"),V=K("tsqr"),U=K("rAM+"),O=K("tJVT"),q=K("PpiC"),k=K("q1tI"),e=K.n(k),I=K("bdgK"),d=K("9og8"),p=K("WmNS"),A=K.n(p),s={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},i={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},o={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},n={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},a=K("5VLF"),r=K.n(a),t={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},y=function(ee,le){return le.map(function(Be){return{label:Be,kind:ee.languages.CompletionItemKind.Keyword,insertText:Be}})},b=function(ee){return Object.keys(t.tables).map(function(le){return{label:le,kind:ee.languages.CompletionItemKind.Variable,insertText:le}})},E=function(ee,le){var Be=t.tables[ee];return Be?Be.map(function(Ce){return{label:Ce,kind:le.languages.CompletionItemKind.Field,insertText:Ce}}):[]};function T(N,ee,le,Be,Ce){var Me=ee.getWordUntilPosition(le),Le={startLineNumber:le.lineNumber,endLineNumber:le.lineNumber,startColumn:Me.startColumn,endColumn:Me.endColumn},je=Be.map(function(He){return{label:He,kind:N.languages.CompletionItemKind.Keyword,insertText:He,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Le}});return Ce.map(function(He){je.push(Object(fe.a)(Object(fe.a)({},He),{},{range:Le}))}),je}var C=function(N){t.languages.map(function(Ce){return N.languages.registerDocumentFormattingEditProvider(Ce,{provideDocumentFormattingEdits:function(Le,je,He){return Object(d.a)(A.a.mark(function Je(){var Se;return A.a.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return Se=r()(Le.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),D.abrupt("return",[{range:Le.getFullModelRange(),text:Se}]);case 2:case"end":return D.stop()}},Je)}))()}}),Ce});var ee=o.quickKey.map(function(Ce){return{label:Ce.label,kind:N.languages.CompletionItemKind.Method,insertText:Ce.content,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),le=n.quickKey.map(function(Ce){return{label:Ce.label,kind:N.languages.CompletionItemKind.Method,insertText:Ce.content,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),Be=i.quickKey.map(function(Ce){return{label:Ce.label,kind:N.languages.CompletionItemKind.Method,insertText:Ce.content,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet}});N.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Me,Le){var je=Me.getWordUntilPosition(Le),He={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:je.startColumn,endColumn:je.endColumn},Je=Me.getLineContent(Le.lineNumber).substring(je.startColumn-2,je.endColumn);return{suggestions:[].concat(Object(W.a)(o.keywords.map(function(Se){return{label:Se,kind:N.languages.CompletionItemKind.Function,documentation:Se,insertText:Se,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:He}})),Object(W.a)(o.quickKey.map(function(Se){return{label:Se.label,kind:N.languages.CompletionItemKind.Function,documentation:Se.content,insertText:Je.startsWith("#")?Se.content.replace(/#/,""):Se.content,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:He}})))}}}),N.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Me,Le){var je=Me.getWordUntilPosition(Le),He={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:je.startColumn,endColumn:je.endColumn};return{suggestions:Object(W.a)(s.keywords.map(function(Je){return{label:Je,kind:N.languages.CompletionItemKind.Function,documentation:Je,insertText:Je,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:He}}))}}}),N.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Me,Le){var je=Me.getWordUntilPosition(Le),He={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:je.startColumn,endColumn:je.endColumn},Je=Me.getLineContent(Le.lineNumber).substring(je.startColumn-2,je.endColumn);return{suggestions:[].concat(Object(W.a)(i.keywords.map(function(Se){return{label:Se,kind:N.languages.CompletionItemKind.Function,documentation:Se,insertText:Se,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:He}})),Object(W.a)(i.quickKey.map(function(Se){return{label:Se.label,kind:N.languages.CompletionItemKind.Function,documentation:Se.content,insertText:Je.startsWith("#")?Se.content.replace(/#/,""):Se.content,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:He}})))}}}),N.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Me,Le){var je=Me.getWordUntilPosition(Le),He={startLineNumber:Le.lineNumber,endLineNumber:Le.lineNumber,startColumn:je.startColumn,endColumn:je.endColumn},Je=Me.getLineContent(Le.lineNumber).substring(je.startColumn-2,je.endColumn);return{suggestions:[].concat(Object(W.a)(n.keywords.map(function(Se){return{label:Se,kind:N.languages.CompletionItemKind.Function,documentation:Se,insertText:Se,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:He}})),Object(W.a)(n.quickKey.map(function(Se){return{label:Se.label,kind:N.languages.CompletionItemKind.Function,documentation:Se.content,insertText:Je.startsWith("#")?Se.content.replace(/#/,""):Se.content,insertTextRules:N.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:He}})))}}})},h="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",c=K("fjLI"),l=K("LvDl"),u=K("+ua5");function _(N){return/^\d+$/.test(N)?"".concat(N,"px"):N}function g(){}var m=!1,F={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function H(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ee=N;if(Array.isArray(N)){for(var le=0;le<N.length;le++){var Be=F[N[le]];if(Be)return Be}return ee[0]}return F[ee]||ee}var B=null,Q=Oe.b=function(N){var ee=N.width,le=ee===void 0?"100%":ee,Be=N.height,Ce=Be===void 0?"100%":Be,Me=N.value,Le=N.language,je=Le===void 0?"javascript":Le,He=N.style,Je=He===void 0?{}:He,Se=N.options,$=Se===void 0?{}:Se,D=N.overrideServices,M=D===void 0?{}:D,te=N.theme,oe=te===void 0?"vs-dark":te,G=N.onEditBlur,re=N.onSave,j=N.autoHeight,J=j===void 0?!1:j,Y=N.forbidCopy,he=Y===void 0?!1:Y,we=N.onChange,Te=we===void 0?g:we,Xe=N.editorDidMount,Ze=Xe===void 0?g:Xe,et=N.onFocus,rt=et===void 0?g:et,At=N.filename,pt=At===void 0?"educoder.txt":At,Pe=N.errorLine,Ye=N.errorContent,tt=Ye===void 0?"":Ye,ot=Object(q.a)(N,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),pe=Object(k.useRef)(),ne=Object(k.useRef)({}),ie=Object(k.useRef)(),de=Object(k.useRef)(),ge=Object(k.useRef)(!1),se=Object(k.useRef)(),Ae=Object(k.useState)(!1),Ee=Object(O.a)(Ae,2),xe=Ee[0],ke=Ee[1];function Qe(){var Mt;return pe.current&&(Mt=new I.default(function(Pt){var kt=Object(U.a)(Pt),pr;try{for(kt.s();!(pr=kt.n()).done;){var jr=pr.value;(jr.target.offsetHeight>0||jr.target.offsetWidth>0)&&ne.current.instance.layout()}}catch(ln){kt.e(ln)}finally{kt.f()}}),Mt.observe(pe.current)),Mt}function nt(){V.b.warn(decodeURIComponent(h))}var dt=function(){var Pt=ne.current.instance;if(Me!=null&&Pt&&xe){var kt=Pt.getModel();kt&&Me!==kt.getValue()&&(m=!0,kt.setValue(Me),Pt.layout(),m=!1)}};Object(k.useEffect)(function(){de.current&&clearTimeout(de.current),de.current=setTimeout(function(){dt()},500)},[Me,xe,ne.current]),Object(k.useEffect)(function(){if(Pe&&ne.current&&ne.current.instance){var Mt=ne.current.instance;Mt.changeViewZones(function(kt){var pr=document.createElement("div");pr.style.padding="10px 20px",pr.style.width="calc(100% - 20px)",pr.className="my-error-line-wrp",pr.innerHTML=tt,kt.addZone({afterLineNumber:Pe||11,heightInLines:3,domNode:pr})});var Pt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Mt.addOverlayWidget(Pt),Mt.revealPositionInCenter({lineNumber:20,column:1})}},[Pe,ne.current,xe]);function wt(){var Mt=ne.current.instance;if(Mt){var Pt=Mt.getSelection(),kt=ne.current.pastePos||{},pr=new B.Range(kt.startLineNumber||Pt.endLineNumber,kt.startColumn||Pt.endColumn,kt.endLineNumber||Pt.endLineNumber,kt.endColumn||Pt.endColumn);setTimeout(function(){Mt.executeEdits("",[{range:pr,text:""}])},300)}}function gt(Mt){(window.navigator.platform.match("Mac")?Mt.metaKey:Mt.ctrlKey)&&Mt.keyCode==83&&(Mt.preventDefault(),re())}var $t=function(){if(J&&ne.current.instance){var Pt=ne.current.instance.getContentHeight();It(Pt<Ce?Ce:Pt)}else It(Ce)};function xt(Mt){var Pt=document.createEvent("MouseEvents");Pt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Mt.dispatchEvent(Pt)}function ut(Mt,Pt){var kt=window.URL||window.webkitURL||window,pr=new Blob([Pt]),jr=document.createElementNS("http://www.w3.org/1999/xhtml","a");jr.href=kt.createObjectURL(pr),jr.download=Mt,xt(jr)}Object(k.useEffect)(function(){$t()},[$t]),Object(k.useEffect)(function(){pe.current&&!xe&&Promise.all([K.e(18),K.e(29)]).then(K.t.bind(null,"M/lh",7)).then(function(Mt){try{B=Mt,ne.current.instance=B.editor.create(pe.current,{value:Me,language:H(je),theme:oe,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},M);var Pt=ne.current.instance,kt=c.d._menuItems,pr=Object(W.a)(kt).find(function(nr){return nr[0]._debugName=="EditorContext"}),jr=pr[1],ln=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],cr=function(Wt,Sr){var Zt=Wt._first;do{var zr,sr,me=Sr.includes((zr=Zt.element)===null||zr===void 0||((sr=zr.command)===null||sr===void 0)?void 0:sr.id);me&&Wt._remove(Zt)}while(Zt=Zt.next)};if(Ze(Pt,B),setTimeout(function(){$t(),ne.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){ut(pt||"educoder.txt",Pt.getValue())}}),Pt.getDomNode().addEventListener("input",function(){ie.current.autoFormat&&Pt.getAction("editor.action.formatDocument").run()})},500),ne.current.subscription=Pt.onDidChangeModelContent(function(nr){ge.current?clearTimeout(se.current):($t(),Te(Pt.getValue(),nr)),se.current=setTimeout(function(){ge.current=!1},500)}),window.Monaco||C(B,H(je)),he&&(cr(jr,ln),pe.current.classList.add("noCopyPaste"),Pt.onKeyDown(function(nr){var Wt=nr.keyCode,Sr=nr.ctrlKey,Zt=nr.metaKey;(Wt===33||Wt===52)&&(Zt||Sr)&&(nt(),nr.preventDefault())})),window.Monaco=B,G&&Pt.onDidBlurEditorWidget(function(){G(Pt.getValue())}),rt&&Pt.onDidFocusEditorText(function(){rt(Pt.getValue())}),he){Pt.addCommand(B.KeyMod.CtrlCmd|B.KeyCode.KEY_V,function(){return nt(),null}),Pt.onDidPaste(function(nr){ne.current.pastePos=nr});try{window.addEventListener("paste",wt)}catch(nr){}}var Jt=Qe();return ke(!0),function(){var nr=ne.current.instance;nr.dispose();var Wt=nr.getModel();Wt&&Wt.dispose(),ne.current.subscription&&ne.current.subscription.dispose(),he&&window.removeEventListener("paste",wt),Jt.unobserve(pe.current)}}catch(nr){}})},[]),Object(k.useEffect)(function(){var Mt=ne.current.instance;if(Mt&&xe)return document.addEventListener("keydown",gt,!1),function(){document.removeEventListener("keydown",gt)}},[re,xe]),Object(k.useEffect)(function(){var Mt=ne.current.instance;if(Mt&&xe){var Pt=H(je);B.editor.setModelLanguage(Mt.getModel(),Pt),console.log("language:",je,Mt.getModel(),Pt)}},[je,xe]),Object(k.useEffect)(function(){var Mt=ne.current.instance;Mt&&xe&&B.editor.setTheme(oe)},[oe,xe]),Object(k.useEffect)(function(){var Mt=ne.current.instance;ie.current=$,Mt&&xe&&(Mt.updateOptions(Object(fe.a)({},$)),setTimeout(function(){Mt.getModel().updateOptions(Object(fe.a)({},$))},200))},[JSON.stringify($),xe]),Object(k.useEffect)(function(){var Mt=ne.current.instance;Mt&&xe&&Mt.layout()},[le,Ce,xe]);var Ot=Object(k.useState)(_(le)),jt=Object(O.a)(Ot,2),Tt=jt[0],Yt=jt[1],Qt=Object(k.useState)(_(Ce)),Xt=Object(O.a)(Qt,2),or=Xt[0],It=Xt[1],br=Object(fe.a)(Object(fe.a)({},Je),{},{width:Tt,height:or});return e.a.createElement("div",{className:"my-monaco-editor",ref:pe,style:br})};function z(N){var ee=N.width,le=ee===void 0?"100%":ee,Be=N.height,Ce=Be===void 0?"100%":Be,Me=N.original,Le=N.modified,je=N.language,He=N.options,Je=He===void 0?{}:He,Se=Object(k.useRef)(),$=Object(k.useState)(null),D=Object(O.a)($,2),M=D[0],te=D[1];function oe(J){var Y;return Se.current&&(Y=new I.default(function(he){var we=Object(U.a)(he),Te;try{for(we.s();!(Te=we.n()).done;){var Xe=Te.value;(Xe.target.offsetHeight>0||Xe.target.offsetWidth>0)&&J.layout()}}catch(Ze){we.e(Ze)}finally{we.f()}}),Y.observe(Se.current)),Y}Object(k.useEffect)(function(){Se.current&&Promise.all([K.e(18),K.e(29)]).then(K.t.bind(null,"M/lh",7)).then(function(J){B=J;var Y=B.editor.createDiffEditor(Se.current,Object(fe.a)(Object(fe.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Je),{},{wordWrap:!0}));te(Y);var he=oe(Y);return function(){Y.dispose();var we=Y.getModel();we&&we.dispose(),he.unobserve(Se.current)}})},[]),Object(k.useEffect)(function(){M&&M.setModel({original:B.editor.createModel(Me,je),modified:B.editor.createModel(Le,je)})},[Me,Le,je,M]);var G=_(le),re=_(Ce),j={width:G,height:re};return e.a.createElement("div",{className:"my-diff-editor",ref:Se,style:j})}},ZWs3:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return d});var fe=K("+L6B"),W=K("2/Rp"),L=K("0Owb"),V=K("9og8"),U=K("tJVT"),O=K("PpiC"),q=K("WmNS"),k=K.n(q),e=K("q1tI"),I=K.n(e),d=function(A){var s=A.children,i=Object(O.a)(A,["children"]),o=Object(e.useState)(!1),n=Object(U.a)(o,2),a=n[0],r=n[1];return I.a.createElement(W.a,Object(L.a)({},i,{loading:a,onClick:function(){var t=Object(V.a)(k.a.mark(function y(b){return k.a.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return T.prev=0,r(!0),T.next=4,i.onClick(b);case 4:r(!1),T.next=10;break;case 7:T.prev=7,T.t0=T.catch(0),r(!1);case 10:case"end":return T.stop()}},y,null,[[0,7]])}));return function(y){return t.apply(this,arguments)}}()}),s)}},bT9E:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return W});var fe=K("VTBJ");function W(L,V){var U=Object(fe.a)({},L);return Array.isArray(V)&&V.forEach(function(O){delete U[O]}),U}},biw7:function(ft,Oe,K){"use strict";var fe=K("q1tI"),W=K.n(fe),L=fe.createContext(null);Oe.a=L},crp1:function(ft,Oe,K){"use strict";K.d(Oe,"b",function(){return Tt}),K.d(Oe,"a",function(){return or});var fe={},W=function(me,ve,Ie,Ke,it){var lt=fe[ve]||(fe[ve]=URL.createObjectURL(new Blob([me],{type:"text/javascript"}))),ht=new Worker(lt);return ht.onerror=function(vt){return it(vt.error,null)},ht.onmessage=function(vt){return it(null,vt.data)},ht.postMessage(Ie,Ke),ht},L=Uint8Array,V=Uint16Array,U=Uint32Array,O=new L([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),q=new L([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),k=new L([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),e=function(me,ve){for(var Ie=new V(31),Ke=0;Ke<31;++Ke)Ie[Ke]=ve+=1<<me[Ke-1];for(var it=new U(Ie[30]),Ke=1;Ke<30;++Ke)for(var lt=Ie[Ke];lt<Ie[Ke+1];++lt)it[lt]=lt-Ie[Ke]<<5|Ke;return[Ie,it]},I=e(O,2),d=I[0],p=I[1];d[28]=258,p[258]=28;for(var A=e(q,0),s=A[0],i=A[1],o=new V(32768),n=0;n<32768;++n){var a=(n&43690)>>>1|(n&21845)<<1;a=(a&52428)>>>2|(a&13107)<<2,a=(a&61680)>>>4|(a&3855)<<4,o[n]=((a&65280)>>>8|(a&255)<<8)>>>1}for(var r=function(me,ve,Ie){for(var Ke=me.length,it=0,lt=new V(ve);it<Ke;++it)++lt[me[it]-1];var ht=new V(ve);for(it=0;it<ve;++it)ht[it]=ht[it-1]+lt[it-1]<<1;var vt;if(Ie){vt=new V(1<<ve);var ct=15-ve;for(it=0;it<Ke;++it)if(me[it])for(var yt=it<<4|me[it],bt=ve-me[it],Ht=ht[me[it]-1]++<<bt,qt=Ht|(1<<bt)-1;Ht<=qt;++Ht)vt[o[Ht]>>>ct]=yt}else for(vt=new V(Ke),it=0;it<Ke;++it)vt[it]=o[ht[me[it]-1]++]>>>15-me[it];return vt},t=new L(288),n=0;n<144;++n)t[n]=8;for(var n=144;n<256;++n)t[n]=9;for(var n=256;n<280;++n)t[n]=7;for(var n=280;n<288;++n)t[n]=8;for(var y=new L(32),n=0;n<32;++n)y[n]=5;var b=r(t,9,0),E=r(t,9,1),T=r(y,5,0),C=r(y,5,1),h=function(me){for(var ve=me[0],Ie=1;Ie<me.length;++Ie)me[Ie]>ve&&(ve=me[Ie]);return ve},c=function(me,ve,Ie){var Ke=ve/8>>0;return(me[Ke]|me[Ke+1]<<8)>>>(ve&7)&Ie},l=function(me,ve){var Ie=ve/8>>0;return(me[Ie]|me[Ie+1]<<8|me[Ie+2]<<16)>>>(ve&7)},u=function(me){return(me/8>>0)+(me&7&&1)},_=function(me,ve,Ie){(ve==null||ve<0)&&(ve=0),(Ie==null||Ie>me.length)&&(Ie=me.length);var Ke=new(me instanceof V?V:me instanceof U?U:L)(Ie-ve);return Ke.set(me.subarray(ve,Ie)),Ke},g=function(me,ve,Ie){var Ke=me.length,it=!ve||Ie,lt=!Ie||Ie.i;Ie||(Ie={}),ve||(ve=new L(Ke*3));var ht=function(dn){var vn=ve.length;if(dn>vn){var fn=new L(Math.max(vn*2,dn));fn.set(ve),ve=fn}},vt=Ie.f||0,ct=Ie.p||0,yt=Ie.b||0,bt=Ie.l,Ht=Ie.d,qt=Ie.m,er=Ie.n,dr=Ke*8;do{if(!bt){Ie.f=vt=c(me,ct,1);var lr=c(me,ct+1,3);if(ct+=3,lr)if(lr==1)bt=E,Ht=C,qt=9,er=5;else if(lr==2){var ir=c(me,ct,31)+257,tr=c(me,ct+10,15)+4,Ir=ir+c(me,ct+5,31)+1;ct+=14;for(var gr=new L(Ir),Cr=new L(19),Vt=0;Vt<tr;++Vt)Cr[k[Vt]]=c(me,ct+Vt*3,7);ct+=tr*3;var Qr=h(Cr),Pr=(1<<Qr)-1;if(!lt&&ct+Ir*(Qr+7)>dr)break;for(var Er=r(Cr,Qr,1),Vt=0;Vt<Ir;){var kr=Er[c(me,ct,Pr)];ct+=kr&15;var Ar=kr>>>4;if(Ar<16)gr[Vt++]=Ar;else{var $r=0,Xr=0;for(Ar==16?(Xr=3+c(me,ct,3),ct+=2,$r=gr[Vt-1]):Ar==17?(Xr=3+c(me,ct,7),ct+=3):Ar==18&&(Xr=11+c(me,ct,127),ct+=7);Xr--;)gr[Vt++]=$r}}var Gr=gr.subarray(0,ir),Or=gr.subarray(ir);qt=h(Gr),er=h(Or),bt=r(Gr,qt,1),Ht=r(Or,er,1)}else throw"invalid block type";else{var Ar=u(ct)+4,Mr=me[Ar-4]|me[Ar-3]<<8,zt=Ar+Mr;if(zt>Ke){if(lt)throw"unexpected EOF";break}it&&ht(yt+Mr),ve.set(me.subarray(Ar,zt),yt),Ie.b=yt+=Mr,Ie.p=ct=zt*8;continue}if(ct>dr)throw"unexpected EOF"}it&&ht(yt+131072);for(var Wr=(1<<qt)-1,en=(1<<er)-1,un=qt+er+18;lt||ct+un<dr;){var $r=bt[l(me,ct)&Wr],cn=$r>>>4;if(ct+=$r&15,ct>dr)throw"unexpected EOF";if(!$r)throw"invalid length/literal";if(cn<256)ve[yt++]=cn;else if(cn==256){bt=null;break}else{var tn=cn-254;if(cn>264){var Vt=cn-257,Fr=O[Vt];tn=c(me,ct,(1<<Fr)-1)+d[Vt],ct+=Fr}var mr=Ht[l(me,ct)&en],Nr=mr>>>4;if(!mr)throw"invalid distance";ct+=mr&15;var Or=s[Nr];if(Nr>3){var Fr=q[Nr];Or+=l(me,ct)&(1<<Fr)-1,ct+=Fr}if(ct>dr)throw"unexpected EOF";it&&ht(yt+131072);for(var Hr=yt+tn;yt<Hr;yt+=4)ve[yt]=ve[yt-Or],ve[yt+1]=ve[yt+1-Or],ve[yt+2]=ve[yt+2-Or],ve[yt+3]=ve[yt+3-Or];yt=Hr}}Ie.l=bt,Ie.p=ct,Ie.b=yt,bt&&(vt=1,Ie.m=qt,Ie.d=Ht,Ie.n=er)}while(!vt);return yt==ve.length?ve:_(ve,0,yt)},m=function(me,ve,Ie){Ie<<=ve&7;var Ke=ve/8>>0;me[Ke]|=Ie,me[Ke+1]|=Ie>>>8},F=function(me,ve,Ie){Ie<<=ve&7;var Ke=ve/8>>0;me[Ke]|=Ie,me[Ke+1]|=Ie>>>8,me[Ke+2]|=Ie>>>16},H=function(me,ve){for(var Ie=[],Ke=0;Ke<me.length;++Ke)me[Ke]&&Ie.push({s:Ke,f:me[Ke]});var it=Ie.length,lt=Ie.slice();if(!it)return[new L(0),0];if(it==1){var ht=new L(Ie[0].s+1);return ht[Ie[0].s]=1,[ht,1]}Ie.sort(function(Ir,gr){return Ir.f-gr.f}),Ie.push({s:-1,f:25001});var vt=Ie[0],ct=Ie[1],yt=0,bt=1,Ht=2;for(Ie[0]={s:-1,f:vt.f+ct.f,l:vt,r:ct};bt!=it-1;)vt=Ie[Ie[yt].f<Ie[Ht].f?yt++:Ht++],ct=Ie[yt!=bt&&Ie[yt].f<Ie[Ht].f?yt++:Ht++],Ie[bt++]={s:-1,f:vt.f+ct.f,l:vt,r:ct};for(var qt=lt[0].s,Ke=1;Ke<it;++Ke)lt[Ke].s>qt&&(qt=lt[Ke].s);var er=new V(qt+1),dr=B(Ie[bt-1],er,0);if(dr>ve){var Ke=0,lr=0,Ar=dr-ve,Mr=1<<Ar;for(lt.sort(function(gr,Cr){return er[Cr.s]-er[gr.s]||gr.f-Cr.f});Ke<it;++Ke){var zt=lt[Ke].s;if(er[zt]>ve)lr+=Mr-(1<<dr-er[zt]),er[zt]=ve;else break}for(lr>>>=Ar;lr>0;){var ir=lt[Ke].s;er[ir]<ve?lr-=1<<ve-er[ir]++-1:++Ke}for(;Ke>=0&&lr;--Ke){var tr=lt[Ke].s;er[tr]==ve&&(--er[tr],++lr)}dr=ve}return[new L(er),dr]},B=function(me,ve,Ie){return me.s==-1?Math.max(B(me.l,ve,Ie+1),B(me.r,ve,Ie+1)):ve[me.s]=Ie},Q=function(me){for(var ve=me.length;ve&&!me[--ve];);for(var Ie=new V(++ve),Ke=0,it=me[0],lt=1,ht=function(ct){Ie[Ke++]=ct},vt=1;vt<=ve;++vt)if(me[vt]==it&&vt!=ve)++lt;else{if(!it&<>2){for(;lt>138;lt-=138)ht(32754);lt>2&&(ht(lt>10?lt-11<<5|28690:lt-3<<5|12305),lt=0)}else if(lt>3){for(ht(it),--lt;lt>6;lt-=6)ht(8304);lt>2&&(ht(lt-3<<5|8208),lt=0)}for(;lt--;)ht(it);lt=1,it=me[vt]}return[Ie.subarray(0,Ke),ve]},z=function(me,ve){for(var Ie=0,Ke=0;Ke<ve.length;++Ke)Ie+=me[Ke]*ve[Ke];return Ie},N=function(me,ve,Ie){var Ke=Ie.length,it=u(ve+2);me[it]=Ke&255,me[it+1]=Ke>>>8,me[it+2]=me[it]^255,me[it+3]=me[it+1]^255;for(var lt=0;lt<Ke;++lt)me[it+lt+4]=Ie[lt];return(it+4+Ke)*8},ee=function(me,ve,Ie,Ke,it,lt,ht,vt,ct,yt,bt){m(ve,bt++,Ie),++it[256];for(var Ht=H(it,15),qt=Ht[0],er=Ht[1],dr=H(lt,15),lr=dr[0],Ar=dr[1],Mr=Q(qt),zt=Mr[0],ir=Mr[1],tr=Q(lr),Ir=tr[0],gr=tr[1],Cr=new V(19),Vt=0;Vt<zt.length;++Vt)Cr[zt[Vt]&31]++;for(var Vt=0;Vt<Ir.length;++Vt)Cr[Ir[Vt]&31]++;for(var Qr=H(Cr,7),Pr=Qr[0],Er=Qr[1],kr=19;kr>4&&!Pr[k[kr-1]];--kr);var $r=yt+5<<3,Xr=z(it,t)+z(lt,y)+ht,Gr=z(it,qt)+z(lt,lr)+ht+14+3*kr+z(Cr,Pr)+(2*Cr[16]+3*Cr[17]+7*Cr[18]);if($r<=Xr&&$r<=Gr)return N(ve,bt,me.subarray(ct,ct+yt));var Or,Wr,en,un;if(m(ve,bt,1+(Gr<Xr)),bt+=2,Gr<Xr){Or=r(qt,er,0),Wr=qt,en=r(lr,Ar,0),un=lr;var cn=r(Pr,Er,0);m(ve,bt,ir-257),m(ve,bt+5,gr-1),m(ve,bt+10,kr-4),bt+=14;for(var Vt=0;Vt<kr;++Vt)m(ve,bt+3*Vt,Pr[k[Vt]]);bt+=3*kr;for(var tn=[zt,Ir],Fr=0;Fr<2;++Fr)for(var mr=tn[Fr],Vt=0;Vt<mr.length;++Vt){var Nr=mr[Vt]&31;m(ve,bt,cn[Nr]),bt+=Pr[Nr],Nr>15&&(m(ve,bt,mr[Vt]>>>5&127),bt+=mr[Vt]>>>12)}}else Or=b,Wr=t,en=T,un=y;for(var Vt=0;Vt<vt;++Vt)if(Ke[Vt]>255){var Nr=Ke[Vt]>>>18&31;F(ve,bt,Or[Nr+257]),bt+=Wr[Nr+257],Nr>7&&(m(ve,bt,Ke[Vt]>>>23&31),bt+=O[Nr]);var Hr=Ke[Vt]&31;F(ve,bt,en[Hr]),bt+=un[Hr],Hr>3&&(F(ve,bt,Ke[Vt]>>>5&8191),bt+=q[Hr])}else F(ve,bt,Or[Ke[Vt]]),bt+=Wr[Ke[Vt]];return F(ve,bt,Or[256]),bt+Wr[256]},le=new U([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Be=new L(0),Ce=function(me,ve,Ie,Ke,it,lt){var ht=me.length,vt=new L(Ke+ht+5*(1+Math.floor(ht/7e3))+it),ct=vt.subarray(Ke,vt.length-it),yt=0;if(!ve||ht<8)for(var bt=0;bt<=ht;bt+=65535){var Ht=bt+65535;Ht<ht?yt=N(ct,yt,me.subarray(bt,Ht)):(ct[bt]=lt,yt=N(ct,yt,me.subarray(bt,ht)))}else{for(var qt=le[ve-1],er=qt>>>13,dr=qt&8191,lr=(1<<Ie)-1,Ar=new V(32768),Mr=new V(lr+1),zt=Math.ceil(Ie/3),ir=2*zt,tr=function(Kr){return(me[Kr]^me[Kr+1]<<zt^me[Kr+2]<<ir)&lr},Ir=new U(25e3),gr=new V(288),Cr=new V(32),Vt=0,Qr=0,bt=0,Pr=0,Er=0,kr=0;bt<ht;++bt){var $r=tr(bt),Xr=bt&32767,Gr=Mr[$r];if(Ar[Xr]=Gr,Mr[$r]=Xr,Er<=bt){var Or=ht-bt;if((Vt>7e3||Pr>24576)&&Or>423){yt=ee(me,ct,0,Ir,gr,Cr,Qr,Pr,kr,bt-kr,yt),Pr=Vt=Qr=0,kr=bt;for(var Wr=0;Wr<286;++Wr)gr[Wr]=0;for(var Wr=0;Wr<30;++Wr)Cr[Wr]=0}var en=2,un=0,cn=dr,tn=Xr-Gr&32767;if(Or>2&&$r==tr(bt-tn))for(var Fr=Math.min(er,Or)-1,mr=Math.min(32767,bt),Nr=Math.min(258,Or);tn<=mr&&--cn&&Xr!=Gr;){if(me[bt+en]==me[bt+en-tn]){for(var Hr=0;Hr<Nr&&me[bt+Hr]==me[bt+Hr-tn];++Hr);if(Hr>en){if(en=Hr,un=tn,Hr>Fr)break;for(var dn=Math.min(tn,Hr-2),vn=0,Wr=0;Wr<dn;++Wr){var fn=bt-tn+Wr+32768&32767,si=Ar[fn],Jn=fn-si+32768&32767;Jn>vn&&(vn=Jn,Gr=fn)}}}Xr=Gr,Gr=Ar[Xr],tn+=Xr-Gr+32768&32767}if(un){Ir[Pr++]=268435456|p[en]<<18|i[un];var Pn=p[en]&31,kn=i[un]&31;Qr+=O[Pn]+q[kn],++gr[257+Pn],++Cr[kn],Er=bt+en,++Vt}else Ir[Pr++]=me[bt],++gr[me[bt]]}}yt=ee(me,ct,lt,Ir,gr,Cr,Qr,Pr,kr,bt-kr,yt),lt||(yt=N(ct,yt,Be))}return _(vt,0,Ke+u(yt)+it)},Me=function(){for(var me=new U(256),ve=0;ve<256;++ve){for(var Ie=ve,Ke=9;--Ke;)Ie=(Ie&1&&3988292384)^Ie>>>1;me[ve]=Ie}return me}(),Le=function(){var me=4294967295;return{p:function(ve){for(var Ie=me,Ke=0;Ke<ve.length;++Ke)Ie=Me[Ie&255^ve[Ke]]^Ie>>>8;me=Ie},d:function(){return me^4294967295}}},je=function(){var me=1,ve=0;return{p:function(Ie){for(var Ke=me,it=ve,lt=Ie.length,ht=0;ht!=lt;){for(var vt=Math.min(ht+5552,lt);ht<vt;++ht)Ke+=Ie[ht],it+=Ke;Ke%=65521,it%=65521}me=Ke,ve=it},d:function(){return(me>>>8<<16|(ve&255)<<8|ve>>>8)+((me&255)<<23)*2}}},He=function(me,ve,Ie,Ke,it){return Ce(me,ve.level==null?6:ve.level,ve.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(me.length)))*1.5):12+ve.mem,Ie,Ke,!it)},Je=function(me,ve){var Ie={};for(var Ke in me)Ie[Ke]=me[Ke];for(var Ke in ve)Ie[Ke]=ve[Ke];return Ie},Se=function(me,ve,Ie){for(var Ke=me(),it=me.toString(),lt=it.slice(it.indexOf("[")+1,it.lastIndexOf("]")).replace(/ /g,"").split(","),ht=0;ht<Ke.length;++ht){var vt=Ke[ht],ct=lt[ht];if(typeof vt=="function"){ve+=";"+ct+"=";var yt=vt.toString();if(vt.prototype)if(yt.indexOf("[native code]")!=-1){var bt=yt.indexOf(" ",8)+1;ve+=yt.slice(bt,yt.indexOf("(",bt))}else{ve+=yt;for(var Ht in vt.prototype)ve+=";"+ct+".prototype."+Ht+"="+vt.prototype[Ht].toString()}else ve+=yt}else Ie[ct]=vt}return[ve,Ie]},$=[],D=function(me){var ve=[];for(var Ie in me)(me[Ie]instanceof L||me[Ie]instanceof V||me[Ie]instanceof U)&&ve.push((me[Ie]=new me[Ie].constructor(me[Ie])).buffer);return ve},M=function(me,ve,Ie,Ke){var it;if(!$[Ie]){for(var lt="",ht={},vt=me.length-1,ct=0;ct<vt;++ct)it=Se(me[ct],lt,ht),lt=it[0],ht=it[1];$[Ie]=Se(me[vt],lt,ht)}var yt=Je({},$[Ie][1]);return W($[Ie][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+ve.toString()+"}",Ie,yt,D(yt),Ke)},te=function(){return[L,V,U,O,q,k,d,s,E,C,o,r,h,c,l,u,_,g,xe,Y,he]},oe=function(){return[L,V,U,O,q,k,p,i,b,t,T,y,o,le,Be,r,m,F,H,B,Q,z,N,ee,u,_,Ce,He,ge,Y]},G=function(){return[At,Ye,rt,Le,Me]},re=function(){return[pt,Pe]},j=function(){return[tt,rt,je]},J=function(){return[ot]},Y=function(me){return postMessage(me,[me.buffer])},he=function(me){return me&&me.size&&new L(me.size)},we=function(me,ve,Ie,Ke,it,lt){var ht=M(Ie,Ke,it,function(vt,ct){ht.terminate(),lt(vt,ct)});return ve.consume||(me=new L(me)),ht.postMessage([me,ve],[me.buffer]),function(){ht.terminate()}},Te=function(me){return me.ondata=function(ve,Ie){return postMessage([ve,Ie],[ve.buffer])},function(ve){return me.push(ve.data[0],ve.data[1])}},Xe=function(me,ve,Ie,Ke,it){var lt,ht=M(me,Ke,it,function(vt,ct){vt?(ht.terminate(),ve.ondata.call(ve,vt)):(ct[1]&&ht.terminate(),ve.ondata.call(ve,vt,ct[0],ct[1]))});ht.postMessage(Ie),ve.push=function(vt,ct){if(lt)throw"stream finished";if(!ve.ondata)throw"no stream handler";ht.postMessage([vt,lt=ct],[vt.buffer])},ve.terminate=function(){ht.terminate()}},Ze=function(me,ve){return me[ve]|me[ve+1]<<8},et=function(me,ve){return(me[ve]|me[ve+1]<<8|me[ve+2]<<16)+(me[ve+3]<<23)*2},rt=function(me,ve,Ie){for(;Ie;++ve)me[ve]=Ie,Ie>>>=8},At=function(me,ve){var Ie=ve.filename;if(me[0]=31,me[1]=139,me[2]=8,me[8]=ve.level<2?4:ve.level==9?2:0,me[9]=3,ve.mtime!=0&&rt(me,4,Math.floor(new Date(ve.mtime||Date.now())/1e3)),Ie){me[3]=8;for(var Ke=0;Ke<=Ie.length;++Ke)me[Ke+10]=Ie.charCodeAt(Ke)}},pt=function(me){if(me[0]!=31||me[1]!=139||me[2]!=8)throw"invalid gzip data";var ve=me[3],Ie=10;ve&4&&(Ie+=me[10]|(me[11]<<8)+2);for(var Ke=(ve>>3&1)+(ve>>4&1);Ke>0;Ke-=!me[Ie++]);return Ie+(ve&2)},Pe=function(me){var ve=me.length;return(me[ve-4]|me[ve-3]<<8|me[ve-2]<<16)+2*(me[ve-1]<<23)},Ye=function(me){return 10+(me.filename&&me.filename.length+1||0)},tt=function(me,ve){var Ie=ve.level,Ke=Ie==0?0:Ie<6?1:Ie==9?3:2;me[0]=120,me[1]=Ke<<6|(Ke?32-2*Ke:1)},ot=function(me){if((me[0]&15)!=8||me[0]>>>4>7||(me[0]<<8|me[1])%31)throw"invalid zlib data";if(me[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function pe(me,ve){return!ve&&typeof me=="function"&&(ve=me,me={}),this.ondata=ve,me}var ne=function(){function me(ve,Ie){!Ie&&typeof ve=="function"&&(Ie=ve,ve={}),this.ondata=Ie,this.o=ve||{}}return me.prototype.p=function(ve,Ie){this.ondata(He(ve,this.o,0,0,!Ie),Ie)},me.prototype.push=function(ve,Ie){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=Ie,this.p(ve,Ie||!1)},me}(),ie=function(){function me(ve,Ie){Xe([oe,function(){return[Te,ne]}],this,pe.call(this,ve,Ie),function(Ke){var it=new ne(Ke.data);onmessage=Te(it)},6)}return me}();function de(me,ve,Ie){if(Ie||(Ie=ve,ve={}),typeof Ie!="function")throw"no callback";return we(me,ve,[oe],function(Ke){return Y(ge(Ke.data[0],Ke.data[1]))},0,Ie)}function ge(me,ve){return ve===void 0&&(ve={}),He(me,ve,0,0)}var se=function(){function me(ve){this.s={},this.p=new L(0),this.ondata=ve}return me.prototype.e=function(ve){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var Ie=this.p.length,Ke=new L(Ie+ve.length);Ke.set(this.p),Ke.set(ve,Ie),this.p=Ke},me.prototype.c=function(ve){this.d=this.s.i=ve||!1;var Ie=this.s.b,Ke=g(this.p,this.o,this.s);this.ondata(_(Ke,Ie,this.s.b),this.d),this.o=_(Ke,this.s.b-32768),this.s.b=this.o.length,this.p=_(this.p,this.s.p/8>>0),this.s.p&=7},me.prototype.push=function(ve,Ie){this.e(ve),this.c(Ie)},me}(),Ae=function(){function me(ve){this.ondata=ve,Xe([te,function(){return[Te,se]}],this,0,function(){var Ie=new se;onmessage=Te(Ie)},7)}return me}();function Ee(me,ve,Ie){if(Ie||(Ie=ve,ve={}),typeof Ie!="function")throw"no callback";return we(me,ve,[te],function(Ke){return Y(xe(Ke.data[0],he(Ke.data[1])))},1,Ie)}function xe(me,ve){return g(me,ve)}var ke=function(){function me(ve,Ie){this.c=Le(),this.l=0,this.v=1,ne.call(this,ve,Ie)}return me.prototype.push=function(ve,Ie){ne.prototype.push.call(this,ve,Ie)},me.prototype.p=function(ve,Ie){this.c.p(ve),this.l+=ve.length;var Ke=He(ve,this.o,this.v&&Ye(this.o),Ie&&8,!Ie);this.v&&(At(Ke,this.o),this.v=0),Ie&&(rt(Ke,Ke.length-8,this.c.d()),rt(Ke,Ke.length-4,this.l)),this.ondata(Ke,Ie)},me}(),Qe=function(){function me(ve,Ie){Xe([oe,G,function(){return[Te,ne,ke]}],this,pe.call(this,ve,Ie),function(Ke){var it=new ke(Ke.data);onmessage=Te(it)},8)}return me}();function nt(me,ve,Ie){if(Ie||(Ie=ve,ve={}),typeof Ie!="function")throw"no callback";return we(me,ve,[oe,G,function(){return[dt]}],function(Ke){return Y(dt(Ke.data[0],Ke.data[1]))},2,Ie)}function dt(me,ve){ve===void 0&&(ve={});var Ie=Le(),Ke=me.length;Ie.p(me);var it=He(me,ve,Ye(ve),8),lt=it.length;return At(it,ve),rt(it,lt-8,Ie.d()),rt(it,lt-4,Ke),it}var wt=function(){function me(ve){this.v=1,se.call(this,ve)}return me.prototype.push=function(ve,Ie){if(se.prototype.e.call(this,ve),this.v){var Ke=pt(this.p);if(Ke>=this.p.length&&!Ie)return;this.p=this.p.subarray(Ke),this.v=0}if(Ie){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}se.prototype.c.call(this,Ie)},me}(),gt=function(){function me(ve){this.ondata=ve,Xe([te,re,function(){return[Te,se,wt]}],this,0,function(){var Ie=new wt;onmessage=Te(Ie)},9)}return me}();function $t(me,ve,Ie){if(Ie||(Ie=ve,ve={}),typeof Ie!="function")throw"no callback";return we(me,ve,[te,re,function(){return[xt]}],function(Ke){return Y(xt(Ke.data[0]))},3,Ie)}function xt(me,ve){return g(me.subarray(pt(me),-8),ve||new L(Pe(me)))}var ut=function(){function me(ve,Ie){this.c=je(),this.v=1,ne.call(this,ve,Ie)}return me.prototype.push=function(ve,Ie){ne.prototype.push.call(this,ve,Ie)},me.prototype.p=function(ve,Ie){this.c.p(ve);var Ke=He(ve,this.o,this.v&&2,Ie&&4,!Ie);this.v&&(tt(Ke,this.o),this.v=0),Ie&&rt(Ke,Ke.length-4,this.c.d()),this.ondata(Ke,Ie)},me}(),Ot=function(){function me(ve,Ie){Xe([oe,j,function(){return[Te,ne,ut]}],this,pe.call(this,ve,Ie),function(Ke){var it=new ut(Ke.data);onmessage=Te(it)},10)}return me}();function jt(me,ve,Ie){if(Ie||(Ie=ve,ve={}),typeof Ie!="function")throw"no callback";return we(me,ve,[oe,j,function(){return[Tt]}],function(Ke){return Y(Tt(Ke.data[0],Ke.data[1]))},4,Ie)}function Tt(me,ve){ve===void 0&&(ve={});var Ie=je();Ie.p(me);var Ke=He(me,ve,2,4);return tt(Ke,ve),rt(Ke,Ke.length-4,Ie.d()),Ke}var Yt=function(){function me(ve){this.v=1,se.call(this,ve)}return me.prototype.push=function(ve,Ie){if(se.prototype.e.call(this,ve),this.v){if(this.p.length<2&&!Ie)return;this.p=this.p.subarray(2),this.v=0}if(Ie){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}se.prototype.c.call(this,Ie)},me}(),Qt=function(){function me(ve){this.ondata=ve,Xe([te,J,function(){return[Te,se,Yt]}],this,0,function(){var Ie=new Yt;onmessage=Te(Ie)},11)}return me}();function Xt(me,ve,Ie){if(Ie||(Ie=ve,ve={}),typeof Ie!="function")throw"no callback";return we(me,ve,[te,J,function(){return[or]}],function(Ke){return Y(or(Ke.data[0],he(Ke.data[1])))},5,Ie)}function or(me,ve){return g((ot(me),me.subarray(2,-4)),ve)}var It=function(){function me(ve){this.G=wt,this.I=se,this.Z=Yt,this.ondata=ve}return me.prototype.push=function(ve,Ie){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(ve,Ie);else{if(this.p&&this.p.length){var Ke=new L(this.p.length+ve.length);Ke.set(this.p),Ke.set(ve,this.p.length)}else this.p=ve;if(this.p.length>2){var it=this,lt=function(){it.ondata.apply(it,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(lt):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(lt):new this.Z(lt),this.s.push(this.p,Ie),this.p=null}}},me}(),br=function(){function me(ve){this.G=gt,this.I=Ae,this.Z=Qt,this.ondata=ve}return me.prototype.push=function(ve,Ie){It.prototype.push.call(this,ve,Ie)},me}();function Mt(me,ve,Ie){if(Ie||(Ie=ve,ve={}),typeof Ie!="function")throw"no callback";return me[0]==31&&me[1]==139&&me[2]==8?$t(me,ve,Ie):(me[0]&15)!=8||me[0]>>4>7||(me[0]<<8|me[1])%31?Ee(me,ve,Ie):Xt(me,ve,Ie)}function Pt(me,ve){return me[0]==31&&me[1]==139&&me[2]==8?xt(me,ve):(me[0]&15)!=8||me[0]>>4>7||(me[0]<<8|me[1])%31?xe(me,ve):or(me,ve)}var kt=function(me,ve,Ie,Ke){for(var it in me){var lt=me[it],ht=ve+it;lt instanceof L?Ie[ht]=[lt,Ke]:Array.isArray(lt)?Ie[ht]=[lt[0],Je(Ke,lt[1])]:kt(lt,ht+"/",Ie,Ke)}};function pr(me,ve){var Ie=me.length;if(!ve&&typeof TextEncoder!="undefined")return new TextEncoder().encode(me);for(var Ke=new L(me.length+(me.length>>>1)),it=0,lt=function(yt){Ke[it++]=yt},ht=0;ht<Ie;++ht){if(it+5>Ke.length){var vt=new L(it+8+(Ie-ht<<1));vt.set(Ke),Ke=vt}var ct=me.charCodeAt(ht);ct<128||ve?lt(ct):ct<2048?(lt(192|ct>>>6),lt(128|ct&63)):ct>55295&&ct<57344?(ct=65536+(ct&1023<<10)|me.charCodeAt(++ht)&1023,lt(240|ct>>>18),lt(128|ct>>>12&63),lt(128|ct>>>6&63),lt(128|ct&63)):(lt(224|ct>>>12),lt(128|ct>>>6&63),lt(128|ct&63))}return _(Ke,0,it)}function jr(me,ve){var Ie="";if(!ve&&typeof TextDecoder!="undefined")return new TextDecoder().decode(me);for(var Ke=0;Ke<me.length;){var it=me[Ke++];it<128||ve?Ie+=String.fromCharCode(it):it<224?Ie+=String.fromCharCode((it&31)<<6|me[Ke++]&63):it<240?Ie+=String.fromCharCode((it&15)<<12|(me[Ke++]&63)<<6|me[Ke++]&63):(it=((it&15)<<18|(me[Ke++]&63)<<12|(me[Ke++]&63)<<6|me[Ke++]&63)-65536,Ie+=String.fromCharCode(55296|it>>10,56320|it&1023))}return Ie}var ln=function(me,ve){return ve+30+Ze(me,ve+26)+Ze(me,ve+28)},cr=function(me,ve,Ie){var Ke=Ze(me,ve+28),it=jr(me.subarray(ve+46,ve+46+Ke),!(Ze(me,ve+8)&2048)),lt=ve+46+Ke,ht=Ie?Jt(me,lt):[et(me,ve+20),et(me,ve+24),et(me,ve+42)],vt=ht[0],ct=ht[1],yt=ht[2];return[Ze(me,ve+10),vt,ct,it,lt+Ze(me,ve+30)+Ze(me,ve+32),yt]},Jt=function(me,ve){for(;Ze(me,ve)!=1;ve+=4+Ze(me,ve+2));return[et(me,ve+12),et(me,ve+4),et(me,ve+20)]},nr=function(me,ve,Ie,Ke,it,lt,ht,vt,ct,yt){var bt=lt.length,Ht=Ke.length;rt(me,ve,ct!=null?33639248:67324752),ve+=4,ct!=null&&(me[ve]=20,ve+=2),me[ve]=20,ve+=2,me[ve++]=yt==8&&(vt.level==1?6:vt.level<6?4:vt.level==9?2:0),me[ve++]=ht&&8,me[ve]=yt,ve+=2;var qt=new Date(vt.mtime||Date.now()),er=qt.getFullYear()-1980;if(er<0||er>119)throw"date not in range 1980-2099";rt(me,ve,(er<<24)*2|qt.getMonth()+1<<21|qt.getDate()<<16|qt.getHours()<<11|qt.getMinutes()<<5|qt.getSeconds()>>>1),ve+=4,rt(me,ve,Ie),rt(me,ve+4,Ht),rt(me,ve+8,it),rt(me,ve+12,bt),ve+=16,ct!=null&&(rt(me,ve+=10,ct),ve+=4),me.set(lt,ve),ve+=bt,ct==null&&me.set(Ke,ve)},Wt=function(me,ve,Ie,Ke,it){rt(me,ve,101010256),rt(me,ve+8,Ie),rt(me,ve+10,Ie),rt(me,ve+12,Ke),rt(me,ve+16,it)};function Sr(me,ve,Ie){if(Ie||(Ie=ve,ve={}),typeof Ie!="function")throw"no callback";var Ke={};kt(me,"",Ke,ve);var it=Object.keys(Ke),lt=it.length,ht=0,vt=0,ct=lt,yt=new Array(lt),bt=[],Ht=function(){for(var lr=0;lr<bt.length;++lr)bt[lr]()},qt=function(){var lr=new L(vt+22),Ar=ht,Mr=vt-ht;vt=0;for(var zt=0;zt<ct;++zt){var ir=yt[zt];try{nr(lr,vt,ir.c,ir.d,ir.m,ir.n,ir.u,ir.p,null,ir.t),nr(lr,ht,ir.c,ir.d,ir.m,ir.n,ir.u,ir.p,vt,ir.t),ht+=46+ir.n.length,vt+=30+ir.n.length+ir.d.length}catch(tr){return Ie(tr,null)}}Wt(lr,ht,yt.length,Mr,Ar),Ie(null,lr)};lt||qt();for(var er=function(lr){var Ar=it[lr],Mr=Ke[Ar],zt=Mr[0],ir=Mr[1],tr=Le(),Ir=zt.length;tr.p(zt);var gr=pr(Ar),Cr=gr.length,Vt=ir.level==0?0:8,Qr=function(Pr,Er){if(Pr)Ht(),Ie(Pr,null);else{var kr=Er.length;yt[lr]={t:Vt,d:Er,m:Ir,c:tr.d(),u:Ar.length!=kr,n:gr,p:ir},ht+=30+Cr+kr,vt+=76+2*Cr+kr,--lt||qt()}};if(gr.length>65535&&Qr("filename too long",null),!Vt)Qr(null,zt);else if(Ir<16e4)try{Qr(null,ge(zt,ir))}catch(Pr){Qr(Pr,null)}else bt.push(de(zt,ir,Qr))},dr=0;dr<ct;++dr)er(dr);return Ht}function Zt(me,ve){ve===void 0&&(ve={});var Ie={},Ke=[];kt(me,"",Ie,ve);var it=0,lt=0;for(var ht in Ie){var vt=Ie[ht],ct=vt[0],yt=vt[1],bt=yt.level==0?0:8,Ht=pr(ht),qt=Ht.length;if(Ht.length>65535)throw"filename too long";var er=bt?ge(ct,yt):ct,dr=er.length,lr=Le();lr.p(ct),Ke.push({t:bt,d:er,m:ct.length,c:lr.d(),u:ht.length!=qt,n:Ht,o:it,p:yt}),it+=30+qt+dr,lt+=76+2*qt+dr}for(var Ar=new L(lt+22),Mr=it,zt=lt-it,ir=0;ir<Ke.length;++ir){var tr=Ke[ir];nr(Ar,tr.o,tr.c,tr.d,tr.m,tr.n,tr.u,tr.p,null,tr.t),nr(Ar,it,tr.c,tr.d,tr.m,tr.n,tr.u,tr.p,tr.o,tr.t),it+=46+tr.n.length}return Wt(Ar,it,Ke.length,zt,Mr),Ar}function zr(me,ve){if(typeof ve!="function")throw"no callback";for(var Ie=[],Ke=function(){for(var qt=0;qt<Ie.length;++qt)Ie[qt]()},it={},lt=me.length-22;et(me,lt)!=101010256;--lt)if(!lt||me.length-lt>65558){ve("invalid zip file",null);return}var ht=Ze(me,lt+8);ht||ve(null,{});var vt=ht,ct=et(me,lt+16),yt=ct==4294967295;if(yt){if(lt=et(me,lt-12),et(me,lt)!=101075792)throw"invalid zip file";vt=ht=et(me,lt+32),ct=et(me,lt+48)}for(var bt=function(qt){var er=cr(me,ct,yt),dr=er[0],lr=er[1],Ar=er[2],Mr=er[3],zt=er[4],ir=er[5],tr=ln(me,ir);ct=zt;var Ir=function(Cr,Vt){Cr?(Ke(),ve(Cr,null)):(it[Mr]=Vt,--ht||ve(null,it))};if(!dr)Ir(null,_(me,tr,tr+lr));else if(dr==8){var gr=me.subarray(tr,tr+lr);if(lr<32e4)try{Ir(null,xe(gr,new L(Ar)))}catch(Cr){Ir(Cr,null)}else Ie.push(Ee(gr,{size:Ar},Ir))}else Ir("unknown compression type "+dr,null)},Ht=0;Ht<vt;++Ht)bt(Ht);return Ke}function sr(me){for(var ve={},Ie=me.length-22;et(me,Ie)!=101010256;--Ie)if(!Ie||me.length-Ie>65558)throw"invalid zip file";var Ke=Ze(me,Ie+8);if(!Ke)return{};var it=et(me,Ie+16),lt=it==4294967295;if(lt){if(Ie=et(me,Ie-12),et(me,Ie)!=101075792)throw"invalid zip file";Ke=et(me,Ie+32),it=et(me,Ie+48)}for(var ht=0;ht<Ke;++ht){var vt=cr(me,it,lt),ct=vt[0],yt=vt[1],bt=vt[2],Ht=vt[3],qt=vt[4],er=vt[5],dr=ln(me,er);if(it=qt,!ct)ve[Ht]=_(me,dr,dr+yt);else if(ct==8)ve[Ht]=xe(me.subarray(dr,dr+yt),new L(bt));else throw"unknown compression type "+ct}return ve}},dmUQ:function(ft,Oe,K){"use strict";var fe=K("Ff2n"),W=K("rePB"),L=K("1OyB"),V=K("vuIU"),U=K("Ji7U"),O=K("md7G"),q=K("foSv"),k=K("q1tI"),e=K.n(k),I=K("TSYQ"),d=K.n(I),p=K("4IlW");function A(l,u){var _=Object.keys(l);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(l);u&&(g=g.filter(function(m){return Object.getOwnPropertyDescriptor(l,m).enumerable})),_.push.apply(_,g)}return _}function s(l){for(var u=1;u<arguments.length;u++){var _=arguments[u]!=null?arguments[u]:{};u%2?A(Object(_),!0).forEach(function(g){Object(W.a)(l,g,_[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(_)):A(Object(_)).forEach(function(g){Object.defineProperty(l,g,Object.getOwnPropertyDescriptor(_,g))})}return l}function i(l){var u=o();return function(){var g=Object(q.a)(l),m;if(u){var F=Object(q.a)(this).constructor;m=Reflect.construct(g,arguments,F)}else m=g.apply(this,arguments);return Object(O.a)(this,m)}}function o(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(l){return!1}}function n(){}function a(l){l.preventDefault()}var r=function(u){return u.replace(/[^\w.-]+/g,"")},t=200,y=600,b=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,E=function(u){return u!=null},T=function(u,_){return _===u||typeof _=="number"&&typeof u=="number"&&isNaN(_)&&isNaN(u)},C=function(l){Object(U.a)(_,l);var u=i(_);function _(g){var m;Object(L.a)(this,_),m=u.call(this,g),m.onKeyDown=function(B){var Q=m.props,z=Q.onKeyDown,N=Q.onPressEnter;if(B.keyCode===p.a.UP){var ee=m.getRatio(B);m.up(B,ee,null),m.stop()}else if(B.keyCode===p.a.DOWN){var le=m.getRatio(B);m.down(B,le,null),m.stop()}else B.keyCode===p.a.ENTER&&N&&N(B);if(m.recordCursorPosition(),m.lastKeyCode=B.keyCode,z){for(var Be=arguments.length,Ce=new Array(Be>1?Be-1:0),Me=1;Me<Be;Me++)Ce[Me-1]=arguments[Me];z.apply(void 0,[B].concat(Ce))}},m.onKeyUp=function(B){var Q=m.props.onKeyUp;if(m.stop(),m.recordCursorPosition(),Q){for(var z=arguments.length,N=new Array(z>1?z-1:0),ee=1;ee<z;ee++)N[ee-1]=arguments[ee];Q.apply(void 0,[B].concat(N))}},m.onChange=function(B){var Q=m.props.onChange;m.state.focused&&(m.inputting=!0),m.rawInput=m.props.parser(m.getValueFromEvent(B)),m.setState({inputValue:m.rawInput}),Q(m.toNumber(m.rawInput))},m.onMouseUp=function(){var B=m.props.onMouseUp;m.recordCursorPosition(),B&&B.apply(void 0,arguments)},m.onFocus=function(){var B;m.setState({focused:!0}),(B=m.props).onFocus.apply(B,arguments)},m.onBlur=function(){var B=m.props.onBlur;m.inputting=!1,m.setState({focused:!1});var Q=m.getCurrentValidValue(m.state.inputValue),z=m.setValue(Q,n);if(B){var N=m.input.value,ee=m.getInputDisplayValue({focus:!1,value:z});m.input.value=ee&&Number(ee),B.apply(void 0,arguments),m.input.value=N}},m.getRatio=function(B){var Q=1;return B.metaKey||B.ctrlKey?Q=.1:B.shiftKey&&(Q=10),Q},m.getFullNum=function(B){return isNaN(B)?B:/e/i.test(String(B))?Number(B).toFixed(18).replace(/\.?0+$/,""):B},m.getPrecision=function(B){if(E(m.props.precision))return m.props.precision;var Q=String(B);if(Q.indexOf("e-")>=0)return parseInt(Q.slice(Q.indexOf("e-")+2),10);var z=0;return Q.indexOf(".")>=0&&(z=Q.length-Q.indexOf(".")-1),z},m.getInputDisplayValue=function(B){var Q=B||m.state,z=Q.focused,N=Q.inputValue,ee=Q.value,le;z?le=N:le=m.toPrecisionAsStep(ee),le==null&&(le="");var Be=m.formatWrapper(le);return E(m.props.decimalSeparator)&&(Be=Be.toString().replace(".",m.props.decimalSeparator)),Be},m.recordCursorPosition=function(){try{m.cursorStart=m.input.selectionStart,m.cursorEnd=m.input.selectionEnd,m.currentValue=m.input.value,m.cursorBefore=m.input.value.substring(0,m.cursorStart),m.cursorAfter=m.input.value.substring(m.cursorEnd)}catch(B){}},m.restoreByAfter=function(B){if(B===void 0)return!1;var Q=m.input.value,z=Q.lastIndexOf(B);if(z===-1)return!1;var N=m.cursorBefore.length;return m.lastKeyCode===p.a.DELETE&&m.cursorBefore.charAt(N-1)===B[0]?(m.fixCaret(N,N),!0):z+B.length===Q.length?(m.fixCaret(z,z),!0):!1},m.partRestoreByAfter=function(B){return B===void 0?!1:Array.prototype.some.call(B,function(Q,z){var N=B.substring(z);return m.restoreByAfter(N)})},m.isNotCompleteNumber=function(B){return isNaN(B)||B===""||B===null||B&&B.toString().indexOf(".")===B.toString().length-1},m.stop=function(){m.autoStepTimer&&clearTimeout(m.autoStepTimer)},m.down=function(B,Q,z){m.pressingUpOrDown=!0,m.step("down",B,Q,z)},m.up=function(B,Q,z){m.pressingUpOrDown=!0,m.step("up",B,Q,z)},m.saveInput=function(B){m.input=B};var F=g.value;F===void 0&&(F=g.defaultValue),m.state={focused:g.autoFocus};var H=m.getValidValue(m.toNumber(F));return m.state=s(s({},m.state),{},{inputValue:m.toPrecisionAsStep(H),value:H}),m}return Object(V.a)(_,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(m){var F=this.props,H=F.value,B=F.onChange,Q=F.max,z=F.min,N=this.state.focused;if(m){if(!T(m.value,H)||!T(m.max,Q)||!T(m.min,z)){var ee=N?H:this.getValidValue(H),le;this.pressingUpOrDown?le=ee:this.inputting?le=this.rawInput:le=this.toPrecisionAsStep(ee),this.setState({value:ee,inputValue:le})}var Be="value"in this.props?H:this.state.value;"max"in this.props&&m.max!==Q&&typeof Be=="number"&&Be>Q&&B&&B(Q),"min"in this.props&&m.min!==z&&typeof Be=="number"&&Be<z&&B&&B(z)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Ce=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===p.a.BACKSPACE?Ce=this.cursorStart-1:this.lastKeyCode===p.a.DELETE&&(Ce=this.cursorStart):Ce=this.input.value.length,this.fixCaret(Ce,Ce)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case p.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case p.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Me){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(m){var F=m;return F===""?F="":this.isNotCompleteNumber(parseFloat(F))?F=this.state.value:F=this.getValidValue(F),this.toNumber(F)}},{key:"getValueFromEvent",value:function(m){var F=m.target.value.trim().replace(/。/g,".");return E(this.props.decimalSeparator)&&(F=F.replace(this.props.decimalSeparator,".")),F}},{key:"getValidValue",value:function(m){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,B=parseFloat(m);return isNaN(B)?m:(B<F&&(B=F),B>H&&(B=H),B)}},{key:"setValue",value:function(m,F){var H=this.props.precision,B=this.isNotCompleteNumber(parseFloat(m))?null:parseFloat(m),Q=this.state.value,z=Q===void 0?null:Q,N=this.state.inputValue,ee=N===void 0?null:N,le=typeof B=="number"?B.toFixed(H):"".concat(B),Be=B!==z||le!=="".concat(ee);return"value"in this.props?(ee=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:ee},F)):this.setState({value:B,inputValue:this.toPrecisionAsStep(m)},F),Be&&this.props.onChange(B),B}},{key:"getMaxPrecision",value:function(m){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=this.props,B=H.precision,Q=H.step;if(E(B))return B;var z=this.getPrecision(F),N=this.getPrecision(Q),ee=this.getPrecision(m);return m?Math.max(ee,z+N):z+N}},{key:"getPrecisionFactor",value:function(m){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,H=this.getMaxPrecision(m,F);return Math.pow(10,H)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(m){return this.props.formatter?this.props.formatter(m):m}},{key:"toPrecisionAsStep",value:function(m){if(this.isNotCompleteNumber(m)||m==="")return m;var F=Math.abs(this.getMaxPrecision(m));return isNaN(F)?m.toString():Number(m).toFixed(F)}},{key:"toNumber",value:function(m){var F=this.props.precision,H=this.state.focused,B=m&&m.length>16&&H;return this.isNotCompleteNumber(m)||B?m:E(F)?Math.round(m*Math.pow(10,F))/Math.pow(10,F):Number(m)}},{key:"upStep",value:function(m,F){var H=this.props.step,B=this.getPrecisionFactor(m,F),Q=Math.abs(this.getMaxPrecision(m,F)),z=((B*m+B*H*F)/B).toFixed(Q);return this.toNumber(z)}},{key:"downStep",value:function(m,F){var H=this.props.step,B=this.getPrecisionFactor(m,F),Q=Math.abs(this.getMaxPrecision(m,F)),z=((B*m-B*H*F)/B).toFixed(Q);return this.toNumber(z)}},{key:"step",value:function(m,F){var H=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Q=arguments.length>3?arguments[3]:void 0;this.stop(),F&&(F.persist(),F.preventDefault());var z=this.props;if(z.disabled)return;var N=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(N))return;var ee=this["".concat(m,"Step")](N,B),le=ee>z.max||ee<z.min;if(ee>z.max?ee=z.max:ee<z.min&&(ee=z.min),this.setValue(ee,null),this.setState({focused:!0},function(){H.pressingUpOrDown=!1}),le)return;this.autoStepTimer=setTimeout(function(){H[m](F,B,!0)},Q?t:y)}},{key:"fixCaret",value:function(m,F){if(m===void 0||F===void 0||!this.input||!this.input.value)return;try{var H=this.input.selectionStart,B=this.input.selectionEnd;(m!==H||F!==B)&&this.input.setSelectionRange(m,F)}catch(Q){}}},{key:"render",value:function(){var m,F=this.props,H=F.prefixCls,B=F.disabled,Q=F.readOnly,z=F.useTouch,N=F.autoComplete,ee=F.upHandler,le=F.downHandler,Be=F.className,Ce=F.max,Me=F.min,Le=F.style,je=F.title,He=F.onMouseEnter,Je=F.onMouseLeave,Se=F.onMouseOver,$=F.onMouseOut,D=F.required,M=F.onClick,te=F.tabIndex,oe=F.type,G=F.placeholder,re=F.id,j=F.inputMode,J=F.pattern,Y=F.step,he=F.maxLength,we=F.autoFocus,Te=F.name,Xe=F.onPaste,Ze=F.onInput,et=Object(fe.a)(F,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),rt=this.state,At=rt.value,pt=rt.focused,Pe=d()(H,(m={},Object(W.a)(m,Be,!!Be),Object(W.a)(m,"".concat(H,"-disabled"),B),Object(W.a)(m,"".concat(H,"-focused"),pt),m)),Ye={};Object.keys(et).forEach(function(xe){(xe.substr(0,5)==="data-"||xe.substr(0,5)==="aria-"||xe==="role")&&(Ye[xe]=et[xe])});var tt=!Q&&!B,ot=this.getInputDisplayValue(null),pe=(At||At===0)&&(isNaN(At)||Number(At)>=Ce),ne=(At||At===0)&&(isNaN(At)||Number(At)<=Me),ie=pe||B||Q,de=ne||B||Q,ge=d()("".concat(H,"-handler"),"".concat(H,"-handler-up"),Object(W.a)({},"".concat(H,"-handler-up-disabled"),ie)),se=d()("".concat(H,"-handler"),"".concat(H,"-handler-down"),Object(W.a)({},"".concat(H,"-handler-down-disabled"),de)),Ae=z?{onTouchStart:ie?n:this.up,onTouchEnd:this.stop}:{onMouseDown:ie?n:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ee=z?{onTouchStart:de?n:this.down,onTouchEnd:this.stop}:{onMouseDown:de?n:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return e.a.createElement("div",{className:Pe,style:Le,title:je,onMouseEnter:He,onMouseLeave:Je,onMouseOver:Se,onMouseOut:$,onFocus:function(){return null},onBlur:function(){return null}},e.a.createElement("div",{className:"".concat(H,"-handler-wrap")},e.a.createElement("span",Object.assign({unselectable:"on"},Ae,{role:"button","aria-label":"Increase Value","aria-disabled":ie,className:ge}),ee||e.a.createElement("span",{unselectable:"on",className:"".concat(H,"-handler-up-inner"),onClick:a})),e.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Decrease Value","aria-disabled":de,className:se}),le||e.a.createElement("span",{unselectable:"on",className:"".concat(H,"-handler-down-inner"),onClick:a}))),e.a.createElement("div",{className:"".concat(H,"-input-wrap")},e.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Me,"aria-valuemax":Ce,"aria-valuenow":At,required:D,type:oe,placeholder:G,onPaste:Xe,onClick:M,onMouseUp:this.onMouseUp,className:"".concat(H,"-input"),tabIndex:te,autoComplete:N,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:tt?this.onKeyDown:n,onKeyUp:tt?this.onKeyUp:n,autoFocus:we,maxLength:he,readOnly:Q,disabled:B,max:Ce,min:Me,step:Y,name:Te,title:je,id:re,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ot),pattern:J,inputMode:j,onInput:Ze},Ye))))}}]),_}(e.a.Component);C.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:b,min:-b,step:1,style:{},onChange:n,onKeyDown:n,onPressEnter:n,onFocus:n,onBlur:n,parser:r,required:!1,autoComplete:"off"};var h=C,c=Oe.a=h},fjLI:function(ft,Oe,K){"use strict";K.d(Oe,"f",function(){return A}),K.d(Oe,"b",function(){return s}),K.d(Oe,"a",function(){return i}),K.d(Oe,"d",function(){return o}),K.d(Oe,"e",function(){return n}),K.d(Oe,"c",function(){return a});var fe=K("8HAY"),W=K("Vhoy"),L=K("MI8n"),V=K("JYp7"),U=K("pmY6"),O=K("24hK"),q=K("nnTU"),k=K("T8No"),e=K("Cg/j"),I=K("t9D7"),d=function(r,t,y,b){var E=arguments.length,T=E<3?t:b===null?b=Object.getOwnPropertyDescriptor(t,y):b,C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(r,t,y,b);else for(var h=r.length-1;h>=0;h--)(C=r[h])&&(T=(E<3?C(T):E>3?C(t,y,T):C(t,y))||T);return E>3&&T&&Object.defineProperty(t,y,T),T},p=function(r,t){return function(y,b){t(y,b,r)}};function A(r){return r.command!==void 0}class s{constructor(r){this.id=s._idPool++,this._debugName=r}}s._idPool=0,s.CommandPalette=new s("CommandPalette"),s.EditorContext=new s("EditorContext"),s.SimpleEditorContext=new s("SimpleEditorContext"),s.EditorContextCopy=new s("EditorContextCopy"),s.EditorContextPeek=new s("EditorContextPeek"),s.MenubarEditMenu=new s("MenubarEditMenu"),s.MenubarCopy=new s("MenubarCopy"),s.MenubarGoMenu=new s("MenubarGoMenu"),s.MenubarSelectionMenu=new s("MenubarSelectionMenu"),s.InlineCompletionsActions=new s("InlineCompletionsActions");const i=Object(e.c)("menuService"),o=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new L.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:r=>r===s.CommandPalette}}addCommand(r){return this.addCommands(V.a.single(r))}addCommands(r){for(const t of r)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(U.i)(()=>{let t=!1;for(const y of r)t=this._commands.delete(y.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(r){return this._commands.get(r)}getCommands(){const r=new Map;return this._commands.forEach((t,y)=>r.set(y,t)),r}appendMenuItem(r,t){return this.appendMenuItems(V.a.single({id:r,item:t}))}appendMenuItems(r){const t=new Set,y=new O.a;for(const{id:b,item:E}of r){let T=this._menuItems.get(b);T||(T=new O.a,this._menuItems.set(b,T)),y.push(T.push(E)),t.add(b)}return this._onDidChangeMenu.fire(t),Object(U.i)(()=>{if(y.size>0){for(let b of y)b();this._onDidChangeMenu.fire(t),y.clear()}})}getMenuItems(r){let t;return this._menuItems.has(r)?t=[...this._menuItems.get(r)]:t=[],r===s.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(r){const t=new Set;for(const y of r)A(y)&&(t.add(y.command.id),y.alt&&t.add(y.alt.id));this._commands.forEach((y,b)=>{t.has(b)||r.push({command:y})})}};class n extends fe.e{constructor(r,t,y,b){super(`submenuitem.${r.submenu.id}`,typeof r.title=="string"?r.title:r.title.value,[],"submenu");this.item=r,this._menuService=t,this._contextKeyService=y,this._options=b}get actions(){const r=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),y=t.getActions(this._options);t.dispose();for(const[,b]of y)b.length>0&&(r.push(...b),r.push(new fe.d));return r.length&&r.pop(),r}}let a=class r{constructor(t,y,b,E,T){var C,h;if(this._commandService=T,this.id=t.id,this.label=(b==null?void 0:b.renderShortTitle)&&t.shortTitle?typeof t.shortTitle=="string"?t.shortTitle:t.shortTitle.value:typeof t.title=="string"?t.title:t.title.value,this.tooltip=(h=typeof t.tooltip=="string"?t.tooltip:(C=t.tooltip)===null||C===void 0?void 0:C.value)!==null&&h!==void 0?h:"",this.enabled=!t.precondition||E.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){const c=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=E.contextMatchesRules(c.condition),this.checked&&c.tooltip&&(this.tooltip=typeof c.tooltip=="string"?c.tooltip:c.tooltip.value),c.title&&(this.label=typeof c.title=="string"?c.title:c.title.value)}this.item=t,this.alt=y?new r(y,void 0,b,E,T):void 0,this._options=b,I.d.isThemeIcon(t.icon)&&(this.class=W.a.asClassName(t.icon))}dispose(){}run(...t){var y,b;let E=[];return((y=this._options)===null||y===void 0?void 0:y.arg)&&(E=[...E,this._options.arg]),((b=this._options)===null||b===void 0?void 0:b.shouldForwardArgs)&&(E=[...E,...t]),this._commandService.executeCommand(this.id,...E)}};a=d([p(3,k.b),p(4,q.b)],a)},fyJ8:function(ft,Oe,K){"use strict";var fe=K("rePB"),W=K("VTBJ"),L=K("Ff2n"),V=K("U8pU"),U=K("q1tI"),O=K.n(U),q=K("TSYQ"),k=K.n(q),e=K("c+Xe"),I=K("sR1s");function d(o){return o&&Object(V.a)(o)==="object"&&!Array.isArray(o)&&!U.isValidElement(o)}function p(o){return typeof o=="string"?!0:Object(e.c)(o)}function A(o,n){var a,r=o.prefixCls,t=o.className,y=o.record,b=o.index,E=o.dataIndex,T=o.render,C=o.children,h=o.component,c=h===void 0?"td":h,l=o.colSpan,u=o.rowSpan,_=o.fixLeft,g=o.fixRight,m=o.firstFixLeft,F=o.lastFixLeft,H=o.firstFixRight,B=o.lastFixRight,Q=o.appendNode,z=o.additionalProps,N=z===void 0?{}:z,ee=o.ellipsis,le=o.align,Be=o.rowType,Ce=o.isSticky,Me="".concat(r,"-cell"),Le,je;if(C)je=C;else{var He=Object(I.b)(y,E);if(je=He,T){var Je=T(He,y,b);d(Je)?(je=Je.children,Le=Je.props):je=Je}}Object(V.a)(je)==="object"&&!Array.isArray(je)&&!U.isValidElement(je)&&(je=null),ee&&(F||H)&&(je=U.createElement("span",{className:"".concat(Me,"-content")},je));var Se=Le||{},$=Se.colSpan,D=Se.rowSpan,M=Se.style,te=Se.className,oe=Object(L.a)(Se,["colSpan","rowSpan","style","className"]),G=$!==void 0?$:l,re=D!==void 0?D:u;if(G===0||re===0)return null;var j={},J=typeof _=="number",Y=typeof g=="number";J&&(j.position="sticky",j.left=_),Y&&(j.position="sticky",j.right=g);var he={};le&&(he.textAlign=le);var we,Te=ee===!0?{showTitle:!0}:ee;Te&&(Te.showTitle||Be==="header")&&(typeof je=="string"||typeof je=="number"?we=je.toString():U.isValidElement(je)&&typeof je.props.children=="string"&&(we=je.props.children));var Xe=Object(W.a)(Object(W.a)(Object(W.a)({title:we},oe),N),{},{colSpan:G&&G!==1?G:null,rowSpan:re&&re!==1?re:null,className:k()(Me,t,(a={},Object(fe.a)(a,"".concat(Me,"-fix-left"),J),Object(fe.a)(a,"".concat(Me,"-fix-left-first"),m),Object(fe.a)(a,"".concat(Me,"-fix-left-last"),F),Object(fe.a)(a,"".concat(Me,"-fix-right"),Y),Object(fe.a)(a,"".concat(Me,"-fix-right-first"),H),Object(fe.a)(a,"".concat(Me,"-fix-right-last"),B),Object(fe.a)(a,"".concat(Me,"-ellipsis"),ee),Object(fe.a)(a,"".concat(Me,"-with-append"),Q),Object(fe.a)(a,"".concat(Me,"-fix-sticky"),(J||Y)&&Ce),a),N.className,te),style:Object(W.a)(Object(W.a)(Object(W.a)(Object(W.a)({},N.style),he),j),M),ref:p(c)?n:null});return U.createElement(c,Object.assign({},Xe),Q,je)}var s=U.forwardRef(A);s.displayName="Cell";var i=U.memo(s,function(o,n){return n.shouldCellUpdate?!n.shouldCellUpdate(n.record,o.record):!1});Oe.a=i},hW8S:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return V}),K.d(Oe,"c",function(){return U}),K.d(Oe,"b",function(){return O});var fe=K("VTBJ"),W=K("Ff2n"),L=K("Kwbf"),V="RC_TABLE_INTERNAL_COL_DEFINE";function U(q){var k=q.expandable,e=Object(W.a)(q,["expandable"]);return"expandable"in q?Object(fe.a)(Object(fe.a)({},e),k):e}function O(q){return Object.keys(q).reduce(function(k,e){return(e.substr(0,5)==="data-"||e.substr(0,5)==="aria-")&&(k[e]=q[e]),k},{})}},ic2d:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return V});var fe=K("FWmy"),W=K("746U");class L{constructor(){this.data=new Map}add(U,O){fe.a(W.l(U)),fe.a(W.k(O)),fe.a(!this.data.has(U),"There is already an extension with this id"),this.data.set(U,O)}as(U){return this.data.get(U)||null}}const V=new L},ie49:function(ft,Oe,K){ft.exports={brief:"brief___29L5W",contentTitle:"contentTitle___2wPLj",content:"content___2MAv3",tips:"tips___3qmPX",antdTable:"antdTable___o4ScH",tableCell:"tableCell___24I9Y",antdModal:"antdModal___1nRWw"}},kHHm:function(ft,Oe,K){"use strict";var fe=K("g9YV"),W=K("wCAj"),L=K("giR+"),V=K("fyUT"),U=K("2qtc"),O=K("kLXV"),q=K("miYZ"),k=K("tsqr"),e=K("9og8"),I=K("tJVT"),d=K("PpiC"),p=K("5NDa"),A=K("5rEg"),s=K("WmNS"),i=K.n(s),o=K("q1tI"),n=K.n(o),a=K("9kvl"),r=K("6K3P"),t=K.n(r),y=K("5jaM"),b=K.n(y),E=K("PEfE"),T=K.n(E),C=K("1vsH"),h=K("+L6B"),c=K("2/Rp"),l=K("ORPY"),u=K.n(l),_=K("rd/4"),g=K.n(_),m=K("3pxb"),F=K.n(m),H=function(Ce){var Me=Ce.createState,Le=Ce.refreshLoading,je=Ce.onRefresh,He=je===void 0?function(){}:je,Je=Ce.onCreate,Se=Je===void 0?function(){}:Je;return n.a.createElement("div",{className:u.a.sendToClass},Me?n.a.createElement(n.a.Fragment,null,n.a.createElement("img",{src:g.a,alt:"\u7A7A"}),n.a.createElement("div",null,"\u60A8\u8FD8\u6CA1\u6709\u521B\u5EFA\u6559\u5B66\u8BFE\u5802\uFF0C\u65E0\u6CD5\u5C06\u8BD5\u5377\u53D1\u9001\u81F3\u6559\u5B66\u8BFE\u5802\u3002"),n.a.createElement(c.a,{onClick:Se,type:"primary",ghost:!0},"\u7ACB\u5373\u521B\u5EFA")):n.a.createElement(n.a.Fragment,null,n.a.createElement("img",{src:F.a,alt:"\u7A7A"}),n.a.createElement("div",null,"\u5DF2\u521B\u5EFA\u6559\u5B66\u8BFE\u5802\uFF1F\u8BF7\u5237\u65B0\u5217\u8868"),n.a.createElement(c.a,{loading:Le,onClick:He,type:"primary",ghost:!0},"\u7ACB\u5373\u5237\u65B0")))},B=H,Q=K("9z17"),z=K("LvDl"),N=A.a.Search,ee=function(Ce){var Me=Ce.paperlibrary,Le=Ce.globalSetting,je=Ce.loading,He=Ce.dispatch,Je=Object(d.a)(Ce,["paperlibrary","globalSetting","loading","dispatch"]),Se=Object(o.useState)(""),$=Object(I.a)(Se,2),D=$[0],M=$[1],te=Object(o.useState)([]),oe=Object(I.a)(te,2),G=oe[0],re=oe[1],j=Object(o.useState)([]),J=Object(I.a)(j,2),Y=J[0],he=J[1],we=Object(o.useState)(!1),Te=Object(I.a)(we,2),Xe=Te[0],Ze=Te[1],et=Object(o.useState)(!0),rt=Object(I.a)(et,2),At=rt[0],pt=rt[1],Pe=Object(o.useState)(!0),Ye=Object(I.a)(Pe,2),tt=Ye[0],ot=Ye[1],pe=Object(o.useState)(!1),ne=Object(I.a)(pe,2),ie=ne[0],de=ne[1];Object(o.useEffect)(function(){se()},[]);var ge=function(){he([]),M(""),se(!0),He({type:"paperlibrary/setActionTabs",payload:{}})},se=function(){var ut=Object(e.a)(i.a.mark(function Ot(jt){var Tt;return i.a.wrap(function(Qt){for(;;)switch(Qt.prev=Qt.next){case 0:return ot(!0),Qt.next=3,He({type:"paperlibrary/getCourseList",payload:{search:jt?"":D}});case 3:Tt=Qt.sent,Tt&&(re((Tt==null?void 0:Tt.courses)||[]),pt(!0),de(!1)),ot(!1);case 6:case"end":return Qt.stop()}},Ot)}));return function(jt){return ut.apply(this,arguments)}}(),Ae=function(Ot){var jt=parseInt(Ot);return Object(z.isNaN)(jt)?"":jt},Ee=function(){var ut=Object(e.a)(i.a.mark(function Ot(){var jt,Tt,Yt;return i.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:if(Y.length){Xt.next=4;break}return k.b.info("\u60A8\u9700\u8981\u521B\u5EFA\u8BFE\u5802\uFF0C\u624D\u80FD\u53D1\u9001"),Ze(!0),Xt.abrupt("return");case 4:return Xt.next=6,xt({id:(jt=Me.actionTabs)===null||jt===void 0||((Tt=jt.params)===null||Tt===void 0)?void 0:Tt.id,course_id:Y==null?void 0:Y[0],type:"examination_bank"});case 6:Yt=Xt.sent,Yt||xe([]);case 8:case"end":return Xt.stop()}},Ot)}));return function(){return ut.apply(this,arguments)}}(),xe=function(){var ut=Object(e.a)(i.a.mark(function Ot(jt){var Tt,Yt,Qt,Xt,or,It,br,Mt,Pt,kt,pr,jr;return i.a.wrap(function(cr){for(;;)switch(cr.prev=cr.next){case 0:if((Tt=Me.actionTabs)!==null&&Tt!==void 0&&(Yt=Tt.params)!==null&&Yt!==void 0&&(Qt=Yt.data)!==null&&Qt!==void 0&&Qt.is_random){cr.next=7;break}return cr.next=3,He({type:"paperlibrary/sendToClass",payload:{course_id:Y==null?void 0:Y[0],id:(Xt=Me.actionTabs)===null||Xt===void 0||((or=Xt.params)===null||or===void 0)?void 0:or.id,shixuns_info:jt.map(function(Jt){return{shixun_id:Jt.id,is_copy:Jt.is_copy,is_use:Jt.is_use}})}});case 3:return It=cr.sent,It&&It.status===0&&(He({type:"paperlibrary/setActionTabs",payload:{}}),he([]),Pt=It==null||((br=It.first_category_url)===null||br===void 0||((Mt=br.split("/"))===null||Mt===void 0))?void 0:Mt[2],Object(C.S)("/classrooms/".concat(Pt,"/exercise"))),gt(),cr.abrupt("return");case 7:kt=G.find(function(Jt){return Jt.course_id===(Y==null?void 0:Y[0])}),pr=1,jr=O.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:500,maskClosable:!1,keyboard:!1,cancelButtonProps:{disabled:!1},title:"\u914D\u7F6E\u51FA\u5377\u6570\u91CF",content:n.a.createElement("div",{className:T.a.modalColumn},n.a.createElement("div",{style:{color:"#676A6C",display:"flex"},className:"font14 mt20 mb10"},n.a.createElement("img",{style:{marginRight:5},src:t.a}),"\u968F\u673A\u7EC4\u5377\u7C7B\u578B\u7684\u8BD5\u5377\u6309\u7167\u51FA\u5377\u6570\u91CF\u5BF9\u6307\u5B9A\u8BFE\u5802\u751F\u6210\u4E0D\u91CD\u590D\u7684\u8BD5\u5377\u3002"),n.a.createElement("div",{style:{paddingLeft:18}},"\u8BFE\u5802\u540D\u79F0: ",kt==null?void 0:kt.course_name),n.a.createElement("div",{style:{paddingLeft:9},className:T.a.modalRow},n.a.createElement("sup",{className:T.a.sup},"*"),n.a.createElement("span",{style:{flexShrink:0}},"\u968F\u673A\u51FA\u5377\u6570\u91CF\uFF1A"),n.a.createElement(V.a,{parser:Ae,style:{width:120},placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u6570\u91CF",min:1,defaultValue:pr,onChange:function(nr){pr=nr;var Wt=document.getElementById("model_error");pr<1||pr>50?Wt.style.display="block":Wt.style.display="none"}})),n.a.createElement("div",{style:{display:"none",marginLeft:115},id:"model_error",className:"c-red"},"\u8BF7\u8F93\u51651-50\u4E4B\u95F4\u7684\u6574\u6570")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onCancel:ge,onOk:function(){var Jt=Object(e.a)(i.a.mark(function Wt(){var Sr,Zt,zr,sr;return i.a.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(!(pr<1||pr>50)){ve.next=4;break}return zr=document.getElementById("model_error"),zr.style.display="block",ve.abrupt("return",Promise.reject());case 4:return jr.update({cancelButtonProps:{disabled:!0}}),ve.next=7,He({type:"paperlibrary/sendToClass",payload:{course_id:Y==null?void 0:Y[0],id:(Sr=Me.actionTabs)===null||Sr===void 0||((Zt=Sr.params)===null||Zt===void 0)?void 0:Zt.id,num:pr,shixuns_info:jt.map(function(Ie){return{shixun_id:Ie.id,is_copy:Ie.is_copy,is_use:Ie.is_use}})}});case 7:sr=ve.sent,jr.update({cancelButtonProps:{disabled:!1}}),sr&&sr.status===0&&(O.a.destroyAll(),O.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:500,title:"\u63D0\u793A",content:n.a.createElement("div",{className:T.a.modalColumn},n.a.createElement("div",{style:{color:"#676A6C",display:"flex"},className:"font14 mt20 mb10"},n.a.createElement("img",{style:{marginRight:5},src:b.a}),"\u751F\u6210\u8BD5\u5377\u6210\u529F\uFF0C\u524D\u5F80\u8BFE\u5802\u53BB\u67E5\u770B\u5427\uFF01")),okText:"\u524D\u5F80\u8BFE\u5802",cancelText:"\u8FD4\u56DE\u8BD5\u5377\u5E93",onCancel:ge,onOk:function(){var Ke,it,lt=sr==null||((Ke=sr.first_category_url)===null||Ke===void 0||((it=Ke.split("/"))===null||it===void 0))?void 0:it[2];Object(C.S)("/classrooms/".concat(lt,"/exercise"))}}));case 10:case"end":return ve.stop()}},Wt)}));function nr(){return Jt.apply(this,arguments)}return nr}()});case 10:case"end":return cr.stop()}},Ot)}));return function(jt){return ut.apply(this,arguments)}}(),ke=function(){var ut=Object(e.a)(i.a.mark(function Ot(){return i.a.wrap(function(Tt){for(;;)switch(Tt.prev=Tt.next){case 0:return de(!0),Tt.next=3,se();case 3:case"end":return Tt.stop()}},Ot)}));return function(){return ut.apply(this,arguments)}}(),Qe=[{title:"\u8BFE\u5802\u540D\u79F0",dataIndex:"course_name",ellipsis:!0},{title:"\u5206\u73ED\u6570\u91CF",dataIndex:"course_group_count",width:90,ellipsis:!0},{title:"\u5B66\u5458\u4EBA\u6570",dataIndex:"course_member_count",width:90,ellipsis:!0}],nt=Object(Q.b)(),dt=Object(I.a)(nt,4),wt=dt[0],gt=dt[1],$t=dt[2],xt=dt[3];return n.a.createElement("div",null,n.a.createElement(O.a,{centered:!0,keyboard:!1,closable:!1,visible:Me.actionTabs.key==="Paperlibrary-SendToClass",title:"\u53D1\u9001\u81F3\u8BFE\u5802",maskClosable:!1,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:je["paperlibrary/sendToClass"],width:600,onOk:Ee,destroyOnClose:!0,onCancel:ge},n.a.createElement("div",{className:T.a.wrap},n.a.createElement("div",{className:T.a.title},n.a.createElement("img",{src:t.a}),"\u9009\u62E9\u7684\u8BD5\u5377\u5C06\u4F1A\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802\u5E76\u4E3A\u73ED\u7EA7\u5B66\u5458\u751F\u6210\u8003\u8BD5\u8BD5\u5377"),n.a.createElement("div",{className:"mb10"},n.a.createElement(N,{placeholder:"\u8F93\u5165\u8BFE\u5802\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:D,onChange:function(Ot){M(Ot.target.value),Ot.target.value||se(!0)},onSearch:function(Ot){M(Ot),se(),he([])}})),G.length?n.a.createElement("div",{className:T.a.radioWrap},n.a.createElement(W.a,{rowClassName:T.a.row,bordered:!1,scroll:(G==null?void 0:G.length)<=7?{}:{y:350},loading:tt,rowKey:"course_id",pagination:!1,dataSource:G,columns:Qe,onRow:function(Ot){return{onClick:function(Tt){console.log([Ot==null?void 0:Ot.course_id]),he([Ot==null?void 0:Ot.course_id])}}},rowSelection:{type:"radio",selectedRowKeys:Y,onChange:function(Ot){he(Ot),Ze(!1)}}})):!D&&!tt&&n.a.createElement(B,{createState:At,refreshLoading:ie,onRefresh:ke,onCreate:function(){pt(!1),Object(C.S)("/classrooms/new")}}),Xe&&n.a.createElement("div",{className:T.a.colorFF0000},"\u8BF7\u5148\u9009\u62E9\u8BFE\u5802"))),n.a.createElement(Q.a,{visible:wt,inPaper:!0,onOk:xe,onCancel:gt,renderData:$t,modalType:"multiple",type:"examination_bank"}))},le=Oe.a=Object(a.a)(function(Be){var Ce=Be.paperlibrary,Me=Be.loading,Le=Be.globalSetting;return{paperlibrary:Ce,globalSetting:Le,loading:Me.effects}})(ee)},"kVK+":function(ft,Oe){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Oe.read=function(K,fe,W,L,V){var U,O,q=V*8-L-1,k=(1<<q)-1,e=k>>1,I=-7,d=W?V-1:0,p=W?-1:1,A=K[fe+d];for(d+=p,U=A&(1<<-I)-1,A>>=-I,I+=q;I>0;U=U*256+K[fe+d],d+=p,I-=8);for(O=U&(1<<-I)-1,U>>=-I,I+=L;I>0;O=O*256+K[fe+d],d+=p,I-=8);if(U===0)U=1-e;else{if(U===k)return O?NaN:(A?-1:1)*Infinity;O=O+Math.pow(2,L),U=U-e}return(A?-1:1)*O*Math.pow(2,U-L)},Oe.write=function(K,fe,W,L,V,U){var O,q,k,e=U*8-V-1,I=(1<<e)-1,d=I>>1,p=V===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=L?0:U-1,s=L?1:-1,i=fe<0||fe===0&&1/fe<0?1:0;for(fe=Math.abs(fe),isNaN(fe)||fe===Infinity?(q=isNaN(fe)?1:0,O=I):(O=Math.floor(Math.log(fe)/Math.LN2),fe*(k=Math.pow(2,-O))<1&&(O--,k*=2),O+d>=1?fe+=p/k:fe+=p*Math.pow(2,1-d),fe*k>=2&&(O++,k/=2),O+d>=I?(q=0,O=I):O+d>=1?(q=(fe*k-1)*Math.pow(2,V),O=O+d):(q=fe*Math.pow(2,d-1)*Math.pow(2,V),O=0));V>=8;K[W+A]=q&255,A+=s,q/=256,V-=8);for(O=O<<V|q,e+=V;e>0;K[W+A]=O&255,A+=s,O/=256,e-=8);K[W+A-s]|=i*128}},n6Qo:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return k});var fe=K("q1tI"),W=K("biw7"),L=K("fyJ8");function V(e){var I=e.className,d=e.index,p=e.children,A=e.colSpan,s=e.rowSpan,i=fe.useContext(W.a),o=i.prefixCls,n=i.fixedInfoList,a=n[d];return fe.createElement(L.a,Object.assign({className:I,index:d,component:"td",prefixCls:o,record:null,dataIndex:null,render:function(){return{children:p,props:{colSpan:A,rowSpan:s}}}},a))}function U(e){return fe.createElement("tr",Object.assign({},e))}function O(e){var I=e.children,d=fe.useContext(W.a),p=d.prefixCls;return fe.createElement("tfoot",{className:"".concat(p,"-summary")},I)}var q=Oe.b=O,k={Cell:V,Row:U}},nEHx:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return fe});var fe;(function(W){W.DARK="dark",W.LIGHT="light",W.HIGH_CONTRAST="hc"})(fe||(fe={}))},ngQI:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return ss}),K.d(Oe,"b",function(){return fs}),K.d(Oe,"c",function(){return ms});var fe=K("q1tI"),W=K.n(fe),L=K("dI71"),V=K("wx14"),U=K("ANjH"),O=K("/MKj");function q(v,x){if(v.length!==x.length)return!1;for(var P=0;P<v.length;P++)if(v[P]!==x[P])return!1;return!0}function k(v,x){var P=Object(fe.useState)(function(){return{inputs:x,result:v()}})[0],Z=Object(fe.useRef)(!0),ce=Object(fe.useRef)(P),ue=Z.current||Boolean(x&&ce.current.inputs&&q(x,ce.current.inputs)),ye=ue?ce.current:{inputs:x,result:v()};return Object(fe.useEffect)(function(){Z.current=!1,ce.current=ye},[ye]),ye.result}function e(v,x){return k(function(){return v},x)}var I=k,d=e,p=K("9R94"),A=function(x){var P=x.top,Z=x.right,ce=x.bottom,ue=x.left,ye=Z-ue,be=ce-P,Ue={top:P,right:Z,bottom:ce,left:ue,width:ye,height:be,x:ue,y:P,center:{x:(Z+ue)/2,y:(ce+P)/2}};return Ue},s=function(x,P){return{top:x.top-P.top,left:x.left-P.left,bottom:x.bottom+P.bottom,right:x.right+P.right}},i=function(x,P){return{top:x.top+P.top,left:x.left+P.left,bottom:x.bottom-P.bottom,right:x.right-P.right}},o=function(x,P){return{top:x.top+P.y,left:x.left+P.x,bottom:x.bottom+P.y,right:x.right+P.x}},n={top:0,right:0,bottom:0,left:0},a=function(x){var P=x.borderBox,Z=x.margin,ce=Z===void 0?n:Z,ue=x.border,ye=ue===void 0?n:ue,be=x.padding,Ue=be===void 0?n:be,We=A(s(P,ce)),Ge=A(i(P,ye)),Ne=A(i(Ge,Ue));return{marginBox:We,borderBox:A(P),paddingBox:Ge,contentBox:Ne,margin:ce,border:ye,padding:Ue}},r=function(x){var P=x.slice(0,-2),Z=x.slice(-2);if(Z!=="px")return 0;var ce=Number(P);return isNaN(ce)&&Object(p.a)(!1),ce},t=function(){return{x:window.pageXOffset,y:window.pageYOffset}},y=function(x,P){var Z=x.borderBox,ce=x.border,ue=x.margin,ye=x.padding,be=o(Z,P);return a({borderBox:be,border:ce,margin:ue,padding:ye})},b=function(x,P){return P===void 0&&(P=t()),y(x,P)},E=function(x,P){var Z={top:r(P.marginTop),right:r(P.marginRight),bottom:r(P.marginBottom),left:r(P.marginLeft)},ce={top:r(P.paddingTop),right:r(P.paddingRight),bottom:r(P.paddingBottom),left:r(P.paddingLeft)},ue={top:r(P.borderTopWidth),right:r(P.borderRightWidth),bottom:r(P.borderBottomWidth),left:r(P.borderLeftWidth)};return a({borderBox:x,margin:Z,padding:ce,border:ue})},T=function(x){var P=x.getBoundingClientRect(),Z=window.getComputedStyle(x);return E(P,Z)},C=Number.isNaN||function(x){return typeof x=="number"&&x!==x};function h(v,x){return v===x?!0:!!(C(v)&&C(x))}function c(v,x){if(v.length!==x.length)return!1;for(var P=0;P<v.length;P++)if(!h(v[P],x[P]))return!1;return!0}function l(v,x){x===void 0&&(x=c);var P,Z=[],ce,ue=!1;function ye(){for(var be=[],Ue=0;Ue<arguments.length;Ue++)be[Ue]=arguments[Ue];return ue&&P===this&&x(be,Z)||(ce=v.apply(this,be),ue=!0,P=this,Z=be),ce}return ye}var u=l,_=function(x){var P=[],Z=null,ce=function(){for(var ye=arguments.length,be=new Array(ye),Ue=0;Ue<ye;Ue++)be[Ue]=arguments[Ue];if(P=be,Z)return;Z=requestAnimationFrame(function(){Z=null,x.apply(void 0,P)})};return ce.cancel=function(){if(!Z)return;cancelAnimationFrame(Z),Z=null},ce},g=_,m=K("i8i4"),F=K.n(m),H=!0,B=/[ \t]{2,}/g,Q=/^[ \t]*/gm,z=function(x){return x.replace(B," ").replace(Q,"").trim()},N=function(x){return z(`
|
|
%creact-beautiful-dnd
|
|
|
|
%c`+z(x)+`
|
|
|
|
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
|
|
`)},ee=function(x){return[N(x),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},le="__react-beautiful-dnd-disable-dev-warnings";function Be(v,x){var P;if(H)return;if(typeof window!="undefined"&&window[le])return;(P=console)[v].apply(P,ee(x))}var Ce=Be.bind(null,"warn"),Me=Be.bind(null,"error");function Le(){}function je(v,x){return Object(V.a)({},v,{},x)}function He(v,x,P){var Z=x.map(function(ce){var ue=je(P,ce.options);return v.addEventListener(ce.eventName,ce.fn,ue),function(){v.removeEventListener(ce.eventName,ce.fn,ue)}});return function(){Z.forEach(function(ue){ue()})}}var Je=!0,Se="Invariant failed";function $(v){this.message=v}$.prototype.toString=function(){return this.message};function D(v,x){if(v)return;throw Je?new $(Se):new $(Se+": "+(x||""))}var M=function(v){Object(L.a)(x,v);function x(){for(var Z,ce=arguments.length,ue=new Array(ce),ye=0;ye<ce;ye++)ue[ye]=arguments[ye];return Z=v.call.apply(v,[this].concat(ue))||this,Z.callbacks=null,Z.unbind=Le,Z.onWindowError=function(be){var Ue=Z.getCallbacks();Ue.isDragging()&&Ue.tryAbort();var We=be.error;We instanceof $&&be.preventDefault()},Z.getCallbacks=function(){if(!Z.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return Z.callbacks},Z.setCallbacks=function(be){Z.callbacks=be},Z}var P=x.prototype;return P.componentDidMount=function(){this.unbind=He(window,[{eventName:"error",fn:this.onWindowError}])},P.componentWillUnmount=function(){this.unbind()},P.componentDidCatch=function(ce){if(ce instanceof $){this.setState({});return}throw ce},P.render=function(){return this.props.children(this.setCallbacks)},x}(W.a.Component),te=`
|
|
Press space bar to start a drag.
|
|
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
`,oe=function(x){return x+1},G=function(x){return`
|
|
You have lifted an item in position `+oe(x.source.index)+`
|
|
`},re=function(x,P){var Z=x.droppableId===P.droppableId,ce=oe(x.index),ue=oe(P.index);return Z?`
|
|
You have moved the item from position `+ce+`
|
|
to position `+ue+`
|
|
`:`
|
|
You have moved the item from position `+ce+`
|
|
in list `+x.droppableId+`
|
|
to list `+P.droppableId+`
|
|
in position `+ue+`
|
|
`},j=function(x,P,Z){var ce=P.droppableId===Z.droppableId;return ce?`
|
|
The item `+x+`
|
|
has been combined with `+Z.draggableId:`
|
|
The item `+x+`
|
|
in list `+P.droppableId+`
|
|
has been combined with `+Z.draggableId+`
|
|
in list `+Z.droppableId+`
|
|
`},J=function(x){var P=x.destination;if(P)return re(x.source,P);var Z=x.combine;return Z?j(x.draggableId,x.source,Z):"You are over an area that cannot be dropped on"},Y=function(x){return`
|
|
The item has returned to its starting position
|
|
of `+oe(x.index)+`
|
|
`},he=function(x){if(x.reason==="CANCEL")return`
|
|
Movement cancelled.
|
|
`+Y(x.source)+`
|
|
`;var P=x.destination,Z=x.combine;return P?`
|
|
You have dropped the item.
|
|
`+re(x.source,P)+`
|
|
`:Z?`
|
|
You have dropped the item.
|
|
`+j(x.draggableId,x.source,Z)+`
|
|
`:`
|
|
The item has been dropped while not over a drop area.
|
|
`+Y(x.source)+`
|
|
`},we={dragHandleUsageInstructions:te,onDragStart:G,onDragUpdate:J,onDragEnd:he},Te={x:0,y:0},Xe=function(x,P){return{x:x.x+P.x,y:x.y+P.y}},Ze=function(x,P){return{x:x.x-P.x,y:x.y-P.y}},et=function(x,P){return x.x===P.x&&x.y===P.y},rt=function(x){return{x:x.x!==0?-x.x:0,y:x.y!==0?-x.y:0}},At=function(x,P,Z){var ce;return Z===void 0&&(Z=0),ce={},ce[x]=P,ce[x==="x"?"y":"x"]=Z,ce},pt=function(x,P){return Math.sqrt(Math.pow(P.x-x.x,2)+Math.pow(P.y-x.y,2))},Pe=function(x,P){return Math.min.apply(Math,P.map(function(Z){return pt(x,Z)}))},Ye=function(x){return function(P){return{x:x(P.x),y:x(P.y)}}},tt=function(v,x){var P=A({top:Math.max(x.top,v.top),right:Math.min(x.right,v.right),bottom:Math.min(x.bottom,v.bottom),left:Math.max(x.left,v.left)});return P.width<=0||P.height<=0?null:P},ot=function(x,P){return{top:x.top+P.y,left:x.left+P.x,bottom:x.bottom+P.y,right:x.right+P.x}},pe=function(x){return[{x:x.left,y:x.top},{x:x.right,y:x.top},{x:x.left,y:x.bottom},{x:x.right,y:x.bottom}]},ne={top:0,right:0,bottom:0,left:0},ie=function(x,P){return P?ot(x,P.scroll.diff.displacement):x},de=function(x,P,Z){if(Z&&Z.increasedBy){var ce;return Object(V.a)({},x,(ce={},ce[P.end]=x[P.end]+Z.increasedBy[P.line],ce))}return x},ge=function(x,P){return P&&P.shouldClipSubject?tt(P.pageMarginBox,x):A(x)},se=function(v){var x=v.page,P=v.withPlaceholder,Z=v.axis,ce=v.frame,ue=ie(x.marginBox,ce),ye=de(ue,Z,P),be=ge(ye,ce);return{page:x,withPlaceholder:P,active:be}},Ae=function(v,x){v.frame||D(!1);var P=v.frame,Z=Ze(x,P.scroll.initial),ce=rt(Z),ue=Object(V.a)({},P,{scroll:{initial:P.scroll.initial,current:x,diff:{value:Z,displacement:ce},max:P.scroll.max}}),ye=se({page:v.subject.page,withPlaceholder:v.subject.withPlaceholder,axis:v.axis,frame:ue}),be=Object(V.a)({},v,{frame:ue,subject:ye});return be};function Ee(v){return Number.isInteger?Number.isInteger(v):typeof v=="number"&&isFinite(v)&&Math.floor(v)===v}function xe(v){return Object.values?Object.values(v):Object.keys(v).map(function(x){return v[x]})}function ke(v,x){if(v.findIndex)return v.findIndex(x);for(var P=0;P<v.length;P++)if(x(v[P]))return P;return-1}function Qe(v,x){if(v.find)return v.find(x);var P=ke(v,x);return P!==-1?v[P]:void 0}function nt(v){return Array.prototype.slice.call(v)}var dt=u(function(v){return v.reduce(function(x,P){return x[P.descriptor.id]=P,x},{})}),wt=u(function(v){return v.reduce(function(x,P){return x[P.descriptor.id]=P,x},{})}),gt=u(function(v){return xe(v)}),$t=u(function(v){return xe(v)}),xt=u(function(v,x){var P=$t(x).filter(function(Z){return v===Z.descriptor.droppableId}).sort(function(Z,ce){return Z.descriptor.index-ce.descriptor.index});return P});function ut(v){return v.at&&v.at.type==="REORDER"?v.at.destination:null}function Ot(v){return v.at&&v.at.type==="COMBINE"?v.at.combine:null}var jt=u(function(v,x){return x.filter(function(P){return P.descriptor.id!==v.descriptor.id})}),Tt=function(v){var x=v.isMovingForward,P=v.draggable,Z=v.destination,ce=v.insideDestination,ue=v.previousImpact;if(!Z.isCombineEnabled)return null;var ye=ut(ue);if(!ye)return null;function be(Et){var mt={type:"COMBINE",combine:{draggableId:Et,droppableId:Z.descriptor.id}};return Object(V.a)({},ue,{at:mt})}var Ue=ue.displaced.all,We=Ue.length?Ue[0]:null;if(x)return We?be(We):null;var Ge=jt(P,ce);if(!We){if(!Ge.length)return null;var Ne=Ge[Ge.length-1];return be(Ne.descriptor.id)}var Fe=ke(Ge,function(Et){return Et.descriptor.id===We});Fe!==-1||D(!1);var Ve=Fe-1;if(Ve<0)return null;var qe=Ge[Ve];return be(qe.descriptor.id)},Yt=function(v,x){return v.descriptor.droppableId===x.descriptor.id},Qt={point:Te,value:0},Xt={invisible:{},visible:{},all:[]},or={displaced:Xt,displacedBy:Qt,at:null},It=function(v,x){return function(P){return v<=P&&P<=x}},br=function(v){var x=It(v.top,v.bottom),P=It(v.left,v.right);return function(Z){var ce=x(Z.top)&&x(Z.bottom)&&P(Z.left)&&P(Z.right);if(ce)return!0;var ue=x(Z.top)||x(Z.bottom),ye=P(Z.left)||P(Z.right),be=ue&&ye;if(be)return!0;var Ue=Z.top<v.top&&Z.bottom>v.bottom,We=Z.left<v.left&&Z.right>v.right,Ge=Ue&&We;if(Ge)return!0;var Ne=Ue&&ye||We&&ue;return Ne}},Mt=function(v){var x=It(v.top,v.bottom),P=It(v.left,v.right);return function(Z){var ce=x(Z.top)&&x(Z.bottom)&&P(Z.left)&&P(Z.right);return ce}},Pt={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},kt={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},pr=function(v){return function(x){var P=It(x.top,x.bottom),Z=It(x.left,x.right);return function(ce){return v===Pt?P(ce.top)&&P(ce.bottom):Z(ce.left)&&Z(ce.right)}}},jr=function(x,P){var Z=P.frame?P.frame.scroll.diff.displacement:Te;return ot(x,Z)},ln=function(x,P,Z){return P.subject.active?Z(P.subject.active)(x):!1},cr=function(x,P,Z){return Z(P)(x)},Jt=function(x){var P=x.target,Z=x.destination,ce=x.viewport,ue=x.withDroppableDisplacement,ye=x.isVisibleThroughFrameFn,be=ue?jr(P,Z):P;return ln(be,Z,ye)&&cr(be,ce,ye)},nr=function(x){return Jt(Object(V.a)({},x,{isVisibleThroughFrameFn:br}))},Wt=function(x){return Jt(Object(V.a)({},x,{isVisibleThroughFrameFn:Mt}))},Sr=function(x){return Jt(Object(V.a)({},x,{isVisibleThroughFrameFn:pr(x.destination.axis)}))},Zt=function(x,P,Z){if(typeof Z=="boolean")return Z;if(!P)return!0;var ce=P.invisible,ue=P.visible;if(ce[x])return!1;var ye=ue[x];return ye?ye.shouldAnimate:!0};function zr(v,x){var P=v.page.marginBox,Z={top:x.point.y,right:0,bottom:0,left:x.point.x};return A(s(P,Z))}function sr(v){var x=v.afterDragging,P=v.destination,Z=v.displacedBy,ce=v.viewport,ue=v.forceShouldAnimate,ye=v.last;return x.reduce(function(Ue,We){var Ge=zr(We,Z),Ne=We.descriptor.id;Ue.all.push(Ne);var Fe=nr({target:Ge,destination:P,viewport:ce,withDroppableDisplacement:!0});if(!Fe)return Ue.invisible[We.descriptor.id]=!0,Ue;var Ve=Zt(Ne,ye,ue),qe={draggableId:Ne,shouldAnimate:Ve};return Ue.visible[Ne]=qe,Ue},{all:[],visible:{},invisible:{}})}function me(v,x){if(!v.length)return 0;var P=v[v.length-1].descriptor.index;return x.inHomeList?P:P+1}function ve(v){var x=v.insideDestination,P=v.inHomeList,Z=v.displacedBy,ce=v.destination,ue=me(x,{inHomeList:P});return{displaced:Xt,displacedBy:Z,at:{type:"REORDER",destination:{droppableId:ce.descriptor.id,index:ue}}}}function Ie(v){var x=v.draggable,P=v.insideDestination,Z=v.destination,ce=v.viewport,ue=v.displacedBy,ye=v.last,be=v.index,Ue=v.forceShouldAnimate,We=Yt(x,Z);if(be==null)return ve({insideDestination:P,inHomeList:We,displacedBy:ue,destination:Z});var Ge=Qe(P,function(Et){return Et.descriptor.index===be});if(!Ge)return ve({insideDestination:P,inHomeList:We,displacedBy:ue,destination:Z});var Ne=jt(x,P),Fe=P.indexOf(Ge),Ve=Ne.slice(Fe),qe=sr({afterDragging:Ve,destination:Z,displacedBy:ue,last:ye,viewport:ce.frame,forceShouldAnimate:Ue});return{displaced:qe,displacedBy:ue,at:{type:"REORDER",destination:{droppableId:Z.descriptor.id,index:be}}}}function Ke(v,x){return Boolean(x.effected[v])}var it=function(v){var x=v.isMovingForward,P=v.destination,Z=v.draggables,ce=v.combine,ue=v.afterCritical;if(!P.isCombineEnabled)return null;var ye=ce.draggableId,be=Z[ye],Ue=be.descriptor.index,We=Ke(ye,ue);return We?x?Ue:Ue-1:x?Ue+1:Ue},lt=function(v){var x=v.isMovingForward,P=v.isInHomeList,Z=v.insideDestination,ce=v.location;if(!Z.length)return null;var ue=ce.index,ye=x?ue+1:ue-1,be=Z[0].descriptor.index,Ue=Z[Z.length-1].descriptor.index,We=P?Ue:Ue+1;return ye<be||ye>We?null:ye},ht=function(v){var x=v.isMovingForward,P=v.isInHomeList,Z=v.draggable,ce=v.draggables,ue=v.destination,ye=v.insideDestination,be=v.previousImpact,Ue=v.viewport,We=v.afterCritical,Ge=be.at;if(Ge||D(!1),Ge.type==="REORDER"){var Ne=lt({isMovingForward:x,isInHomeList:P,location:Ge.destination,insideDestination:ye});return Ne==null?null:Ie({draggable:Z,insideDestination:ye,destination:ue,viewport:Ue,last:be.displaced,displacedBy:be.displacedBy,index:Ne})}var Fe=it({isMovingForward:x,destination:ue,displaced:be.displaced,draggables:ce,combine:Ge.combine,afterCritical:We});return Fe==null?null:Ie({draggable:Z,insideDestination:ye,destination:ue,viewport:Ue,last:be.displaced,displacedBy:be.displacedBy,index:Fe})},vt=function(v){var x=v.displaced,P=v.afterCritical,Z=v.combineWith,ce=v.displacedBy,ue=Boolean(x.visible[Z]||x.invisible[Z]);return Ke(Z,P)?ue?Te:rt(ce.point):ue?ce.point:Te},ct=function(v){var x=v.afterCritical,P=v.impact,Z=v.draggables,ce=Ot(P);ce||D(!1);var ue=ce.draggableId,ye=Z[ue].page.borderBox.center,be=vt({displaced:P.displaced,afterCritical:x,combineWith:ue,displacedBy:P.displacedBy});return Xe(ye,be)},yt=function(x,P){return P.margin[x.start]+P.borderBox[x.size]/2},bt=function(x,P){return P.margin[x.end]+P.borderBox[x.size]/2},Ht=function(x,P,Z){return P[x.crossAxisStart]+Z.margin[x.crossAxisStart]+Z.borderBox[x.crossAxisSize]/2},qt=function(x){var P=x.axis,Z=x.moveRelativeTo,ce=x.isMoving;return At(P.line,Z.marginBox[P.end]+yt(P,ce),Ht(P,Z.marginBox,ce))},er=function(x){var P=x.axis,Z=x.moveRelativeTo,ce=x.isMoving;return At(P.line,Z.marginBox[P.start]-bt(P,ce),Ht(P,Z.marginBox,ce))},dr=function(x){var P=x.axis,Z=x.moveInto,ce=x.isMoving;return At(P.line,Z.contentBox[P.start]+yt(P,ce),Ht(P,Z.contentBox,ce))},lr=function(v){var x=v.impact,P=v.draggable,Z=v.draggables,ce=v.droppable,ue=v.afterCritical,ye=xt(ce.descriptor.id,Z),be=P.page,Ue=ce.axis;if(!ye.length)return dr({axis:Ue,moveInto:ce.page,isMoving:be});var We=x.displaced,Ge=x.displacedBy,Ne=We.all[0];if(Ne){var Fe=Z[Ne];if(Ke(Ne,ue))return er({axis:Ue,moveRelativeTo:Fe.page,isMoving:be});var Ve=y(Fe.page,Ge.point);return er({axis:Ue,moveRelativeTo:Ve,isMoving:be})}var qe=ye[ye.length-1];if(qe.descriptor.id===P.descriptor.id)return be.borderBox.center;if(Ke(qe.descriptor.id,ue)){var Et=y(qe.page,rt(ue.displacedBy.point));return qt({axis:Ue,moveRelativeTo:Et,isMoving:be})}return qt({axis:Ue,moveRelativeTo:qe.page,isMoving:be})},Ar=function(v,x){var P=v.frame;return P?Xe(x,P.scroll.diff.displacement):x},Mr=function(x){var P=x.impact,Z=x.draggable,ce=x.droppable,ue=x.draggables,ye=x.afterCritical,be=Z.page.borderBox.center,Ue=P.at;return ce&&Ue?Ue.type==="REORDER"?lr({impact:P,draggable:Z,draggables:ue,droppable:ce,afterCritical:ye}):ct({impact:P,draggables:ue,afterCritical:ye}):be},zt=function(v){var x=Mr(v),P=v.droppable,Z=P?Ar(P,x):x;return Z},ir=function(v,x){var P=Ze(x,v.scroll.initial),Z=rt(P),ce=A({top:x.y,bottom:x.y+v.frame.height,left:x.x,right:x.x+v.frame.width}),ue={frame:ce,scroll:{initial:v.scroll.initial,max:v.scroll.max,current:x,diff:{value:P,displacement:Z}}};return ue};function tr(v,x){return v.map(function(P){return x[P]})}function Ir(v,x){for(var P=0;P<x.length;P++){var Z=x[P].visible[v];if(Z)return Z}return null}var gr=function(v){var x=v.impact,P=v.viewport,Z=v.destination,ce=v.draggables,ue=v.maxScrollChange,ye=ir(P,Xe(P.scroll.current,ue)),be=Z.frame?Ae(Z,Xe(Z.frame.scroll.current,ue)):Z,Ue=x.displaced,We=sr({afterDragging:tr(Ue.all,ce),destination:Z,displacedBy:x.displacedBy,viewport:ye.frame,last:Ue,forceShouldAnimate:!1}),Ge=sr({afterDragging:tr(Ue.all,ce),destination:be,displacedBy:x.displacedBy,viewport:P.frame,last:Ue,forceShouldAnimate:!1}),Ne={},Fe={},Ve=[Ue,We,Ge];Ue.all.forEach(function(Et){var mt=Ir(Et,Ve);if(mt){Fe[Et]=mt;return}Ne[Et]=!0});var qe=Object(V.a)({},x,{displaced:{all:Ue.all,invisible:Ne,visible:Fe}});return qe},Cr=function(v,x){return Xe(v.scroll.diff.displacement,x)},Vt=function(v){var x=v.pageBorderBoxCenter,P=v.draggable,Z=v.viewport,ce=Cr(Z,x),ue=Ze(ce,P.page.borderBox.center);return Xe(P.client.borderBox.center,ue)},Qr=function(v){var x=v.draggable,P=v.destination,Z=v.newPageBorderBoxCenter,ce=v.viewport,ue=v.withDroppableDisplacement,ye=v.onlyOnMainAxis,be=ye===void 0?!1:ye,Ue=Ze(Z,x.page.borderBox.center),We=ot(x.page.borderBox,Ue),Ge={target:We,destination:P,withDroppableDisplacement:ue,viewport:ce};return be?Sr(Ge):Wt(Ge)},Pr=function(v){var x=v.isMovingForward,P=v.draggable,Z=v.destination,ce=v.draggables,ue=v.previousImpact,ye=v.viewport,be=v.previousPageBorderBoxCenter,Ue=v.previousClientSelection,We=v.afterCritical;if(!Z.isEnabled)return null;var Ge=xt(Z.descriptor.id,ce),Ne=Yt(P,Z),Fe=Tt({isMovingForward:x,draggable:P,destination:Z,insideDestination:Ge,previousImpact:ue})||ht({isMovingForward:x,isInHomeList:Ne,draggable:P,draggables:ce,destination:Z,insideDestination:Ge,previousImpact:ue,viewport:ye,afterCritical:We});if(!Fe)return null;var Ve=zt({impact:Fe,draggable:P,droppable:Z,draggables:ce,afterCritical:We}),qe=Qr({draggable:P,destination:Z,newPageBorderBoxCenter:Ve,viewport:ye.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(qe){var Et=Vt({pageBorderBoxCenter:Ve,draggable:P,viewport:ye});return{clientSelection:Et,impact:Fe,scrollJumpRequest:null}}var mt=Ze(Ve,be),Ct=gr({impact:Fe,viewport:ye,destination:Z,draggables:ce,maxScrollChange:mt});return{clientSelection:Ue,impact:Ct,scrollJumpRequest:mt}},Er=function(x){var P=x.subject.active;return P||D(!1),P},kr=function(v){var x=v.isMovingForward,P=v.pageBorderBoxCenter,Z=v.source,ce=v.droppables,ue=v.viewport,ye=Z.subject.active;if(!ye)return null;var be=Z.axis,Ue=It(ye[be.start],ye[be.end]),We=gt(ce).filter(function(Ne){return Ne!==Z}).filter(function(Ne){return Ne.isEnabled}).filter(function(Ne){return Boolean(Ne.subject.active)}).filter(function(Ne){return br(ue.frame)(Er(Ne))}).filter(function(Ne){var Fe=Er(Ne);return x?ye[be.crossAxisEnd]<Fe[be.crossAxisEnd]:Fe[be.crossAxisStart]<ye[be.crossAxisStart]}).filter(function(Ne){var Fe=Er(Ne),Ve=It(Fe[be.start],Fe[be.end]);return Ue(Fe[be.start])||Ue(Fe[be.end])||Ve(ye[be.start])||Ve(ye[be.end])}).sort(function(Ne,Fe){var Ve=Er(Ne)[be.crossAxisStart],qe=Er(Fe)[be.crossAxisStart];return x?Ve-qe:qe-Ve}).filter(function(Ne,Fe,Ve){return Er(Ne)[be.crossAxisStart]===Er(Ve[0])[be.crossAxisStart]});if(!We.length)return null;if(We.length===1)return We[0];var Ge=We.filter(function(Ne){var Fe=It(Er(Ne)[be.start],Er(Ne)[be.end]);return Fe(P[be.line])});return Ge.length===1?Ge[0]:Ge.length>1?Ge.sort(function(Ne,Fe){return Er(Ne)[be.start]-Er(Fe)[be.start]})[0]:We.sort(function(Ne,Fe){var Ve=Pe(P,pe(Er(Ne))),qe=Pe(P,pe(Er(Fe)));return Ve!==qe?Ve-qe:Er(Ne)[be.start]-Er(Fe)[be.start]})[0]},$r=function(x,P){var Z=x.page.borderBox.center;return Ke(x.descriptor.id,P)?Ze(Z,P.displacedBy.point):Z},Xr=function(x,P){var Z=x.page.borderBox;return Ke(x.descriptor.id,P)?ot(Z,rt(P.displacedBy.point)):Z},Gr=function(v){var x=v.pageBorderBoxCenter,P=v.viewport,Z=v.destination,ce=v.insideDestination,ue=v.afterCritical,ye=ce.filter(function(be){return Wt({target:Xr(be,ue),destination:Z,viewport:P.frame,withDroppableDisplacement:!0})}).sort(function(be,Ue){var We=pt(x,Ar(Z,$r(be,ue))),Ge=pt(x,Ar(Z,$r(Ue,ue)));return We<Ge?-1:Ge<We?1:be.descriptor.index-Ue.descriptor.index});return ye[0]||null},Or=u(function(x,P){var Z=P[x.line];return{value:Z,point:At(x.line,Z)}}),Wr=function(x,P,Z){var ce=x.axis;if(x.descriptor.mode==="virtual")return At(ce.line,P[ce.line]);var ue=x.subject.page.contentBox[ce.size],ye=xt(x.descriptor.id,Z),be=ye.reduce(function(Ge,Ne){return Ge+Ne.client.marginBox[ce.size]},0),Ue=be+P[ce.line],We=Ue-ue;return We<=0?null:At(ce.line,We)},en=function(x,P){return Object(V.a)({},x,{scroll:Object(V.a)({},x.scroll,{max:P})})},un=function(x,P,Z){var ce=x.frame;Yt(P,x)&&D(!1),x.subject.withPlaceholder&&D(!1);var ue=Or(x.axis,P.displaceBy).point,ye=Wr(x,ue,Z),be={placeholderSize:ue,increasedBy:ye,oldFrameMaxScroll:x.frame?x.frame.scroll.max:null};if(!ce){var Ue=se({page:x.subject.page,withPlaceholder:be,axis:x.axis,frame:x.frame});return Object(V.a)({},x,{subject:Ue})}var We=ye?Xe(ce.scroll.max,ye):ce.scroll.max,Ge=en(ce,We),Ne=se({page:x.subject.page,withPlaceholder:be,axis:x.axis,frame:Ge});return Object(V.a)({},x,{subject:Ne,frame:Ge})},cn=function(x){var P=x.subject.withPlaceholder;P||D(!1);var Z=x.frame;if(!Z){var ce=se({page:x.subject.page,axis:x.axis,frame:null,withPlaceholder:null});return Object(V.a)({},x,{subject:ce})}var ue=P.oldFrameMaxScroll;ue||D(!1);var ye=en(Z,ue),be=se({page:x.subject.page,axis:x.axis,frame:ye,withPlaceholder:null});return Object(V.a)({},x,{subject:be,frame:ye})},tn=function(v){var x=v.previousPageBorderBoxCenter,P=v.moveRelativeTo,Z=v.insideDestination,ce=v.draggable,ue=v.draggables,ye=v.destination,be=v.viewport,Ue=v.afterCritical;if(!P){if(Z.length)return null;var We={displaced:Xt,displacedBy:Qt,at:{type:"REORDER",destination:{droppableId:ye.descriptor.id,index:0}}},Ge=zt({impact:We,draggable:ce,droppable:ye,draggables:ue,afterCritical:Ue}),Ne=Yt(ce,ye)?ye:un(ye,ce,ue),Fe=Qr({draggable:ce,destination:Ne,newPageBorderBoxCenter:Ge,viewport:be.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return Fe?We:null}var Ve=Boolean(x[ye.axis.line]<=P.page.borderBox.center[ye.axis.line]),qe=function(){var mt=P.descriptor.index;return P.descriptor.id===ce.descriptor.id||Ve?mt:mt+1}(),Et=Or(ye.axis,ce.displaceBy);return Ie({draggable:ce,insideDestination:Z,destination:ye,viewport:be,displacedBy:Et,last:Xt,index:qe})},Fr=function(v){var x=v.isMovingForward,P=v.previousPageBorderBoxCenter,Z=v.draggable,ce=v.isOver,ue=v.draggables,ye=v.droppables,be=v.viewport,Ue=v.afterCritical,We=kr({isMovingForward:x,pageBorderBoxCenter:P,source:ce,droppables:ye,viewport:be});if(!We)return null;var Ge=xt(We.descriptor.id,ue),Ne=Gr({pageBorderBoxCenter:P,viewport:be,destination:We,insideDestination:Ge,afterCritical:Ue}),Fe=tn({previousPageBorderBoxCenter:P,destination:We,draggable:Z,draggables:ue,moveRelativeTo:Ne,insideDestination:Ge,viewport:be,afterCritical:Ue});if(!Fe)return null;var Ve=zt({impact:Fe,draggable:Z,droppable:We,draggables:ue,afterCritical:Ue}),qe=Vt({pageBorderBoxCenter:Ve,draggable:Z,viewport:be});return{clientSelection:qe,impact:Fe,scrollJumpRequest:null}},mr=function(v){var x=v.at;return x?x.type==="REORDER"?x.destination.droppableId:x.combine.droppableId:null},Nr=function(x,P){var Z=mr(x);return Z?P[Z]:null},Hr=function(v){var x=v.state,P=v.type,Z=Nr(x.impact,x.dimensions.droppables),ce=Boolean(Z),ue=x.dimensions.droppables[x.critical.droppable.id],ye=Z||ue,be=ye.axis.direction,Ue=be==="vertical"&&(P==="MOVE_UP"||P==="MOVE_DOWN")||be==="horizontal"&&(P==="MOVE_LEFT"||P==="MOVE_RIGHT");if(Ue&&!ce)return null;var We=P==="MOVE_DOWN"||P==="MOVE_RIGHT",Ge=x.dimensions.draggables[x.critical.draggable.id],Ne=x.current.page.borderBoxCenter,Fe=x.dimensions,Ve=Fe.draggables,qe=Fe.droppables;return Ue?Pr({isMovingForward:We,previousPageBorderBoxCenter:Ne,draggable:Ge,destination:ye,draggables:Ve,viewport:x.viewport,previousClientSelection:x.current.client.selection,previousImpact:x.impact,afterCritical:x.afterCritical}):Fr({isMovingForward:We,previousPageBorderBoxCenter:Ne,draggable:Ge,isOver:ye,draggables:Ve,droppables:qe,viewport:x.viewport,afterCritical:x.afterCritical})};function dn(v){return v.phase==="DRAGGING"||v.phase==="COLLECTING"}function vn(v){var x=It(v.top,v.bottom),P=It(v.left,v.right);return function(ce){return x(ce.y)&&P(ce.x)}}function fn(v,x){return v.left<x.right&&v.right>x.left&&v.top<x.bottom&&v.bottom>x.top}function si(v){var x=v.pageBorderBox,P=v.draggable,Z=v.candidates,ce=P.page.borderBox.center,ue=Z.map(function(ye){var be=ye.axis,Ue=At(ye.axis.line,x.center[be.line],ye.page.borderBox.center[be.crossAxisLine]);return{id:ye.descriptor.id,distance:pt(ce,Ue)}}).sort(function(ye,be){return be.distance-ye.distance});return ue[0]?ue[0].id:null}function Jn(v){var x=v.pageBorderBox,P=v.draggable,Z=v.droppables,ce=gt(Z).filter(function(ue){if(!ue.isEnabled)return!1;var ye=ue.subject.active;if(!ye)return!1;if(!fn(x,ye))return!1;if(vn(ye)(x.center))return!0;var be=ue.axis,Ue=ye.center[be.crossAxisLine],We=x[be.crossAxisStart],Ge=x[be.crossAxisEnd],Ne=It(ye[be.crossAxisStart],ye[be.crossAxisEnd]),Fe=Ne(We),Ve=Ne(Ge);return!Fe&&!Ve?!0:Fe?We<Ue:Ge>Ue});return ce.length?ce.length===1?ce[0].descriptor.id:si({pageBorderBox:x,draggable:P,candidates:ce}):null}var Pn=function(x,P){return A(ot(x,P))},kn=function(v,x){var P=v.frame;return P?Pn(x,P.scroll.diff.value):x};function $n(v){var x=v.displaced,P=v.id;return Boolean(x.visible[P]||x.invisible[P])}function Kr(v){var x=v.draggable,P=v.closest,Z=v.inHomeList;return P?Z&&P.descriptor.index>x.descriptor.index?P.descriptor.index-1:P.descriptor.index:null}var Zi=function(v){var x=v.pageBorderBoxWithDroppableScroll,P=v.draggable,Z=v.destination,ce=v.insideDestination,ue=v.last,ye=v.viewport,be=v.afterCritical,Ue=Z.axis,We=Or(Z.axis,P.displaceBy),Ge=We.value,Ne=x[Ue.start],Fe=x[Ue.end],Ve=jt(P,ce),qe=Qe(Ve,function(mt){var Ct=mt.descriptor.id,Bt=mt.page.borderBox.center[Ue.line],Kt=Ke(Ct,be),Gt=$n({displaced:ue,id:Ct});return Kt?Gt?Fe<=Bt:Ne<Bt-Ge:Gt?Fe<=Bt+Ge:Ne<Bt}),Et=Kr({draggable:P,closest:qe,inHomeList:Yt(P,Z)});return Ie({draggable:P,insideDestination:ce,destination:Z,viewport:ye,last:ue,displacedBy:We,index:Et})},Hn=4,qi=function(v){var x=v.draggable,P=v.pageBorderBoxWithDroppableScroll,Z=v.previousImpact,ce=v.destination,ue=v.insideDestination,ye=v.afterCritical;if(!ce.isCombineEnabled)return null;var be=ce.axis,Ue=Or(ce.axis,x.displaceBy),We=Ue.value,Ge=P[be.start],Ne=P[be.end],Fe=jt(x,ue),Ve=Qe(Fe,function(Et){var mt=Et.descriptor.id,Ct=Et.page.borderBox,Bt=Ct[be.size],Kt=Bt/Hn,Gt=Ke(mt,ye),hr=$n({displaced:Z.displaced,id:mt});return Gt?hr?Ne>Ct[be.start]+Kt&&Ne<Ct[be.end]-Kt:Ge>Ct[be.start]-We+Kt&&Ge<Ct[be.end]-We-Kt:hr?Ne>Ct[be.start]+We+Kt&&Ne<Ct[be.end]+We-Kt:Ge>Ct[be.start]+Kt&&Ge<Ct[be.end]-Kt});if(!Ve)return null;var qe={displacedBy:Ue,displaced:Z.displaced,at:{type:"COMBINE",combine:{draggableId:Ve.descriptor.id,droppableId:ce.descriptor.id}}};return qe},ea=function(v){var x=v.pageOffset,P=v.draggable,Z=v.draggables,ce=v.droppables,ue=v.previousImpact,ye=v.viewport,be=v.afterCritical,Ue=Pn(P.page.borderBox,x),We=Jn({pageBorderBox:Ue,draggable:P,droppables:ce});if(!We)return or;var Ge=ce[We],Ne=xt(Ge.descriptor.id,Z),Fe=kn(Ge,Ue);return qi({pageBorderBoxWithDroppableScroll:Fe,draggable:P,previousImpact:ue,destination:Ge,insideDestination:Ne,afterCritical:be})||Zi({pageBorderBoxWithDroppableScroll:Fe,draggable:P,destination:Ge,insideDestination:Ne,last:ue.displaced,viewport:ye,afterCritical:be})},oi=function(v,x){var P;return Object(V.a)({},v,(P={},P[x.descriptor.id]=x,P))},wi=function(x){var P=x.previousImpact,Z=x.impact,ce=x.droppables,ue=mr(P),ye=mr(Z);if(!ue)return ce;if(ue===ye)return ce;var be=ce[ue];if(!be.subject.withPlaceholder)return ce;var Ue=cn(be);return oi(ce,Ue)},xn=function(v){var x=v.draggable,P=v.draggables,Z=v.droppables,ce=v.previousImpact,ue=v.impact,ye=wi({previousImpact:ce,impact:ue,droppables:Z}),be=mr(ue);if(!be)return ye;var Ue=Z[be];if(Yt(x,Ue))return ye;if(Ue.subject.withPlaceholder)return ye;var We=un(Ue,x,P);return oi(ye,We)},Cn=function(v){var x=v.state,P=v.clientSelection,Z=v.dimensions,ce=v.viewport,ue=v.impact,ye=v.scrollJumpRequest,be=ce||x.viewport,Ue=Z||x.dimensions,We=P||x.current.client.selection,Ge=Ze(We,x.initial.client.selection),Ne={offset:Ge,selection:We,borderBoxCenter:Xe(x.initial.client.borderBoxCenter,Ge)},Fe={selection:Xe(Ne.selection,be.scroll.current),borderBoxCenter:Xe(Ne.borderBoxCenter,be.scroll.current),offset:Xe(Ne.offset,be.scroll.diff.value)},Ve={client:Ne,page:Fe};if(x.phase==="COLLECTING")return Object(V.a)({phase:"COLLECTING"},x,{dimensions:Ue,viewport:be,current:Ve});var qe=Ue.draggables[x.critical.draggable.id],Et=ue||ea({pageOffset:Fe.offset,draggable:qe,draggables:Ue.draggables,droppables:Ue.droppables,previousImpact:x.impact,viewport:be,afterCritical:x.afterCritical}),mt=xn({draggable:qe,impact:Et,previousImpact:x.impact,draggables:Ue.draggables,droppables:Ue.droppables}),Ct=Object(V.a)({},x,{current:Ve,dimensions:{draggables:Ue.draggables,droppables:mt},impact:Et,viewport:be,scrollJumpRequest:ye||null,forceShouldAnimate:ye?!1:null});return Ct};function ta(v,x){return v.map(function(P){return x[P]})}var Ci=function(v){var x=v.impact,P=v.viewport,Z=v.draggables,ce=v.destination,ue=v.forceShouldAnimate,ye=x.displaced,be=ta(ye.all,Z),Ue=sr({afterDragging:be,destination:ce,displacedBy:x.displacedBy,viewport:P.frame,forceShouldAnimate:ue,last:ye});return Object(V.a)({},x,{displaced:Ue})},pn=function(v){var x=v.impact,P=v.draggable,Z=v.droppable,ce=v.draggables,ue=v.viewport,ye=v.afterCritical,be=zt({impact:x,draggable:P,draggables:ce,droppable:Z,afterCritical:ye});return Vt({pageBorderBoxCenter:be,draggable:P,viewport:ue})},Ln=function(v){var x=v.state,P=v.dimensions,Z=v.viewport;x.movementMode==="SNAP"||D(!1);var ce=x.impact,ue=Z||x.viewport,ye=P||x.dimensions,be=ye.draggables,Ue=ye.droppables,We=be[x.critical.draggable.id],Ge=mr(ce);Ge||D(!1);var Ne=Ue[Ge],Fe=Ci({impact:ce,viewport:ue,destination:Ne,draggables:be}),Ve=pn({impact:Fe,draggable:We,droppable:Ne,draggables:be,viewport:ue,afterCritical:x.afterCritical});return Cn({impact:Fe,clientSelection:Ve,state:x,dimensions:ye,viewport:ue})},Zn=function(v){return{index:v.index,droppableId:v.droppableId}},ra=function(v){var x=v.draggable,P=v.home,Z=v.draggables,ce=v.viewport,ue=Or(P.axis,x.displaceBy),ye=xt(P.descriptor.id,Z),be=ye.indexOf(x);be!==-1||D(!1);var Ue=ye.slice(be+1),We=Ue.reduce(function(Ve,qe){return Ve[qe.descriptor.id]=!0,Ve},{}),Ge={inVirtualList:P.descriptor.mode==="virtual",displacedBy:ue,effected:We},Ne=sr({afterDragging:Ue,destination:P,displacedBy:ue,last:null,viewport:ce.frame,forceShouldAnimate:!1}),Fe={displaced:Ne,displacedBy:ue,at:{type:"REORDER",destination:Zn(x.descriptor)}};return{impact:Fe,afterCritical:Ge}},na=function(v,x){return{draggables:v.draggables,droppables:oi(v.droppables,x)}},Qn=function(x){},Kn=function(x){},ia=function(v){var x=v.draggable,P=v.offset,Z=v.initialWindowScroll,ce=y(x.client,P),ue=b(ce,Z),ye=Object(V.a)({},x,{placeholder:Object(V.a)({},x.placeholder,{client:ce}),client:ce,page:ue});return ye},Ti=function(v){var x=v.frame;return x||D(!1),x},Fa=function(v){var x=v.additions,P=v.updatedDroppables,Z=v.viewport,ce=Z.scroll.diff.value;return x.map(function(ue){var ye=ue.descriptor.droppableId,be=P[ye],Ue=Ti(be),We=Ue.scroll.diff.value,Ge=Xe(ce,We),Ne=ia({draggable:ue,offset:Ge,initialWindowScroll:Z.scroll.initial});return Ne})},xi=function(v){var x=v.state,P=v.published;Qn();var Z=P.modified.map(function(Kt){var Gt=x.dimensions.droppables[Kt.droppableId],hr=Ae(Gt,Kt.scroll);return hr}),ce=Object(V.a)({},x.dimensions.droppables,{},dt(Z)),ue=wt(Fa({additions:P.additions,updatedDroppables:ce,viewport:x.viewport})),ye=Object(V.a)({},x.dimensions.draggables,{},ue);P.removals.forEach(function(Kt){delete ye[Kt]});var be={droppables:ce,draggables:ye},Ue=mr(x.impact),We=Ue?be.droppables[Ue]:null,Ge=be.draggables[x.critical.draggable.id],Ne=be.droppables[x.critical.droppable.id],Fe=ra({draggable:Ge,home:Ne,draggables:ye,viewport:x.viewport}),Ve=Fe.impact,qe=Fe.afterCritical,Et=We&&We.isCombineEnabled?x.impact:Ve,mt=ea({pageOffset:x.current.page.offset,draggable:be.draggables[x.critical.draggable.id],draggables:be.draggables,droppables:be.droppables,previousImpact:Et,viewport:x.viewport,afterCritical:qe});Kn();var Ct=Object(V.a)({phase:"DRAGGING"},x,{phase:"DRAGGING",impact:mt,onLiftImpact:Ve,dimensions:be,afterCritical:qe,forceShouldAnimate:!1});if(x.phase==="COLLECTING")return Ct;var Bt=Object(V.a)({phase:"DROP_PENDING"},Ct,{phase:"DROP_PENDING",reason:x.reason,isWaiting:!1});return Bt},Bi=function(x){return x.movementMode==="SNAP"},Si=function(x,P,Z){var ce=na(x.dimensions,P);return!Bi(x)||Z?Cn({state:x,dimensions:ce}):Ln({state:x,dimensions:ce})};function Ii(v){return v.isDragging&&v.movementMode==="SNAP"?Object(V.a)({phase:"DRAGGING"},v,{scrollJumpRequest:null}):v}var yr={phase:"IDLE",completed:null,shouldFlush:!1},vr=function(v,x){if(v===void 0&&(v=yr),x.type==="FLUSH")return Object(V.a)({},yr,{shouldFlush:!0});if(x.type==="INITIAL_PUBLISH"){v.phase==="IDLE"||D(!1);var P=x.payload,Z=P.critical,ce=P.clientSelection,ue=P.viewport,ye=P.dimensions,be=P.movementMode,Ue=ye.draggables[Z.draggable.id],We=ye.droppables[Z.droppable.id],Ge={selection:ce,borderBoxCenter:Ue.client.borderBox.center,offset:Te},Ne={client:Ge,page:{selection:Xe(Ge.selection,ue.scroll.initial),borderBoxCenter:Xe(Ge.selection,ue.scroll.initial),offset:Xe(Ge.selection,ue.scroll.diff.value)}},Fe=gt(ye.droppables).every(function(No){return!No.isFixedOnPage}),Ve=ra({draggable:Ue,home:We,draggables:ye.draggables,viewport:ue}),qe=Ve.impact,Et=Ve.afterCritical,mt={phase:"DRAGGING",isDragging:!0,critical:Z,movementMode:be,dimensions:ye,initial:Ne,current:Ne,isWindowScrollAllowed:Fe,impact:qe,afterCritical:Et,onLiftImpact:qe,viewport:ue,scrollJumpRequest:null,forceShouldAnimate:null};return mt}if(x.type==="COLLECTION_STARTING"){if(v.phase==="COLLECTING"||v.phase==="DROP_PENDING")return v;v.phase==="DRAGGING"||D(!1);var Ct=Object(V.a)({phase:"COLLECTING"},v,{phase:"COLLECTING"});return Ct}if(x.type==="PUBLISH_WHILE_DRAGGING")return v.phase==="COLLECTING"||v.phase==="DROP_PENDING"||D(!1),xi({state:v,published:x.payload});if(x.type==="MOVE"){if(v.phase==="DROP_PENDING")return v;dn(v)||D(!1);var Bt=x.payload.client;return et(Bt,v.current.client.selection)?v:Cn({state:v,clientSelection:Bt,impact:Bi(v)?v.impact:null})}if(x.type==="UPDATE_DROPPABLE_SCROLL"){if(v.phase==="DROP_PENDING")return Ii(v);if(v.phase==="COLLECTING")return Ii(v);dn(v)||D(!1);var Kt=x.payload,Gt=Kt.id,hr=Kt.newScroll,ar=v.dimensions.droppables[Gt];if(!ar)return v;var Lr=Ae(ar,hr);return Si(v,Lr,!1)}if(x.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(v.phase==="DROP_PENDING")return v;dn(v)||D(!1);var an=x.payload,_r=an.id,Jr=an.isEnabled,on=v.dimensions.droppables[_r];on||D(!1),on.isEnabled!==Jr||D(!1);var mn=Object(V.a)({},on,{isEnabled:Jr});return Si(v,mn,!0)}if(x.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(v.phase==="DROP_PENDING")return v;dn(v)||D(!1);var ni=x.payload,Mn=ni.id,vi=ni.isCombineEnabled,zi=v.dimensions.droppables[Mn];zi||D(!1),zi.isCombineEnabled!==vi||D(!1);var LA=Object(V.a)({},zi,{isCombineEnabled:vi});return Si(v,LA,!0)}if(x.type==="MOVE_BY_WINDOW_SCROLL"){if(v.phase==="DROP_PENDING"||v.phase==="DROP_ANIMATING")return v;dn(v)||D(!1),v.isWindowScrollAllowed||D(!1);var Lo=x.payload.newScroll;if(et(v.viewport.scroll.current,Lo))return Ii(v);var Uo=ir(v.viewport,Lo);return Bi(v)?Ln({state:v,viewport:Uo}):Cn({state:v,viewport:Uo})}if(x.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!dn(v))return v;var Ia=x.payload.maxScroll;if(et(Ia,v.viewport.scroll.max))return v;var UA=Object(V.a)({},v.viewport,{scroll:Object(V.a)({},v.viewport.scroll,{max:Ia})});return Object(V.a)({phase:"DRAGGING"},v,{viewport:UA})}if(x.type==="MOVE_UP"||x.type==="MOVE_DOWN"||x.type==="MOVE_LEFT"||x.type==="MOVE_RIGHT"){if(v.phase==="COLLECTING"||v.phase==="DROP_PENDING")return v;v.phase==="DRAGGING"||D(!1);var Oa=Hr({state:v,type:x.type});return Oa?Cn({state:v,impact:Oa.impact,clientSelection:Oa.clientSelection,scrollJumpRequest:Oa.scrollJumpRequest}):v}if(x.type==="DROP_PENDING"){var FA=x.payload.reason;v.phase==="COLLECTING"||D(!1);var NA=Object(V.a)({phase:"DROP_PENDING"},v,{phase:"DROP_PENDING",isWaiting:!0,reason:FA});return NA}if(x.type==="DROP_ANIMATE"){var vs=x.payload,ys=vs.completed,bs=vs.dropDuration,Fo=vs.newHomeClientOffset;v.phase==="DRAGGING"||v.phase==="DROP_PENDING"||D(!1);var MA={phase:"DROP_ANIMATING",completed:ys,dropDuration:bs,newHomeClientOffset:Fo,dimensions:v.dimensions};return MA}if(x.type==="DROP_COMPLETE"){var PA=x.payload.completed;return{phase:"IDLE",completed:PA,shouldFlush:!1}}return v},Zr=function(x){return{type:"BEFORE_INITIAL_CAPTURE",payload:x}},gn=function(x){return{type:"LIFT",payload:x}},qn=function(x){return{type:"INITIAL_PUBLISH",payload:x}},aa=function(x){return{type:"PUBLISH_WHILE_DRAGGING",payload:x}},Oi=function(){return{type:"COLLECTION_STARTING",payload:null}},Na=function(x){return{type:"UPDATE_DROPPABLE_SCROLL",payload:x}},Ma=function(x){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:x}},Wo=function(x){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:x}},sa=function(x){return{type:"MOVE",payload:x}},_s=function(x){return{type:"MOVE_BY_WINDOW_SCROLL",payload:x}},ws=function(x){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:x}},Ri=function(){return{type:"MOVE_UP",payload:null}},li=function(){return{type:"MOVE_DOWN",payload:null}},Rr=function(){return{type:"MOVE_RIGHT",payload:null}},Go=function(){return{type:"MOVE_LEFT",payload:null}},Di=function(){return{type:"FLUSH",payload:null}},Cs=function(x){return{type:"DROP_ANIMATE",payload:x}},jn=function(x){return{type:"DROP_COMPLETE",payload:x}},Bn=function(x){return{type:"DROP",payload:x}},Vo=function(x){return{type:"DROP_PENDING",payload:x}},Un=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function qr(v){if(v.length<=1)return;for(var x=v.map(function(be){return be.descriptor.index}),P={},Z=1;Z<x.length;Z++){var ce=x[Z],ue=x[Z-1];ce!==ue+1&&(P[ce]=!0)}if(!Object.keys(P).length)return;var ye=x.map(function(be){var Ue=Boolean(P[be]);return Ue?"[\u{1F525}"+be+"]":""+be}).join(", ")}function Ts(v,x){if(!1)var P}var sn=function(v){return function(x){var P=x.getState,Z=x.dispatch;return function(ce){return function(ue){if(ue.type!=="LIFT"){ce(ue);return}var ye=ue.payload,be=ye.id,Ue=ye.clientSelection,We=ye.movementMode,Ge=P();Ge.phase==="DROP_ANIMATING"&&Z(jn({completed:Ge.completed})),P().phase==="IDLE"||D(!1),Z(Di()),Z(Zr({draggableId:be,movementMode:We}));var Ne={shouldPublishImmediately:We==="SNAP"},Fe={draggableId:be,scrollOptions:Ne},Ve=v.startPublishing(Fe),qe=Ve.critical,Et=Ve.dimensions,mt=Ve.viewport;Ts(qe,Et),Z(qn({critical:qe,dimensions:Et,clientSelection:Ue,movementMode:We,viewport:mt}))}}}},Pa=function(v){return function(){return function(x){return function(P){P.type==="INITIAL_PUBLISH"&&v.dragging(),P.type==="DROP_ANIMATE"&&v.dropping(P.payload.completed.result.reason),(P.type==="FLUSH"||P.type==="DROP_COMPLETE")&&v.resting(),x(P)}}}},In={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Fn={opacity:{drop:0,combining:.7},scale:{drop:.75}},Dr={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Wn=Dr.outOfTheWay+"s "+In.outOfTheWay,Ai={fluid:"opacity "+Wn,snap:"transform "+Wn+", opacity "+Wn,drop:function(x){var P=x+"s "+In.drop;return"transform "+P+", opacity "+P},outOfTheWay:"transform "+Wn,placeholder:"height "+Wn+", width "+Wn+", margin "+Wn},ka=function(x){return et(x,Te)?null:"translate("+x.x+"px, "+x.y+"px)"},oa={moveTo:ka,drop:function(x,P){var Z=ka(x);return Z?P?Z+" scale("+Fn.scale.drop+")":Z:null}},ui=Dr.minDropTime,Ha=Dr.maxDropTime,xs=Ha-ui,yn=1500,Gn=.6,Vn=function(v){var x=v.current,P=v.destination,Z=v.reason,ce=pt(x,P);if(ce<=0)return ui;if(ce>=yn)return Ha;var ue=ce/yn,ye=ui+xs*ue,be=Z==="CANCEL"?ye*Gn:ye;return Number(be.toFixed(2))},rn=function(v){var x=v.impact,P=v.draggable,Z=v.dimensions,ce=v.viewport,ue=v.afterCritical,ye=Z.draggables,be=Z.droppables,Ue=mr(x),We=Ue?be[Ue]:null,Ge=be[P.descriptor.droppableId],Ne=pn({impact:x,draggable:P,draggables:ye,afterCritical:ue,droppable:We||Ge,viewport:ce}),Fe=Ze(Ne,P.client.borderBox.center);return Fe},zn=function(v){var x=v.draggables,P=v.reason,Z=v.lastImpact,ce=v.home,ue=v.viewport,ye=v.onLiftImpact;if(!Z.at||P!=="DROP"){var be=Ci({draggables:x,impact:ye,destination:ce,viewport:ue,forceShouldAnimate:!0});return{impact:be,didDropInsideDroppable:!1}}if(Z.at.type==="REORDER")return{impact:Z,didDropInsideDroppable:!0};var Ue=Object(V.a)({},Z,{displaced:Xt});return{impact:Ue,didDropInsideDroppable:!0}},Bs=function(v){var x=v.getState,P=v.dispatch;return function(Z){return function(ce){if(ce.type!=="DROP"){Z(ce);return}var ue=x(),ye=ce.payload.reason;if(ue.phase==="COLLECTING"){P(Vo({reason:ye}));return}if(ue.phase==="IDLE")return;var be=ue.phase==="DROP_PENDING"&&ue.isWaiting;be&&D(!1),ue.phase==="DRAGGING"||ue.phase==="DROP_PENDING"||D(!1);var Ue=ue.critical,We=ue.dimensions,Ge=We.draggables[ue.critical.draggable.id],Ne=zn({reason:ye,lastImpact:ue.impact,afterCritical:ue.afterCritical,onLiftImpact:ue.onLiftImpact,home:ue.dimensions.droppables[ue.critical.droppable.id],viewport:ue.viewport,draggables:ue.dimensions.draggables}),Fe=Ne.impact,Ve=Ne.didDropInsideDroppable,qe=Ve?ut(Fe):null,Et=Ve?Ot(Fe):null,mt={index:Ue.draggable.index,droppableId:Ue.droppable.id},Ct={draggableId:Ge.descriptor.id,type:Ge.descriptor.type,source:mt,reason:ye,mode:ue.movementMode,destination:qe,combine:Et},Bt=rn({impact:Fe,draggable:Ge,dimensions:We,viewport:ue.viewport,afterCritical:ue.afterCritical}),Kt={critical:ue.critical,afterCritical:ue.afterCritical,result:Ct,impact:Fe},Gt=!et(ue.current.client.offset,Bt)||Boolean(Ct.combine);if(!Gt){P(jn({completed:Kt}));return}var hr=Vn({current:ue.current.client.offset,destination:Bt,reason:ye}),ar={newHomeClientOffset:Bt,dropDuration:hr,completed:Kt};P(Cs(ar))}}},Qa=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Ka(v){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(P){if(P.target!==window&&P.target!==window.document)return;v()}}}function Ss(v){var x=v.onWindowScroll;function P(){x(Qa())}var Z=g(P),ce=Ka(Z),ue=Le;function ye(){return ue!==Le}function be(){ye()&&D(!1),ue=He(window,[ce])}function Ue(){ye()||D(!1),Z.cancel(),ue(),ue=Le}return{start:be,stop:Ue,isActive:ye}}var zo=function(x){return x.type==="DROP_COMPLETE"||x.type==="DROP_ANIMATE"||x.type==="FLUSH"},Li=function(v){var x=Ss({onWindowScroll:function(Z){v.dispatch(_s({newScroll:Z}))}});return function(P){return function(Z){!x.isActive()&&Z.type==="INITIAL_PUBLISH"&&x.start(),x.isActive()&&zo(Z)&&x.stop(),P(Z)}}},Nn=function(v){var x=!1,P=!1,Z=setTimeout(function(){P=!0}),ce=function(ye){if(x)return;if(P)return;x=!0,v(ye),clearTimeout(Z)};return ce.wasCalled=function(){return x},ce},Xo=function(){var v=[],x=function(ue){var ye=ke(v,function(We){return We.timerId===ue});ye!==-1||D(!1);var be=v.splice(ye,1),Ue=be[0];Ue.callback()},P=function(ue){var ye=setTimeout(function(){return x(ye)}),be={timerId:ye,callback:ue};v.push(be)},Z=function(){if(!v.length)return;var ue=[].concat(v);v.length=0,ue.forEach(function(ye){clearTimeout(ye.timerId),ye.callback()})};return{add:P,flush:Z}},Yo=function(x,P){return x==null&&P==null?!0:x==null||P==null?!1:x.droppableId===P.droppableId&&x.index===P.index},la=function(x,P){return x==null&&P==null?!0:x==null||P==null?!1:x.draggableId===P.draggableId&&x.droppableId===P.droppableId},Is=function(x,P){if(x===P)return!0;var Z=x.draggable.id===P.draggable.id&&x.draggable.droppableId===P.draggable.droppableId&&x.draggable.type===P.draggable.type&&x.draggable.index===P.draggable.index,ce=x.droppable.id===P.droppable.id&&x.droppable.type===P.droppable.type;return Z&&ce},Ui=function(x,P){Qn(),P(),Kn()},Aa=function(x,P){return{draggableId:x.draggable.id,type:x.droppable.type,source:{droppableId:x.droppable.id,index:x.draggable.index},mode:P}},bn=function(x,P,Z,ce){if(!x){Z(ce(P));return}var ue=Nn(Z),ye={announce:ue};x(P,ye),ue.wasCalled()||Z(ce(P))},Os=function(v,x){var P=Xo(),Z=null,ce=function(Fe,Ve){Z&&D(!1),Ui("onBeforeCapture",function(){var qe=v().onBeforeCapture;if(qe){var Et={draggableId:Fe,mode:Ve};qe(Et)}})},ue=function(Fe,Ve){Z&&D(!1),Ui("onBeforeDragStart",function(){var qe=v().onBeforeDragStart;qe&&qe(Aa(Fe,Ve))})},ye=function(Fe,Ve){Z&&D(!1);var qe=Aa(Fe,Ve);Z={mode:Ve,lastCritical:Fe,lastLocation:qe.source,lastCombine:null},P.add(function(){Ui("onDragStart",function(){return bn(v().onDragStart,qe,x,we.onDragStart)})})},be=function(Fe,Ve){var qe=ut(Ve),Et=Ot(Ve);Z||D(!1);var mt=!Is(Fe,Z.lastCritical);mt&&(Z.lastCritical=Fe);var Ct=!Yo(Z.lastLocation,qe);Ct&&(Z.lastLocation=qe);var Bt=!la(Z.lastCombine,Et);if(Bt&&(Z.lastCombine=Et),!mt&&!Ct&&!Bt)return;var Kt=Object(V.a)({},Aa(Fe,Z.mode),{combine:Et,destination:qe});P.add(function(){Ui("onDragUpdate",function(){return bn(v().onDragUpdate,Kt,x,we.onDragUpdate)})})},Ue=function(){Z||D(!1),P.flush()},We=function(Fe){Z||D(!1),Z=null,Ui("onDragEnd",function(){return bn(v().onDragEnd,Fe,x,we.onDragEnd)})},Ge=function(){if(!Z)return;var Fe=Object(V.a)({},Aa(Z.lastCritical,Z.mode),{combine:null,destination:null,reason:"CANCEL"});We(Fe)};return{beforeCapture:ce,beforeStart:ue,start:ye,update:be,flush:Ue,drop:We,abort:Ge}},Jo=function(v,x){var P=Os(v,x);return function(Z){return function(ce){return function(ue){if(ue.type==="BEFORE_INITIAL_CAPTURE"){P.beforeCapture(ue.payload.draggableId,ue.payload.movementMode);return}if(ue.type==="INITIAL_PUBLISH"){var ye=ue.payload.critical;P.beforeStart(ye,ue.payload.movementMode),ce(ue),P.start(ye,ue.payload.movementMode);return}if(ue.type==="DROP_COMPLETE"){var be=ue.payload.completed.result;P.flush(),ce(ue),P.drop(be);return}if(ce(ue),ue.type==="FLUSH"){P.abort();return}var Ue=Z.getState();Ue.phase==="DRAGGING"&&P.update(Ue.critical,Ue.impact)}}}},$o=function(v){return function(x){return function(P){if(P.type!=="DROP_ANIMATION_FINISHED"){x(P);return}var Z=v.getState();Z.phase==="DROP_ANIMATING"||D(!1),v.dispatch(jn({completed:Z.completed}))}}},ua=function(v){var x=null,P=null;function Z(){P&&(cancelAnimationFrame(P),P=null),x&&(x(),x=null)}return function(ce){return function(ue){if((ue.type==="FLUSH"||ue.type==="DROP_COMPLETE"||ue.type==="DROP_ANIMATION_FINISHED")&&Z(),ce(ue),ue.type!=="DROP_ANIMATE")return;var ye={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var Ue=v.getState();Ue.phase==="DROP_ANIMATING"&&v.dispatch(Un())}};P=requestAnimationFrame(function(){P=null,x=He(window,[ye])})}}},Zo=function(v){return function(){return function(x){return function(P){(P.type==="DROP_COMPLETE"||P.type==="FLUSH"||P.type==="DROP_ANIMATE")&&v.stopPublishing(),x(P)}}}},Rs=function(v){var x=!1;return function(){return function(P){return function(Z){if(Z.type==="INITIAL_PUBLISH"){x=!0,v.tryRecordFocus(Z.payload.critical.draggable.id),P(Z),v.tryRestoreFocusRecorded();return}if(P(Z),!x)return;if(Z.type==="FLUSH"){x=!1,v.tryRestoreFocusRecorded();return}if(Z.type==="DROP_COMPLETE"){x=!1;var ce=Z.payload.completed.result;ce.combine&&v.tryShiftRecord(ce.draggableId,ce.combine.draggableId),v.tryRestoreFocusRecorded()}}}}},Ds=function(x){return x.type==="DROP_COMPLETE"||x.type==="DROP_ANIMATE"||x.type==="FLUSH"},Ls=function(v){return function(x){return function(P){return function(Z){if(Ds(Z)){v.stop(),P(Z);return}if(Z.type==="INITIAL_PUBLISH"){P(Z);var ce=x.getState();ce.phase==="DRAGGING"||D(!1),v.start(ce);return}P(Z),v.scroll(x.getState())}}}},Us=function(v){return function(x){return function(P){if(x(P),P.type!=="PUBLISH_WHILE_DRAGGING")return;var Z=v.getState();if(Z.phase!=="DROP_PENDING")return;if(Z.isWaiting)return;v.dispatch(Bn({reason:Z.reason}))}}},Fs=U.d,Ns=function(v){var x=v.dimensionMarshal,P=v.focusMarshal,Z=v.styleMarshal,ce=v.getResponders,ue=v.announce,ye=v.autoScroller;return Object(U.e)(vr,Fs(Object(U.a)(Pa(Z),Zo(x),sn(x),Bs,$o,ua,Us,Ls(ye),Li,Rs(P),Jo(ce,ue))))},ca=function(){return{additions:{},removals:{},modified:{}}};function Ms(v){var x=v.registry,P=v.callbacks,Z=ca(),ce=null,ue=function(){if(ce)return;P.collectionStarting(),ce=requestAnimationFrame(function(){ce=null,Qn();var Ge=Z,Ne=Ge.additions,Fe=Ge.removals,Ve=Ge.modified,qe=Object.keys(Ne).map(function(Ct){return x.draggable.getById(Ct).getDimension(Te)}).sort(function(Ct,Bt){return Ct.descriptor.index-Bt.descriptor.index}),Et=Object.keys(Ve).map(function(Ct){var Bt=x.droppable.getById(Ct),Kt=Bt.callbacks.getScrollWhileDragging();return{droppableId:Ct,scroll:Kt}}),mt={additions:qe,removals:Object.keys(Fe),modified:Et};Z=ca(),Kn(),P.publish(mt)})},ye=function(Ge){var Ne=Ge.descriptor.id;Z.additions[Ne]=Ge,Z.modified[Ge.descriptor.droppableId]=!0,Z.removals[Ne]&&delete Z.removals[Ne],ue()},be=function(Ge){var Ne=Ge.descriptor;Z.removals[Ne.id]=!0,Z.modified[Ne.droppableId]=!0,Z.additions[Ne.id]&&delete Z.additions[Ne.id],ue()},Ue=function(){if(!ce)return;cancelAnimationFrame(ce),ce=null,Z=ca()};return{add:ye,remove:be,stop:Ue}}var Ps=function(v){var x=v.scrollHeight,P=v.scrollWidth,Z=v.height,ce=v.width,ue=Ze({x:P,y:x},{x:ce,y:Z}),ye={x:Math.max(0,ue.x),y:Math.max(0,ue.y)};return ye},Fi=function(){var v=document.documentElement;return v||D(!1),v},ks=function(){var v=Fi(),x=Ps({scrollHeight:v.scrollHeight,scrollWidth:v.scrollWidth,width:v.clientWidth,height:v.clientHeight});return x},qo=function(){var v=Qa(),x=ks(),P=v.y,Z=v.x,ce=Fi(),ue=ce.clientWidth,ye=ce.clientHeight,be=Z+ue,Ue=P+ye,We=A({top:P,left:Z,right:be,bottom:Ue}),Ge={frame:We,scroll:{initial:v,current:v,max:x,diff:{value:Te,displacement:Te}}};return Ge},ja=function(v){var x=v.critical,P=v.scrollOptions,Z=v.registry;Qn();var ce=qo(),ue=ce.scroll.current,ye=x.droppable,be=Z.droppable.getAllByType(ye.type).map(function(Ne){return Ne.callbacks.getDimensionAndWatchScroll(ue,P)}),Ue=Z.draggable.getAllByType(x.draggable.type).map(function(Ne){return Ne.getDimension(ue)}),We={draggables:wt(Ue),droppables:dt(be)};Kn();var Ge={dimensions:We,critical:x,viewport:ce};return Ge};function Hs(v,x,P){if(P.descriptor.id===x.id)return!1;if(P.descriptor.type!==x.type)return!1;var Z=v.droppable.getById(P.descriptor.droppableId);return!(Z.descriptor.mode!=="virtual")}var Qs=function(v,x){var P=null,Z=Ms({callbacks:{publish:x.publishWhileDragging,collectionStarting:x.collectionStarting},registry:v}),ce=function(Ve,qe){if(v.droppable.exists(Ve)||D(!1),!P)return;x.updateDroppableIsEnabled({id:Ve,isEnabled:qe})},ue=function(Ve,qe){if(!P)return;v.droppable.exists(Ve)||D(!1),x.updateDroppableIsCombineEnabled({id:Ve,isCombineEnabled:qe})},ye=function(Ve,qe){if(!P)return;v.droppable.exists(Ve)||D(!1),x.updateDroppableScroll({id:Ve,newScroll:qe})},be=function(Ve,qe){if(!P)return;v.droppable.getById(Ve).callbacks.scroll(qe)},Ue=function(){if(!P)return;Z.stop();var Ve=P.critical.droppable;v.droppable.getAllByType(Ve.type).forEach(function(qe){return qe.callbacks.dragStopped()}),P.unsubscribe(),P=null},We=function(Ve){P||D(!1);var qe=P.critical.draggable;Ve.type==="ADDITION"&&(Hs(v,qe,Ve.value)&&Z.add(Ve.value)),Ve.type==="REMOVAL"&&(Hs(v,qe,Ve.value)&&Z.remove(Ve.value))},Ge=function(Ve){P&&D(!1);var qe=v.draggable.getById(Ve.draggableId),Et=v.droppable.getById(qe.descriptor.droppableId),mt={draggable:qe.descriptor,droppable:Et.descriptor},Ct=v.subscribe(We);return P={critical:mt,unsubscribe:Ct},ja({critical:mt,registry:v,scrollOptions:Ve.scrollOptions})},Ne={updateDroppableIsEnabled:ce,updateDroppableIsCombineEnabled:ue,scrollDroppable:be,updateDroppableScroll:ye,startPublishing:Ge,stopPublishing:Ue};return Ne},Ks=function(v,x){return v.phase==="IDLE"?!0:v.phase!=="DROP_ANIMATING"||v.completed.result.draggableId===x?!1:v.completed.result.reason==="DROP"},el=function(v){window.scrollBy(v.x,v.y)},tl=u(function(v){return gt(v).filter(function(x){return x.isEnabled?!!x.frame:!1})}),rl=function(x,P){var Z=Qe(tl(P),function(ce){return ce.frame||D(!1),vn(ce.frame.pageMarginBox)(x)});return Z},nl=function(v){var x=v.center,P=v.destination,Z=v.droppables;if(P){var ce=Z[P];return ce.frame?ce:null}var ue=rl(x,Z);return ue},En={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(x){return Math.pow(x,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},il=function(v,x){var P=v[x.size]*En.startFromPercentage,Z=v[x.size]*En.maxScrollAtPercentage,ce={startScrollingFrom:P,maxScrollValueAt:Z};return ce},js=function(v){var x=v.startOfRange,P=v.endOfRange,Z=v.current,ce=P-x;if(ce===0)return 0;var ue=Z-x,ye=ue/ce;return ye},ci=1,al=function(v,x){if(v>x.startScrollingFrom)return 0;if(v<=x.maxScrollValueAt)return En.maxPixelScroll;if(v===x.startScrollingFrom)return ci;var P=js({startOfRange:x.maxScrollValueAt,endOfRange:x.startScrollingFrom,current:v}),Z=1-P,ce=En.maxPixelScroll*En.ease(Z);return Math.ceil(ce)},Ws=En.durationDampening.accelerateAt,Gs=En.durationDampening.stopDampeningAt,sl=function(v,x){var P=x,Z=Gs,ce=Date.now(),ue=ce-P;if(ue>=Gs)return v;if(ue<Ws)return ci;var ye=js({startOfRange:Ws,endOfRange:Z,current:ue}),be=v*En.ease(ye);return Math.ceil(be)},Ni=function(v){var x=v.distanceToEdge,P=v.thresholds,Z=v.dragStartTime,ce=v.shouldUseTimeDampening,ue=al(x,P);return ue===0?0:ce?Math.max(sl(ue,Z),ci):ue},Vs=function(v){var x=v.container,P=v.distanceToEdges,Z=v.dragStartTime,ce=v.axis,ue=v.shouldUseTimeDampening,ye=il(x,ce),be=P[ce.end]<P[ce.start];return be?Ni({distanceToEdge:P[ce.end],thresholds:ye,dragStartTime:Z,shouldUseTimeDampening:ue}):-1*Ni({distanceToEdge:P[ce.start],thresholds:ye,dragStartTime:Z,shouldUseTimeDampening:ue})},ol=function(v){var x=v.container,P=v.subject,Z=v.proposedScroll,ce=P.height>x.height,ue=P.width>x.width;return!ue&&!ce?Z:ue&&ce?null:{x:ue?0:Z.x,y:ce?0:Z.y}},ll=Ye(function(v){return v===0?0:v}),zs=function(v){var x=v.dragStartTime,P=v.container,Z=v.subject,ce=v.center,ue=v.shouldUseTimeDampening,ye={top:ce.y-P.top,right:P.right-ce.x,bottom:P.bottom-ce.y,left:ce.x-P.left},be=Vs({container:P,distanceToEdges:ye,dragStartTime:x,axis:Pt,shouldUseTimeDampening:ue}),Ue=Vs({container:P,distanceToEdges:ye,dragStartTime:x,axis:kt,shouldUseTimeDampening:ue}),We=ll({x:Ue,y:be});if(et(We,Te))return null;var Ge=ol({container:P,subject:Z,proposedScroll:We});return Ge?et(Ge,Te)?null:Ge:null},da=Ye(function(v){return v===0?0:v>0?1:-1}),Wa=function(){var v=function(P,Z){return P<0?P:P>Z?P-Z:0};return function(x){var P=x.current,Z=x.max,ce=x.change,ue=Xe(P,ce),ye={x:v(ue.x,Z.x),y:v(ue.y,Z.y)};return et(ye,Te)?null:ye}}(),Xs=function(x){var P=x.max,Z=x.current,ce=x.change,ue={x:Math.max(Z.x,P.x),y:Math.max(Z.y,P.y)},ye=da(ce),be=Wa({max:ue,current:Z,change:ye});return be?ye.x!==0&&be.x===0?!0:ye.y!==0&&be.y===0:!0},Ga=function(x,P){return Xs({current:x.scroll.current,max:x.scroll.max,change:P})},Al=function(x,P){if(!Ga(x,P))return null;var Z=x.scroll.max,ce=x.scroll.current;return Wa({current:ce,max:Z,change:P})},di=function(x,P){var Z=x.frame;return Z?Xs({current:Z.scroll.current,max:Z.scroll.max,change:P}):!1},ul=function(x,P){var Z=x.frame;return Z&&di(x,P)?Wa({current:Z.scroll.current,max:Z.scroll.max,change:P}):null},cl=function(v){var x=v.viewport,P=v.subject,Z=v.center,ce=v.dragStartTime,ue=v.shouldUseTimeDampening,ye=zs({dragStartTime:ce,container:x.frame,subject:P,center:Z,shouldUseTimeDampening:ue});return ye&&Ga(x,ye)?ye:null},dl=function(v){var x=v.droppable,P=v.subject,Z=v.center,ce=v.dragStartTime,ue=v.shouldUseTimeDampening,ye=x.frame;if(!ye)return null;var be=zs({dragStartTime:ce,container:ye.pageMarginBox,subject:P,center:Z,shouldUseTimeDampening:ue});return be&&di(x,be)?be:null},Ys=function(v){var x=v.state,P=v.dragStartTime,Z=v.shouldUseTimeDampening,ce=v.scrollWindow,ue=v.scrollDroppable,ye=x.current.page.borderBoxCenter,be=x.dimensions.draggables[x.critical.draggable.id],Ue=be.page.marginBox;if(x.isWindowScrollAllowed){var We=x.viewport,Ge=cl({dragStartTime:P,viewport:We,subject:Ue,center:ye,shouldUseTimeDampening:Z});if(Ge){ce(Ge);return}}var Ne=nl({center:ye,destination:mr(x.impact),droppables:x.dimensions.droppables});if(!Ne)return;var Fe=dl({dragStartTime:P,droppable:Ne,subject:Ue,center:ye,shouldUseTimeDampening:Z});Fe&&ue(Ne.descriptor.id,Fe)},hl=function(v){var x=v.scrollWindow,P=v.scrollDroppable,Z=g(x),ce=g(P),ue=null,ye=function(Ge){ue||D(!1);var Ne=ue,Fe=Ne.shouldUseTimeDampening,Ve=Ne.dragStartTime;Ys({state:Ge,scrollWindow:Z,scrollDroppable:ce,dragStartTime:Ve,shouldUseTimeDampening:Fe})},be=function(Ge){Qn(),ue&&D(!1);var Ne=Date.now(),Fe=!1,Ve=function(){Fe=!0};Ys({state:Ge,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:Ve,scrollDroppable:Ve}),ue={dragStartTime:Ne,shouldUseTimeDampening:Fe},Kn(),Fe&&ye(Ge)},Ue=function(){if(!ue)return;Z.cancel(),ce.cancel(),ue=null};return{start:be,stop:Ue,scroll:ye}},fl=function(v){var x=v.move,P=v.scrollDroppable,Z=v.scrollWindow,ce=function(We,Ge){var Ne=Xe(We.current.client.selection,Ge);x({client:Ne})},ue=function(We,Ge){if(!di(We,Ge))return Ge;var Ne=ul(We,Ge);if(!Ne)return P(We.descriptor.id,Ge),null;var Fe=Ze(Ge,Ne);P(We.descriptor.id,Fe);var Ve=Ze(Ge,Fe);return Ve},ye=function(We,Ge,Ne){if(!We)return Ne;if(!Ga(Ge,Ne))return Ne;var Fe=Al(Ge,Ne);if(!Fe)return Z(Ne),null;var Ve=Ze(Ne,Fe);Z(Ve);var qe=Ze(Ne,Ve);return qe},be=function(We){var Ge=We.scrollJumpRequest;if(!Ge)return;var Ne=mr(We.impact);Ne||D(!1);var Fe=ue(We.dimensions.droppables[Ne],Ge);if(!Fe)return;var Ve=We.viewport,qe=ye(We.isWindowScrollAllowed,Ve,Fe);if(!qe)return;ce(We,qe)};return be},pl=function(v){var x=v.scrollDroppable,P=v.scrollWindow,Z=v.move,ce=hl({scrollWindow:P,scrollDroppable:x}),ue=fl({move:Z,scrollWindow:P,scrollDroppable:x}),ye=function(We){if(We.phase!=="DRAGGING")return;if(We.movementMode==="FLUID"){ce.scroll(We);return}if(!We.scrollJumpRequest)return;ue(We)},be={scroll:ye,start:ce.start,stop:ce.stop};return be},hi="data-rbd",fi=function(){var v=hi+"-drag-handle";return{base:v,draggableId:v+"-draggable-id",contextId:v+"-context-id"}}(),Va=function(){var v=hi+"-draggable";return{base:v,contextId:v+"-context-id",id:v+"-id"}}(),ha=function(){var v=hi+"-droppable";return{base:v,contextId:v+"-context-id",id:v+"-id"}}(),Js={contextId:hi+"-scroll-container-context-id"},gl=function(x){return function(P){return"["+P+'="'+x+'"]'}},pi=function(x,P){return x.map(function(Z){var ce=Z.styles[P];return ce?Z.selector+" { "+ce+" }":""}).join(" ")},ml="pointer-events: none;",vl=function(v){var x=gl(v),P=function(){var be=`
|
|
cursor: -webkit-grab;
|
|
cursor: grab;
|
|
`;return{selector:x(fi.contextId),styles:{always:`
|
|
-webkit-touch-callout: none;
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
touch-action: manipulation;
|
|
`,resting:be,dragging:ml,dropAnimating:be}}}(),Z=function(){var be=`
|
|
transition: `+Ai.outOfTheWay+`;
|
|
`;return{selector:x(Va.contextId),styles:{dragging:be,dropAnimating:be,userCancel:be}}}(),ce={selector:x(ha.contextId),styles:{always:"overflow-anchor: none;"}},ue={selector:"body",styles:{dragging:`
|
|
cursor: grabbing;
|
|
cursor: -webkit-grabbing;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
overflow-anchor: none;
|
|
`}},ye=[Z,P,ce,ue];return{always:pi(ye,"always"),resting:pi(ye,"resting"),dragging:pi(ye,"dragging"),dropAnimating:pi(ye,"dropAnimating"),userCancel:pi(ye,"userCancel")}},hn=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?fe.useLayoutEffect:fe.useEffect,gi=function(){var x=document.querySelector("head");return x||D(!1),x},$s=function(x){var P=document.createElement("style");return x&&P.setAttribute("nonce",x),P.type="text/css",P};function yl(v,x){var P=I(function(){return vl(v)},[v]),Z=Object(fe.useRef)(null),ce=Object(fe.useRef)(null),ue=d(u(function(Ne){var Fe=ce.current;Fe||D(!1),Fe.textContent=Ne}),[]),ye=d(function(Ne){var Fe=Z.current;Fe||D(!1),Fe.textContent=Ne},[]);hn(function(){!Z.current&&!ce.current||D(!1);var Ne=$s(x),Fe=$s(x);return Z.current=Ne,ce.current=Fe,Ne.setAttribute(hi+"-always",v),Fe.setAttribute(hi+"-dynamic",v),gi().appendChild(Ne),gi().appendChild(Fe),ye(P.always),ue(P.resting),function(){var Ve=function(Et){var mt=Et.current;mt||D(!1),gi().removeChild(mt),Et.current=null};Ve(Z),Ve(ce)}},[x,ye,ue,P.always,P.resting,v]);var be=d(function(){return ue(P.dragging)},[ue,P.dragging]),Ue=d(function(Ne){if(Ne==="DROP"){ue(P.dropAnimating);return}ue(P.userCancel)},[ue,P.dropAnimating,P.userCancel]),We=d(function(){if(!ce.current)return;ue(P.resting)},[ue,P.resting]),Ge=I(function(){return{dragging:be,dropping:Ue,resting:We}},[be,Ue,We]);return Ge}var Zs=function(v){return v&&v.ownerDocument?v.ownerDocument.defaultView:window};function Mi(v){return v instanceof Zs(v).HTMLElement}function qs(v,x){var P="["+fi.contextId+'="'+v+'"]',Z=nt(document.querySelectorAll(P));if(!Z.length)return null;var ce=Qe(Z,function(ue){return ue.getAttribute(fi.draggableId)===x});return ce&&Mi(ce)?ce:null}function bl(v){var x=Object(fe.useRef)({}),P=Object(fe.useRef)(null),Z=Object(fe.useRef)(null),ce=Object(fe.useRef)(!1),ue=d(function(Fe,Ve){var qe={id:Fe,focus:Ve};return x.current[Fe]=qe,function(){var mt=x.current,Ct=mt[Fe];Ct!==qe&&delete mt[Fe]}},[]),ye=d(function(Fe){var Ve=qs(v,Fe);Ve&&Ve!==document.activeElement&&Ve.focus()},[v]),be=d(function(Fe,Ve){P.current===Fe&&(P.current=Ve)},[]),Ue=d(function(){if(Z.current)return;if(!ce.current)return;Z.current=requestAnimationFrame(function(){Z.current=null;var Fe=P.current;Fe&&ye(Fe)})},[ye]),We=d(function(Fe){P.current=null;var Ve=document.activeElement;if(!Ve)return;if(Ve.getAttribute(fi.draggableId)!==Fe)return;P.current=Fe},[]);hn(function(){return ce.current=!0,function(){ce.current=!1;var Fe=Z.current;Fe&&cancelAnimationFrame(Fe)}},[]);var Ge=I(function(){return{register:ue,tryRecordFocus:We,tryRestoreFocusRecorded:Ue,tryShiftRecord:be}},[ue,We,Ue,be]);return Ge}function fa(){var v={draggables:{},droppables:{}},x=[];function P(Ne){return x.push(Ne),function(){var Ve=x.indexOf(Ne);if(Ve===-1)return;x.splice(Ve,1)}}function Z(Ne){x.length&&x.forEach(function(Fe){return Fe(Ne)})}function ce(Ne){return v.draggables[Ne]||null}function ue(Ne){var Fe=ce(Ne);return Fe||D(!1),Fe}var ye={register:function(Fe){v.draggables[Fe.descriptor.id]=Fe,Z({type:"ADDITION",value:Fe})},update:function(Fe,Ve){var qe=v.draggables[Ve.descriptor.id];if(!qe)return;if(qe.uniqueId!==Fe.uniqueId)return;delete v.draggables[Ve.descriptor.id],v.draggables[Fe.descriptor.id]=Fe},unregister:function(Fe){var Ve=Fe.descriptor.id,qe=ce(Ve);if(!qe)return;if(Fe.uniqueId!==qe.uniqueId)return;delete v.draggables[Ve],Z({type:"REMOVAL",value:Fe})},getById:ue,findById:ce,exists:function(Fe){return Boolean(ce(Fe))},getAllByType:function(Fe){return xe(v.draggables).filter(function(Ve){return Ve.descriptor.type===Fe})}};function be(Ne){return v.droppables[Ne]||null}function Ue(Ne){var Fe=be(Ne);return Fe||D(!1),Fe}var We={register:function(Fe){v.droppables[Fe.descriptor.id]=Fe},unregister:function(Fe){var Ve=be(Fe.descriptor.id);if(!Ve)return;if(Fe.uniqueId!==Ve.uniqueId)return;delete v.droppables[Fe.descriptor.id]},getById:Ue,findById:be,exists:function(Fe){return Boolean(be(Fe))},getAllByType:function(Fe){return xe(v.droppables).filter(function(Ve){return Ve.descriptor.type===Fe})}};function Ge(){v.draggables={},v.droppables={},x.length=0}return{draggable:ye,droppable:We,subscribe:P,clean:Ge}}function El(){var v=I(fa,[]);return Object(fe.useEffect)(function(){return function(){requestAnimationFrame(v.clean)}},[v]),v}var za=W.a.createContext(null),Pi=function(){var v=document.body;return v||D(!1),v},_l={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},wl=function(x){return"rbd-announcement-"+x};function Cl(v){var x=I(function(){return wl(v)},[v]),P=Object(fe.useRef)(null);Object(fe.useEffect)(function(){var ue=document.createElement("div");return P.current=ue,ue.id=x,ue.setAttribute("aria-live","assertive"),ue.setAttribute("aria-atomic","true"),Object(V.a)(ue.style,_l),Pi().appendChild(ue),function(){setTimeout(function(){var Ue=Pi();Ue.contains(ue)&&Ue.removeChild(ue),ue===P.current&&(P.current=null)})}},[x]);var Z=d(function(ce){var ue=P.current;if(ue){ue.textContent=ce;return}},[]);return Z}var eo=0,Tl={separator:"::"};function xl(){eo=0}function Xa(v,x){return x===void 0&&(x=Tl),I(function(){return""+v+x.separator+eo++},[x.separator,v])}function Bl(v){var x=v.contextId,P=v.uniqueId;return"rbd-hidden-text-"+x+"-"+P}function Sl(v){var x=v.contextId,P=v.text,Z=Xa("hidden-text",{separator:"-"}),ce=I(function(){return Bl({contextId:x,uniqueId:Z})},[Z,x]);return Object(fe.useEffect)(function(){var ye=document.createElement("div");return ye.id=ce,ye.textContent=P,ye.style.display="none",Pi().appendChild(ye),function(){var Ue=Pi();Ue.contains(ye)&&Ue.removeChild(ye)}},[ce,P]),ce}var ki=W.a.createContext(null),Il={react:"^16.8.5","react-dom":"^16.8.5"},Ol=/(\d+)\.(\d+)\.(\d+)/,to=function(x){var P=Ol.exec(x);P!=null||D(!1);var Z=Number(P[1]),ce=Number(P[2]),ue=Number(P[3]);return{major:Z,minor:ce,patch:ue,raw:x}},Hi=function(x,P){return P.major>x.major?!0:P.major<x.major?!1:P.minor>x.minor?!0:P.minor<x.minor?!1:P.patch>=x.patch},Rl=function(v,x){var P=to(v),Z=to(x);if(Hi(P,Z))return},jA=`
|
|
We expect a html5 doctype: <!doctype html>
|
|
This is to ensure consistent browser layout and measurement
|
|
|
|
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md
|
|
`,ro=function(v){var x=v.doctype;if(!x)return;x.name.toLowerCase()!=="html",x.publicId!==""};function Ya(v){}function Qi(v,x){Ya(function(){Object(fe.useEffect)(function(){try{v()}catch(P){Me(`
|
|
A setup problem was encountered.
|
|
|
|
> `+P.message+`
|
|
`)}},x)})}function Dl(){Qi(function(){Rl(Il.react,W.a.version),ro(document)},[])}function Ja(v){var x=Object(fe.useRef)(v);return Object(fe.useEffect)(function(){x.current=v}),x}function Ll(){var v=null;function x(){return Boolean(v)}function P(ye){return ye===v}function Z(ye){v&&D(!1);var be={abandon:ye};return v=be,be}function ce(){v||D(!1),v=null}function ue(){v&&(v.abandon(),ce())}return{isClaimed:x,isActive:P,claim:Z,release:ce,tryAbandon:ue}}var Ul=9,Fl=13,$a=27,Yr=32,Nl=33,Ml=34,Pl=35,kl=36,Hl=37,no=38,Ql=39,Kl=40,pa,jl=(pa={},pa[Fl]=!0,pa[Ul]=!0,pa),io=function(v){jl[v.keyCode]&&v.preventDefault()},ga=function(){var v="visibilitychange";if(typeof document=="undefined")return v;var x=[v,"ms"+v,"webkit"+v,"moz"+v,"o"+v],P=Qe(x,function(Z){return"on"+Z in document});return P||v}(),Za=0,Rt=5;function Wl(v,x){return Math.abs(x.x-v.x)>=Rt||Math.abs(x.y-v.y)>=Rt}var ao={type:"IDLE"};function qa(v){var x=v.cancel,P=v.completed,Z=v.getPhase,ce=v.setPhase;return[{eventName:"mousemove",fn:function(ye){var be=ye.button,Ue=ye.clientX,We=ye.clientY;if(be!==Za)return;var Ge={x:Ue,y:We},Ne=Z();if(Ne.type==="DRAGGING"){ye.preventDefault(),Ne.actions.move(Ge);return}Ne.type==="PENDING"||D(!1);var Fe=Ne.point;if(!Wl(Fe,Ge))return;ye.preventDefault();var Ve=Ne.actions.fluidLift(Ge);ce({type:"DRAGGING",actions:Ve})}},{eventName:"mouseup",fn:function(ye){var be=Z();if(be.type!=="DRAGGING"){x();return}ye.preventDefault(),be.actions.drop({shouldBlockNextClick:!0}),P()}},{eventName:"mousedown",fn:function(ye){Z().type==="DRAGGING"&&ye.preventDefault(),x()}},{eventName:"keydown",fn:function(ye){var be=Z();if(be.type==="PENDING"){x();return}if(ye.keyCode===$a){ye.preventDefault(),x();return}io(ye)}},{eventName:"resize",fn:x},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){Z().type==="PENDING"&&x()}},{eventName:"webkitmouseforcedown",fn:function(ye){var be=Z();if(be.type!=="IDLE"||D(!1),be.actions.shouldRespectForcePress()){x();return}ye.preventDefault()}},{eventName:ga,fn:x}]}function On(v){var x=Object(fe.useRef)(ao),P=Object(fe.useRef)(Le),Z=I(function(){return{eventName:"mousedown",fn:function(Ne){if(Ne.defaultPrevented)return;if(Ne.button!==Za)return;if(Ne.ctrlKey||Ne.metaKey||Ne.shiftKey||Ne.altKey)return;var Fe=v.findClosestDraggableId(Ne);if(!Fe)return;var Ve=v.tryGetLock(Fe,ye,{sourceEvent:Ne});if(!Ve)return;Ne.preventDefault();var qe={x:Ne.clientX,y:Ne.clientY};P.current(),We(Ve,qe)}}},[v]),ce=I(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(Ne){if(Ne.defaultPrevented)return;var Fe=v.findClosestDraggableId(Ne);if(!Fe)return;var Ve=v.findOptionsForDraggable(Fe);if(!Ve)return;if(Ve.shouldRespectForcePress)return;if(!v.canGetLock(Fe))return;Ne.preventDefault()}}},[v]),ue=d(function(){var Ne={passive:!1,capture:!0};P.current=He(window,[ce,Z],Ne)},[ce,Z]),ye=d(function(){var Ge=x.current;if(Ge.type==="IDLE")return;x.current=ao,P.current(),ue()},[ue]),be=d(function(){var Ge=x.current;ye(),Ge.type==="DRAGGING"&&Ge.actions.cancel({shouldBlockNextClick:!0}),Ge.type==="PENDING"&&Ge.actions.abort()},[ye]),Ue=d(function(){var Ne={capture:!0,passive:!1},Fe=qa({cancel:be,completed:ye,getPhase:function(){return x.current},setPhase:function(qe){x.current=qe}});P.current=He(window,Fe,Ne)},[be,ye]),We=d(function(Ne,Fe){x.current.type==="IDLE"||D(!1),x.current={type:"PENDING",point:Fe,actions:Ne},Ue()},[Ue]);hn(function(){return ue(),function(){P.current()}},[ue])}var mi;function so(){}var Ki=(mi={},mi[Ml]=!0,mi[Nl]=!0,mi[kl]=!0,mi[Pl]=!0,mi);function ma(v,x){function P(){x(),v.cancel()}function Z(){x(),v.drop()}return[{eventName:"keydown",fn:function(ue){if(ue.keyCode===$a){ue.preventDefault(),P();return}if(ue.keyCode===Yr){ue.preventDefault(),Z();return}if(ue.keyCode===Kl){ue.preventDefault(),v.moveDown();return}if(ue.keyCode===no){ue.preventDefault(),v.moveUp();return}if(ue.keyCode===Ql){ue.preventDefault(),v.moveRight();return}if(ue.keyCode===Hl){ue.preventDefault(),v.moveLeft();return}if(Ki[ue.keyCode]){ue.preventDefault();return}io(ue)}},{eventName:"mousedown",fn:P},{eventName:"mouseup",fn:P},{eventName:"click",fn:P},{eventName:"touchstart",fn:P},{eventName:"resize",fn:P},{eventName:"wheel",fn:P,options:{passive:!0}},{eventName:ga,fn:P}]}function Gl(v){var x=Object(fe.useRef)(so),P=I(function(){return{eventName:"keydown",fn:function(ue){if(ue.defaultPrevented)return;if(ue.keyCode!==Yr)return;var ye=v.findClosestDraggableId(ue);if(!ye)return;var be=v.tryGetLock(ye,Ge,{sourceEvent:ue});if(!be)return;ue.preventDefault();var Ue=!0,We=be.snapLift();x.current();function Ge(){Ue||D(!1),Ue=!1,x.current(),Z()}x.current=He(window,ma(We,Ge),{capture:!0,passive:!1})}}},[v]),Z=d(function(){var ue={passive:!1,capture:!0};x.current=He(window,[P],ue)},[P]);hn(function(){return Z(),function(){x.current()}},[Z])}var es={type:"IDLE"},Vl=120,ei=.15;function ts(v){var x=v.cancel,P=v.getPhase;return[{eventName:"orientationchange",fn:x},{eventName:"resize",fn:x},{eventName:"contextmenu",fn:function(ce){ce.preventDefault()}},{eventName:"keydown",fn:function(ce){if(P().type!=="DRAGGING"){x();return}ce.keyCode===$a&&ce.preventDefault(),x()}},{eventName:ga,fn:x}]}function rs(v){var x=v.cancel,P=v.completed,Z=v.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(ue){var ye=Z();if(ye.type!=="DRAGGING"){x();return}ye.hasMoved=!0;var be=ue.touches[0],Ue=be.clientX,We=be.clientY,Ge={x:Ue,y:We};ue.preventDefault(),ye.actions.move(Ge)}},{eventName:"touchend",fn:function(ue){var ye=Z();if(ye.type!=="DRAGGING"){x();return}ue.preventDefault(),ye.actions.drop({shouldBlockNextClick:!0}),P()}},{eventName:"touchcancel",fn:function(ue){if(Z().type!=="DRAGGING"){x();return}ue.preventDefault(),x()}},{eventName:"touchforcechange",fn:function(ue){var ye=Z();ye.type!=="IDLE"||D(!1);var be=ue.touches[0];if(!be)return;var Ue=be.force>=ei;if(!Ue)return;var We=ye.actions.shouldRespectForcePress();if(ye.type==="PENDING"){We&&x();return}if(We){if(ye.hasMoved){ue.preventDefault();return}x();return}ue.preventDefault()}},{eventName:ga,fn:x}]}function zl(v){var x=Object(fe.useRef)(es),P=Object(fe.useRef)(Le),Z=d(function(){return x.current},[]),ce=d(function(Ve){x.current=Ve},[]),ue=I(function(){return{eventName:"touchstart",fn:function(Ve){if(Ve.defaultPrevented)return;var qe=v.findClosestDraggableId(Ve);if(!qe)return;var Et=v.tryGetLock(qe,be,{sourceEvent:Ve});if(!Et)return;var mt=Ve.touches[0],Ct=mt.clientX,Bt=mt.clientY,Kt={x:Ct,y:Bt};P.current(),Ne(Et,Kt)}}},[v]),ye=d(function(){var Ve={capture:!0,passive:!1};P.current=He(window,[ue],Ve)},[ue]),be=d(function(){var Fe=x.current;if(Fe.type==="IDLE")return;Fe.type==="PENDING"&&clearTimeout(Fe.longPressTimerId),ce(es),P.current(),ye()},[ye,ce]),Ue=d(function(){var Fe=x.current;be(),Fe.type==="DRAGGING"&&Fe.actions.cancel({shouldBlockNextClick:!0}),Fe.type==="PENDING"&&Fe.actions.abort()},[be]),We=d(function(){var Ve={capture:!0,passive:!1},qe={cancel:Ue,completed:be,getPhase:Z},Et=He(window,rs(qe),Ve),mt=He(window,ts(qe),Ve);P.current=function(){Et(),mt()}},[Ue,Z,be]),Ge=d(function(){var Ve=Z();Ve.type==="PENDING"||D(!1);var qe=Ve.actions.fluidLift(Ve.point);ce({type:"DRAGGING",actions:qe,hasMoved:!1})},[Z,ce]),Ne=d(function(Ve,qe){Z().type==="IDLE"||D(!1);var Et=setTimeout(Ge,Vl);ce({type:"PENDING",point:qe,actions:Ve,longPressTimerId:Et}),We()},[We,Z,ce,Ge]);hn(function(){return ye(),function(){P.current();var qe=Z();qe.type==="PENDING"&&(clearTimeout(qe.longPressTimerId),ce(es))}},[Z,ye,ce]),hn(function(){var Ve=He(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return Ve},[])}function oo(v){Ya(function(){var x=Ja(v);Qi(function(){x.current.length===v.length||D(!1)})})}var Xl={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function va(v,x){if(x==null)return!1;var P=Boolean(Xl[x.tagName.toLowerCase()]);if(P)return!0;var Z=x.getAttribute("contenteditable");return Z==="true"||Z===""?!0:x===v?!1:va(v,x.parentElement)}function Yl(v,x){var P=x.target;return Mi(P)?va(v,P):!1}var Jl=function(v){return A(v.getBoundingClientRect()).center};function $l(v){return v instanceof Zs(v).Element}var Zl=function(){var v="matches";if(typeof document=="undefined")return v;var x=[v,"msMatchesSelector","webkitMatchesSelector"],P=Qe(x,function(Z){return Z in Element.prototype});return P||v}();function lo(v,x){return v==null?null:v[Zl](x)?v:lo(v.parentElement,x)}function ql(v,x){return v.closest?v.closest(x):lo(v,x)}function eA(v){return"["+fi.contextId+'="'+v+'"]'}function tA(v,x){var P=x.target;if(!$l(P))return null;var Z=eA(v),ce=ql(P,Z);return ce&&Mi(ce)?ce:null}function Ao(v,x){var P=tA(v,x);return P?P.getAttribute(fi.draggableId):null}function rA(v,x){var P="["+Va.contextId+'="'+v+'"]',Z=nt(document.querySelectorAll(P)),ce=Qe(Z,function(ue){return ue.getAttribute(Va.id)===x});return ce&&Mi(ce)?ce:null}function nA(v){v.preventDefault()}function ya(v){var x=v.expected,P=v.phase,Z=v.isLockActive,ce=v.shouldWarn;return Z()?!(x!==P):!1}function ns(v){var x=v.lockAPI,P=v.store,Z=v.registry,ce=v.draggableId;if(x.isClaimed())return!1;var ue=Z.draggable.findById(ce);return ue&&ue.options.isEnabled?!!Ks(P.getState(),ce):!1}function iA(v){var x=v.lockAPI,P=v.contextId,Z=v.store,ce=v.registry,ue=v.draggableId,ye=v.forceSensorStop,be=v.sourceEvent,Ue=ns({lockAPI:x,store:Z,registry:ce,draggableId:ue});if(!Ue)return null;var We=ce.draggable.getById(ue),Ge=rA(P,We.descriptor.id);if(!Ge)return null;if(be&&!We.options.canDragInteractiveElements&&Yl(Ge,be))return null;var Ne=x.claim(ye||Le),Fe="PRE_DRAG";function Ve(){return We.options.shouldRespectForcePress}function qe(){return x.isActive(Ne)}function Et(ar,Lr){ya({expected:ar,phase:Fe,isLockActive:qe,shouldWarn:!0})&&Z.dispatch(Lr())}var mt=Et.bind(null,"DRAGGING");function Ct(ar){function Lr(){x.release(),Fe="COMPLETED"}Fe!=="PRE_DRAG"&&(Lr(),Fe==="PRE_DRAG"||D(!1)),Z.dispatch(gn(ar.liftActionArgs)),Fe="DRAGGING";function an(_r,Jr){if(Jr===void 0&&(Jr={shouldBlockNextClick:!1}),ar.cleanup(),Jr.shouldBlockNextClick){var on=He(window,[{eventName:"click",fn:nA,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(on)}Lr(),Z.dispatch(Bn({reason:_r}))}return Object(V.a)({isActive:function(){return ya({expected:"DRAGGING",phase:Fe,isLockActive:qe,shouldWarn:!1})},shouldRespectForcePress:Ve,drop:function(Jr){return an("DROP",Jr)},cancel:function(Jr){return an("CANCEL",Jr)}},ar.actions)}function Bt(ar){var Lr=g(function(_r){mt(function(){return sa({client:_r})})}),an=Ct({liftActionArgs:{id:ue,clientSelection:ar,movementMode:"FLUID"},cleanup:function(){return Lr.cancel()},actions:{move:Lr}});return Object(V.a)({},an,{move:Lr})}function Kt(){var ar={moveUp:function(){return mt(Ri)},moveRight:function(){return mt(Rr)},moveDown:function(){return mt(li)},moveLeft:function(){return mt(Go)}};return Ct({liftActionArgs:{id:ue,clientSelection:Jl(Ge),movementMode:"SNAP"},cleanup:Le,actions:ar})}function Gt(){var ar=ya({expected:"PRE_DRAG",phase:Fe,isLockActive:qe,shouldWarn:!0});ar&&x.release()}var hr={isActive:function(){return ya({expected:"PRE_DRAG",phase:Fe,isLockActive:qe,shouldWarn:!1})},shouldRespectForcePress:Ve,fluidLift:Bt,snapLift:Kt,abort:Gt};return hr}var ba=[On,Gl,zl];function aA(v){var x=v.contextId,P=v.store,Z=v.registry,ce=v.customSensors,ue=v.enableDefaultSensors,ye=[].concat(ue?ba:[],ce||[]),be=Object(fe.useState)(function(){return Ll()})[0],Ue=d(function(Bt,Kt){Bt.isDragging&&!Kt.isDragging&&be.tryAbandon()},[be]);hn(function(){var Bt=P.getState(),Kt=P.subscribe(function(){var Gt=P.getState();Ue(Bt,Gt),Bt=Gt});return Kt},[be,P,Ue]),hn(function(){return be.tryAbandon},[be.tryAbandon]);var We=d(function(Ct){return ns({lockAPI:be,registry:Z,store:P,draggableId:Ct})},[be,Z,P]),Ge=d(function(Ct,Bt,Kt){return iA({lockAPI:be,registry:Z,contextId:x,store:P,draggableId:Ct,forceSensorStop:Bt,sourceEvent:Kt&&Kt.sourceEvent?Kt.sourceEvent:null})},[x,be,Z,P]),Ne=d(function(Ct){return Ao(x,Ct)},[x]),Fe=d(function(Ct){var Bt=Z.draggable.findById(Ct);return Bt?Bt.options:null},[Z.draggable]),Ve=d(function(){if(!be.isClaimed())return;be.tryAbandon(),P.getState().phase!=="IDLE"&&P.dispatch(Di())},[be,P]),qe=d(be.isClaimed,[be]),Et=I(function(){return{canGetLock:We,tryGetLock:Ge,findClosestDraggableId:Ne,findOptionsForDraggable:Fe,tryReleaseLock:Ve,isLockClaimed:qe}},[We,Ge,Ne,Fe,Ve,qe]);oo(ye);for(var mt=0;mt<ye.length;mt++)ye[mt](Et)}var is=function(x){return{onBeforeCapture:x.onBeforeCapture,onBeforeDragStart:x.onBeforeDragStart,onDragStart:x.onDragStart,onDragEnd:x.onDragEnd,onDragUpdate:x.onDragUpdate}};function ti(v){return v.current||D(!1),v.current}function uo(v){var x=v.contextId,P=v.setCallbacks,Z=v.sensors,ce=v.nonce,ue=v.dragHandleUsageInstructions,ye=Object(fe.useRef)(null);Dl();var be=Ja(v),Ue=d(function(){return is(be.current)},[be]),We=Cl(x),Ge=Sl({contextId:x,text:ue}),Ne=yl(x,ce),Fe=d(function(_r){ti(ye).dispatch(_r)},[]),Ve=I(function(){return Object(U.b)({publishWhileDragging:aa,updateDroppableScroll:Na,updateDroppableIsEnabled:Ma,updateDroppableIsCombineEnabled:Wo,collectionStarting:Oi},Fe)},[Fe]),qe=El(),Et=I(function(){return Qs(qe,Ve)},[qe,Ve]),mt=I(function(){return pl(Object(V.a)({scrollWindow:el,scrollDroppable:Et.scrollDroppable},Object(U.b)({move:sa},Fe)))},[Et.scrollDroppable,Fe]),Ct=bl(x),Bt=I(function(){return Ns({announce:We,autoScroller:mt,dimensionMarshal:Et,focusMarshal:Ct,getResponders:Ue,styleMarshal:Ne})},[We,mt,Et,Ct,Ue,Ne]);ye.current=Bt;var Kt=d(function(){var _r=ti(ye),Jr=_r.getState();Jr.phase!=="IDLE"&&_r.dispatch(Di())},[]),Gt=d(function(){var _r=ti(ye).getState();return _r.isDragging||_r.phase==="DROP_ANIMATING"},[]),hr=I(function(){return{isDragging:Gt,tryAbort:Kt}},[Gt,Kt]);P(hr);var ar=d(function(_r){return Ks(ti(ye).getState(),_r)},[]),Lr=d(function(){return dn(ti(ye).getState())},[]),an=I(function(){return{marshal:Et,focus:Ct,contextId:x,canLift:ar,isMovementAllowed:Lr,dragHandleUsageInstructionsId:Ge,registry:qe}},[x,Et,Ge,Ct,ar,Lr,qe]);return aA({contextId:x,store:Bt,registry:qe,customSensors:Z,enableDefaultSensors:v.enableDefaultSensors!==!1}),Object(fe.useEffect)(function(){return Kt},[Kt]),W.a.createElement(ki.Provider,{value:an},W.a.createElement(O.a,{context:za,store:Bt},v.children))}var as=0;function sA(){as=0}function co(){return I(function(){return""+as++},[])}function ho(){sA(),xl()}function ss(v){var x=co(),P=v.dragHandleUsageInstructions||we.dragHandleUsageInstructions;return W.a.createElement(M,null,function(Z){return W.a.createElement(uo,{nonce:v.nonce,contextId:x,setCallbacks:Z,dragHandleUsageInstructions:P,enableDefaultSensors:v.enableDefaultSensors,sensors:v.sensors,onBeforeCapture:v.onBeforeCapture,onBeforeDragStart:v.onBeforeDragStart,onDragStart:v.onDragStart,onDragUpdate:v.onDragUpdate,onDragEnd:v.onDragEnd},v.children)})}var Ea=function(x){return function(P){return x===P}},fo=Ea("scroll"),po=Ea("auto"),go=Ea("visible"),_a=function(x,P){return P(x.overflowX)||P(x.overflowY)},oA=function(x,P){return P(x.overflowX)&&P(x.overflowY)},mo=function(x){var P=window.getComputedStyle(x),Z={overflowX:P.overflowX,overflowY:P.overflowY};return _a(Z,fo)||_a(Z,po)},lA=function(){return!1;var x,P;if(!mo(x))return!1;var Z,ce;if(oA(ce,go))return!1},_n=function v(x){return x==null?null:x===document.body?lA()?x:null:x===document.documentElement?null:mo(x)?x:v(x.parentElement)},vo=function(v){if(!v)return;var x=_n(v.parentElement);if(!x)return},os=function(v){return{x:v.scrollLeft,y:v.scrollTop}},AA=function v(x){if(!x)return!1;var P=window.getComputedStyle(x);return P.position==="fixed"?!0:v(x.parentElement)},uA=function(v){var x=_n(v),P=AA(v);return{closestScrollable:x,isFixedOnPage:P}},cA=function(v){var x=v.descriptor,P=v.isEnabled,Z=v.isCombineEnabled,ce=v.isFixedOnPage,ue=v.direction,ye=v.client,be=v.page,Ue=v.closest,We=function(){if(!Ue)return null;var Ve=Ue.scrollSize,qe=Ue.client,Et=Ps({scrollHeight:Ve.scrollHeight,scrollWidth:Ve.scrollWidth,height:qe.paddingBox.height,width:qe.paddingBox.width});return{pageMarginBox:Ue.page.marginBox,frameClient:qe,scrollSize:Ve,shouldClipSubject:Ue.shouldClipSubject,scroll:{initial:Ue.scroll,current:Ue.scroll,max:Et,diff:{value:Te,displacement:Te}}}}(),Ge=ue==="vertical"?Pt:kt,Ne=se({page:be,withPlaceholder:null,axis:Ge,frame:We}),Fe={descriptor:x,isCombineEnabled:Z,isFixedOnPage:ce,axis:Ge,isEnabled:P,client:ye,page:be,frame:We,subject:Ne};return Fe},dA=function(x,P){var Z=T(x);if(!P)return Z;if(x!==P)return Z;var ce=Z.paddingBox.top-P.scrollTop,ue=Z.paddingBox.left-P.scrollLeft,ye=ce+P.scrollHeight,be=ue+P.scrollWidth,Ue={top:ce,right:be,bottom:ye,left:ue},We=s(Ue,Z.border),Ge=a({borderBox:We,margin:Z.margin,border:Z.border,padding:Z.padding});return Ge},hA=function(v){var x=v.ref,P=v.descriptor,Z=v.env,ce=v.windowScroll,ue=v.direction,ye=v.isDropDisabled,be=v.isCombineEnabled,Ue=v.shouldClipSubject,We=Z.closestScrollable,Ge=dA(x,We),Ne=b(Ge,ce),Fe=function(){if(!We)return null;var qe=T(We),Et={scrollHeight:We.scrollHeight,scrollWidth:We.scrollWidth};return{client:qe,page:b(qe,ce),scroll:os(We),scrollSize:Et,shouldClipSubject:Ue}}(),Ve=cA({descriptor:P,isEnabled:!ye,isCombineEnabled:be,isFixedOnPage:Z.isFixedOnPage,direction:ue,client:Ge,page:Ne,closest:Fe});return Ve},fA={passive:!1},pA={passive:!0},yo=function(v){return v.shouldPublishImmediately?fA:pA};function ji(v){var x=Object(fe.useContext)(v);return x||D(!1),x}var wa=function(x){return x&&x.env.closestScrollable||null};function ls(v){var x=Object(fe.useRef)(null),P=ji(ki),Z=Xa("droppable"),ce=P.registry,ue=P.marshal,ye=Ja(v),be=I(function(){return{id:v.droppableId,type:v.type,mode:v.mode}},[v.droppableId,v.mode,v.type]),Ue=Object(fe.useRef)(be),We=I(function(){return u(function(Gt,hr){x.current||D(!1);var ar={x:Gt,y:hr};ue.updateDroppableScroll(be.id,ar)})},[be.id,ue]),Ge=d(function(){var Gt=x.current;return!Gt||!Gt.env.closestScrollable?Te:os(Gt.env.closestScrollable)},[]),Ne=d(function(){var Gt=Ge();We(Gt.x,Gt.y)},[Ge,We]),Fe=I(function(){return g(Ne)},[Ne]),Ve=d(function(){var Gt=x.current,hr=wa(Gt);Gt&&hr||D(!1);var ar=Gt.scrollOptions;if(ar.shouldPublishImmediately){Ne();return}Fe()},[Fe,Ne]),qe=d(function(Gt,hr){x.current&&D(!1);var ar=ye.current,Lr=ar.getDroppableRef();Lr||D(!1);var an=uA(Lr),_r={ref:Lr,descriptor:be,env:an,scrollOptions:hr};x.current=_r;var Jr=hA({ref:Lr,descriptor:be,env:an,windowScroll:Gt,direction:ar.direction,isDropDisabled:ar.isDropDisabled,isCombineEnabled:ar.isCombineEnabled,shouldClipSubject:!ar.ignoreContainerClipping}),on=an.closestScrollable;return on&&(on.setAttribute(Js.contextId,P.contextId),on.addEventListener("scroll",Ve,yo(_r.scrollOptions))),Jr},[P.contextId,be,Ve,ye]),Et=d(function(){var Gt=x.current,hr=wa(Gt);return Gt&&hr||D(!1),os(hr)},[]),mt=d(function(){var Gt=x.current;Gt||D(!1);var hr=wa(Gt);if(x.current=null,!hr)return;Fe.cancel(),hr.removeAttribute(Js.contextId),hr.removeEventListener("scroll",Ve,yo(Gt.scrollOptions))},[Ve,Fe]),Ct=d(function(Gt){var hr=x.current;hr||D(!1);var ar=wa(hr);ar||D(!1),ar.scrollTop+=Gt.y,ar.scrollLeft+=Gt.x},[]),Bt=I(function(){return{getDimensionAndWatchScroll:qe,getScrollWhileDragging:Et,dragStopped:mt,scroll:Ct}},[mt,qe,Et,Ct]),Kt=I(function(){return{uniqueId:Z,descriptor:be,callbacks:Bt}},[Bt,be,Z]);hn(function(){return Ue.current=Kt.descriptor,ce.droppable.register(Kt),function(){x.current&&mt(),ce.droppable.unregister(Kt)}},[Bt,be,mt,Kt,ue,ce.droppable]),hn(function(){if(!x.current)return;ue.updateDroppableIsEnabled(Ue.current.id,!v.isDropDisabled)},[v.isDropDisabled,ue]),hn(function(){if(!x.current)return;ue.updateDroppableIsCombineEnabled(Ue.current.id,v.isCombineEnabled)},[v.isCombineEnabled,ue])}function Ca(){}var nn={width:0,height:0,margin:ne},Wi=function(x){var P=x.isAnimatingOpenOnMount,Z=x.placeholder,ce=x.animate;return P||ce==="close"?nn:{height:Z.client.borderBox.height,width:Z.client.borderBox.width,margin:Z.client.margin}},gA=function(x){var P=x.isAnimatingOpenOnMount,Z=x.placeholder,ce=x.animate,ue=Wi({isAnimatingOpenOnMount:P,placeholder:Z,animate:ce});return{display:Z.display,boxSizing:"border-box",width:ue.width,height:ue.height,marginTop:ue.margin.top,marginRight:ue.margin.right,marginBottom:ue.margin.bottom,marginLeft:ue.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:ce!=="none"?Ai.placeholder:null}};function mA(v){var x=Object(fe.useRef)(null),P=d(function(){if(!x.current)return;clearTimeout(x.current),x.current=null},[]),Z=v.animate,ce=v.onTransitionEnd,ue=v.onClose,ye=v.contextId,be=Object(fe.useState)(v.animate==="open"),Ue=be[0],We=be[1];Object(fe.useEffect)(function(){return Ue?Z!=="open"?(P(),We(!1),Ca):x.current?Ca:(x.current=setTimeout(function(){x.current=null,We(!1)}),P):Ca},[Z,Ue,P]);var Ge=d(function(Fe){if(Fe.propertyName!=="height")return;ce(),Z==="close"&&ue()},[Z,ue,ce]),Ne=gA({isAnimatingOpenOnMount:Ue,animate:v.animate,placeholder:v.placeholder});return W.a.createElement(v.placeholder.tagName,{style:Ne,"data-rbd-placeholder-context-id":ye,onTransitionEnd:Ge,ref:v.innerRef})}var bo=W.a.memo(mA),Gi=W.a.createContext(null);function Eo(v){v&&Mi(v)||D(!1)}function As(v){return typeof v=="boolean"}function us(v,x){x.forEach(function(P){return P(v)})}var vA=[function(x){var P=x.props;P.droppableId||D(!1),typeof P.droppableId=="string"||D(!1)},function(x){var P=x.props;As(P.isDropDisabled)||D(!1),As(P.isCombineEnabled)||D(!1),As(P.ignoreContainerClipping)||D(!1)},function(x){var P=x.getDroppableRef;Eo(P())}],yA=[function(x){var P=x.props,Z=x.getPlaceholderRef;if(!P.placeholder)return;var ce=Z();if(ce)return}],bA=[function(x){var P=x.props;P.renderClone||D(!1)},function(x){var P=x.getPlaceholderRef;P()&&D(!1)}];function EA(v){Qi(function(){us(v,vA),v.props.mode==="standard"&&us(v,yA),v.props.mode==="virtual"&&us(v,bA)})}var _A=function(v){Object(L.a)(x,v);function x(){for(var Z,ce=arguments.length,ue=new Array(ce),ye=0;ye<ce;ye++)ue[ye]=arguments[ye];return Z=v.call.apply(v,[this].concat(ue))||this,Z.state={isVisible:Boolean(Z.props.on),data:Z.props.on,animate:Z.props.shouldAnimate&&Z.props.on?"open":"none"},Z.onClose=function(){if(Z.state.animate!=="close")return;Z.setState({isVisible:!1})},Z}x.getDerivedStateFromProps=function(ce,ue){return ce.shouldAnimate?ce.on?{isVisible:!0,data:ce.on,animate:"open"}:ue.isVisible?{isVisible:!0,data:ue.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(ce.on),data:ce.on,animate:"none"}};var P=x.prototype;return P.render=function(){if(!this.state.isVisible)return null;var ce={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(ce)},x}(W.a.PureComponent),cs={dragging:5e3,dropAnimating:4500},_o=function(x,P){return P?Ai.drop(P.duration):x?Ai.snap:Ai.fluid},wo=function(x,P){return x?P?Fn.opacity.drop:Fn.opacity.combining:null},Co=function(x){return x.forceShouldAnimate!=null?x.forceShouldAnimate:x.mode==="SNAP"};function ds(v){var x=v.dimension,P=x.client,Z=v.offset,ce=v.combineWith,ue=v.dropping,ye=Boolean(ce),be=Co(v),Ue=Boolean(ue),We=Ue?oa.drop(Z,ye):oa.moveTo(Z),Ge={position:"fixed",top:P.marginBox.top,left:P.marginBox.left,boxSizing:"border-box",width:P.borderBox.width,height:P.borderBox.height,transition:_o(be,ue),transform:We,opacity:wo(ye,Ue),zIndex:Ue?cs.dropAnimating:cs.dragging,pointerEvents:"none"};return Ge}function wA(v){return{transform:oa.moveTo(v.offset),transition:v.shouldAnimateDisplacement?null:"none"}}function CA(v){return v.type==="DRAGGING"?ds(v):wA(v)}function TA(v,x,P){P===void 0&&(P=Te);var Z=window.getComputedStyle(x),ce=x.getBoundingClientRect(),ue=E(ce,Z),ye=b(ue,P),be={client:ue,tagName:x.tagName.toLowerCase(),display:Z.display},Ue={x:ue.marginBox.width,y:ue.marginBox.height},We={descriptor:v,placeholder:be,displaceBy:Ue,client:ue,page:ye};return We}function xA(v){var x=Xa("draggable"),P=v.descriptor,Z=v.registry,ce=v.getDraggableRef,ue=v.canDragInteractiveElements,ye=v.shouldRespectForcePress,be=v.isEnabled,Ue=I(function(){return{canDragInteractiveElements:ue,shouldRespectForcePress:ye,isEnabled:be}},[ue,be,ye]),We=d(function(Ve){var qe=ce();return qe||D(!1),TA(P,qe,Ve)},[P,ce]),Ge=I(function(){return{uniqueId:x,descriptor:P,options:Ue,getDimension:We}},[P,We,Ue,x]),Ne=Object(fe.useRef)(Ge),Fe=Object(fe.useRef)(!0);hn(function(){return Z.draggable.register(Ne.current),function(){return Z.draggable.unregister(Ne.current)}},[Z.draggable]),hn(function(){if(Fe.current){Fe.current=!1;return}var Ve=Ne.current;Ne.current=Ge,Z.draggable.update(Ge,Ve)},[Ge,Z.draggable])}function Ta(v,x,P){Qi(function(){function Z(ue){return"Draggable[id: "+ue+"]: "}var ce=v.draggableId;if(ce||D(!1),typeof ce=="string"||D(!1),Ee(v.index)||D(!1),v.mapped.type==="DRAGGING")return;Eo(P()),v.isEnabled&&(qs(x,ce)||D(!1))})}function xa(v){Ya(function(){var x=Object(fe.useRef)(v);Qi(function(){v===x.current||D(!1)},[v])})}function BA(v){v.preventDefault()}function To(v){var x=Object(fe.useRef)(null),P=d(function(_r){x.current=_r},[]),Z=d(function(){return x.current},[]),ce=ji(ki),ue=ce.contextId,ye=ce.dragHandleUsageInstructionsId,be=ce.registry,Ue=ji(Gi),We=Ue.type,Ge=Ue.droppableId,Ne=I(function(){return{id:v.draggableId,index:v.index,type:We,droppableId:Ge}},[v.draggableId,v.index,We,Ge]),Fe=v.children,Ve=v.draggableId,qe=v.isEnabled,Et=v.shouldRespectForcePress,mt=v.canDragInteractiveElements,Ct=v.isClone,Bt=v.mapped,Kt=v.dropAnimationFinished;if(Ta(v,ue,Z),xa(Ct),!Ct){var Gt=I(function(){return{descriptor:Ne,registry:be,getDraggableRef:Z,canDragInteractiveElements:mt,shouldRespectForcePress:Et,isEnabled:qe}},[Ne,be,Z,mt,Et,qe]);xA(Gt)}var hr=I(function(){return qe?{tabIndex:0,role:"button","aria-describedby":ye,"data-rbd-drag-handle-draggable-id":Ve,"data-rbd-drag-handle-context-id":ue,draggable:!1,onDragStart:BA}:null},[ue,ye,Ve,qe]),ar=d(function(_r){if(Bt.type!=="DRAGGING")return;if(!Bt.dropping)return;if(_r.propertyName!=="transform")return;Kt()},[Kt,Bt]),Lr=I(function(){var _r=CA(Bt),Jr=Bt.type==="DRAGGING"&&Bt.dropping?ar:null,on={innerRef:P,draggableProps:{"data-rbd-draggable-context-id":ue,"data-rbd-draggable-id":Ve,style:_r,onTransitionEnd:Jr},dragHandleProps:hr};return on},[ue,hr,Ve,Bt,ar,P]),an=I(function(){return{draggableId:Ne.id,type:Ne.type,source:{index:Ne.index,droppableId:Ne.droppableId}}},[Ne.droppableId,Ne.id,Ne.index,Ne.type]);return Fe(Lr,Bt.snapshot,an)}var Ba=function(v,x){return v===x},hs=function(v){var x=v.combine,P=v.destination;return P?P.droppableId:x?x.droppableId:null},xo=function(x){return x.combine?x.combine.draggableId:null},Bo=function(x){return x.at&&x.at.type==="COMBINE"?x.at.combine.draggableId:null};function SA(){var v=u(function(ce,ue){return{x:ce,y:ue}}),x=u(function(ce,ue,ye,be,Ue){return{isDragging:!0,isClone:ue,isDropAnimating:Boolean(Ue),dropAnimation:Ue,mode:ce,draggingOver:ye,combineWith:be,combineTargetFor:null}}),P=u(function(ce,ue,ye,be,Ue,We,Ge){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:Ue,combineWith:We,mode:ue,offset:ce,dimension:ye,forceShouldAnimate:Ge,snapshot:x(ue,be,Ue,We,null)}}}),Z=function(ue,ye){if(ue.isDragging){if(ue.critical.draggable.id!==ye.draggableId)return null;var be=ue.current.client.offset,Ue=ue.dimensions.draggables[ye.draggableId],We=mr(ue.impact),Ge=Bo(ue.impact),Ne=ue.forceShouldAnimate;return P(v(be.x,be.y),ue.movementMode,Ue,ye.isClone,We,Ge,Ne)}if(ue.phase==="DROP_ANIMATING"){var Fe=ue.completed;if(Fe.result.draggableId!==ye.draggableId)return null;var Ve=ye.isClone,qe=ue.dimensions.draggables[ye.draggableId],Et=Fe.result,mt=Et.mode,Ct=hs(Et),Bt=xo(Et),Kt=ue.dropDuration,Gt={duration:Kt,curve:In.drop,moveTo:ue.newHomeClientOffset,opacity:Bt?Fn.opacity.drop:null,scale:Bt?Fn.scale.drop:null};return{mapped:{type:"DRAGGING",offset:ue.newHomeClientOffset,dimension:qe,dropping:Gt,draggingOver:Ct,combineWith:Bt,mode:mt,forceShouldAnimate:null,snapshot:x(mt,Ve,Ct,Bt,Gt)}}}return null};return Z}function Vi(v){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:v,combineWith:null}}var So={mapped:{type:"SECONDARY",offset:Te,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Vi(null)}};function Io(){var v=u(function(ye,be){return{x:ye,y:be}}),x=u(Vi),P=u(function(ye,be,Ue){return be===void 0&&(be=null),{mapped:{type:"SECONDARY",offset:ye,combineTargetFor:be,shouldAnimateDisplacement:Ue,snapshot:x(be)}}}),Z=function(be){return be?P(Te,be,!0):null},ce=function(be,Ue,We,Ge){var Ne=We.displaced.visible[be],Fe=Boolean(Ge.inVirtualList&&Ge.effected[be]),Ve=Ot(We),qe=Ve&&Ve.draggableId===be?Ue:null;if(!Ne){if(!Fe)return Z(qe);if(We.displaced.invisible[be])return null;var Et=rt(Ge.displacedBy.point),mt=v(Et.x,Et.y);return P(mt,qe,!0)}if(Fe)return Z(qe);var Ct=We.displacedBy.point,Bt=v(Ct.x,Ct.y);return P(Bt,qe,Ne.shouldAnimate)},ue=function(be,Ue){if(be.isDragging)return be.critical.draggable.id===Ue.draggableId?null:ce(Ue.draggableId,be.critical.draggable.id,be.impact,be.afterCritical);if(be.phase==="DROP_ANIMATING"){var We=be.completed;return We.result.draggableId===Ue.draggableId?null:ce(Ue.draggableId,We.result.draggableId,We.impact,We.afterCritical)}return null};return ue}var IA=function(){var x=SA(),P=Io(),Z=function(ue,ye){return x(ue,ye)||P(ue,ye)||So};return Z},OA={dropAnimationFinished:Un},Oo=Object(O.c)(IA,OA,null,{context:za,pure:!0,areStatePropsEqual:Ba})(To);function ri(v){var x=ji(Gi),P=x.isUsingCloneFor;return P===v.draggableId&&!v.isClone?null:W.a.createElement(Oo,v)}function fs(v){var x=typeof v.isDragDisabled=="boolean"?!v.isDragDisabled:!0,P=Boolean(v.disableInteractiveElementBlocking),Z=Boolean(v.shouldRespectForcePress);return W.a.createElement(ri,Object(V.a)({},v,{isClone:!1,isEnabled:x,canDragInteractiveElements:P,shouldRespectForcePress:Z}))}function Sa(v){var x=Object(fe.useContext)(ki);x||D(!1);var P=x.contextId,Z=x.isMovementAllowed,ce=Object(fe.useRef)(null),ue=Object(fe.useRef)(null),ye=v.children,be=v.droppableId,Ue=v.type,We=v.mode,Ge=v.direction,Ne=v.ignoreContainerClipping,Fe=v.isDropDisabled,Ve=v.isCombineEnabled,qe=v.snapshot,Et=v.useClone,mt=v.updateViewportMaxScroll,Ct=v.getContainerForClone,Bt=d(function(){return ce.current},[]),Kt=d(function(mn){ce.current=mn},[]),Gt=d(function(){return ue.current},[]),hr=d(function(mn){ue.current=mn},[]);EA({props:v,getDroppableRef:Bt,getPlaceholderRef:Gt});var ar=d(function(){Z()&&mt({maxScroll:ks()})},[Z,mt]);ls({droppableId:be,type:Ue,mode:We,direction:Ge,isDropDisabled:Fe,isCombineEnabled:Ve,ignoreContainerClipping:Ne,getDroppableRef:Bt});var Lr=W.a.createElement(_A,{on:v.placeholder,shouldAnimate:v.shouldAnimatePlaceholder},function(mn){var ni=mn.onClose,Mn=mn.data,vi=mn.animate;return W.a.createElement(bo,{placeholder:Mn,onClose:ni,innerRef:hr,animate:vi,contextId:P,onTransitionEnd:ar})}),an=I(function(){return{innerRef:Kt,placeholder:Lr,droppableProps:{"data-rbd-droppable-id":be,"data-rbd-droppable-context-id":P}}},[P,be,Lr,Kt]),_r=Et?Et.dragging.draggableId:null,Jr=I(function(){return{droppableId:be,type:Ue,isUsingCloneFor:_r}},[be,_r,Ue]);function on(){if(!Et)return null;var mn=Et.dragging,ni=Et.render,Mn=W.a.createElement(ri,{draggableId:mn.draggableId,index:mn.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(vi,zi){return ni(vi,zi,mn)});return F.a.createPortal(Mn,Ct())}return W.a.createElement(Gi.Provider,{value:Jr},ye(an,qe),on())}var ps=function(x,P){return x===P.droppable.type},Ro=function(x,P){return P.draggables[x.draggable.id]},RA=function(){var x={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},P=Object(V.a)({},x,{shouldAnimatePlaceholder:!1}),Z=u(function(ye){return{draggableId:ye.id,type:ye.type,source:{index:ye.index,droppableId:ye.droppableId}}}),ce=u(function(ye,be,Ue,We,Ge,Ne){var Fe=Ge.descriptor.id,Ve=Ge.descriptor.droppableId===ye;if(Ve){var qe=Ne?{render:Ne,dragging:Z(Ge.descriptor)}:null,Et={isDraggingOver:Ue,draggingOverWith:Ue?Fe:null,draggingFromThisWith:Fe,isUsingPlaceholder:!0};return{placeholder:Ge.placeholder,shouldAnimatePlaceholder:!1,snapshot:Et,useClone:qe}}if(!be)return P;if(!We)return x;var mt={isDraggingOver:Ue,draggingOverWith:Fe,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:Ge.placeholder,shouldAnimatePlaceholder:!0,snapshot:mt,useClone:null}}),ue=function(be,Ue){var We=Ue.droppableId,Ge=Ue.type,Ne=!Ue.isDropDisabled,Fe=Ue.renderClone;if(be.isDragging){var Ve=be.critical;if(!ps(Ge,Ve))return P;var qe=Ro(Ve,be.dimensions),Et=mr(be.impact)===We;return ce(We,Ne,Et,Et,qe,Fe)}if(be.phase==="DROP_ANIMATING"){var mt=be.completed;if(!ps(Ge,mt.critical))return P;var Ct=Ro(mt.critical,be.dimensions);return ce(We,Ne,hs(mt.result)===We,mr(mt.impact)===We,Ct,Fe)}if(be.phase==="IDLE"&&be.completed&&!be.shouldFlush){var Bt=be.completed;if(!ps(Ge,Bt.critical))return P;var Kt=mr(Bt.impact)===We,Gt=Boolean(Bt.impact.at&&Bt.impact.at.type==="COMBINE"),hr=Bt.critical.droppable.id===We;return Kt?Gt?x:P:hr?x:P}return P};return ue},DA={updateViewportMaxScroll:ws};function Do(){return document.body||D(!1),document.body}var gs={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:Do},ms=Object(O.c)(RA,DA,null,{context:za,pure:!0,areStatePropsEqual:Ba})(Sa);ms.defaultProps=gs},nnTU:function(ft,Oe,K){"use strict";K.d(Oe,"b",function(){return q}),K.d(Oe,"a",function(){return k});var fe=K("MI8n"),W=K("JYp7"),L=K("pmY6"),V=K("24hK"),U=K("746U"),O=K("Cg/j");const q=Object(O.c)("commandService"),k=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new fe.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,I){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!I)throw new Error("invalid command");return this.registerCommand({id:e,handler:I})}if(e.description){const i=[];for(let n of e.description.args)i.push(n.constraint);const o=e.handler;e.handler=function(n,...a){return Object(U.o)(a,i),o(n,...a)}}const{id:d}=e;let p=this._commands.get(d);p||(p=new V.a,this._commands.set(d,p));let A=p.unshift(e),s=Object(L.i)(()=>{A();const i=this._commands.get(d);(i==null?void 0:i.isEmpty())&&this._commands.delete(d)});return this._onDidRegisterCommand.fire(d),s}registerCommandAlias(e,I){return k.registerCommand(e,(d,...p)=>d.get(q).executeCommand(I,...p))}getCommand(e){const I=this._commands.get(e);return!I||I.isEmpty()?void 0:W.a.first(I)}getCommands(){const e=new Map;for(const I of this._commands.keys()){const d=this.getCommand(I);d&&e.set(I,d)}return e}};k.registerCommand("noop",()=>{})},p5ED:function(ft,Oe,K){"use strict";var fe=K("+L6B"),W=K("2/Rp"),L=K("5Dmo"),V=K("3S7+"),U=K("k1fw"),O=K("9og8"),q=K("tJVT"),k=K("WmNS"),e=K.n(k),I=K("q1tI"),d=K.n(I),p=K("vHTk"),A=K.n(p),s=K("yEEn"),i=K("ZW9T"),o=K("1vsH"),n=K("V0Rq"),a=K("m3rI");Oe.a=function(r){var t,y,b,E,T,C,h,c=r.editOffice,l=c===void 0?"view":c,u=r.data,_=r.theme,g=r.type,m=r.filename,F=r.monacoEditor,H=r.className,B=r.style,Q=r.close,z=r.onClose,N=r.hasMask,ee=r.disabledDownload,le=Object(I.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),Be=Object(q.a)(le,2),Ce=Be[0],Me=Be[1],Le=Object(I.useState)(""),je=Object(q.a)(Le,2),He=je[0],Je=je[1],Se=Object(I.useState)(),$=Object(q.a)(Se,2),D=$[0],M=$[1],te=window.ENV==="build"?"/react/build":"",oe=a.a.PROXY_SERVER||location.origin,G,re=1024*1024,j=10*re,J=Object(I.useRef)();(t=u)!==null&&t!==void 0&&t.startsWith("/api")&&g!=="txt"&&(u=a.a.API_SERVER+u),g==="office"&&(G=Object(o.T)(u).filesize,G>j&&(g="other")),m&&F&&(F.filename=m),Object(I.useEffect)(function(){var Te,Xe,Ze=(Te=document.cookie)===null||Te===void 0||((Xe=Te.replace(/\s/g,""))===null||Xe===void 0)?void 0:Xe.split(";");Ze==null||Ze.map(function(et){var rt=et.split("=");rt[0]==="_educoder_session"&&Je(rt[1])})},[]),Object(I.useEffect)(function(){g==="office"&&Y()},[g,u]);var Y=function(){var Te=Object(O.a)(e.a.mark(function Xe(){var Ze,et,rt;return e.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:return console.log("data:",u),Ze=u,u.startsWith("http")||(Ze=location.origin+Ze),et=new URL(Ze).pathname.split("/").pop(),pt.next=6,Object(n.V)({attachment_id:et});case 6:rt=pt.sent,M(rt);case 8:case"end":return pt.stop()}},Xe)}));return function(){return Te.apply(this,arguments)}}(),he=function(){if(u.startsWith("http")||u.startsWith("blob:")){we();return}Object(o.z)(m||"educoder",u,m)},we=function(){Object(o.x)(m||"educoder",decodeURIComponent(u))};return d.a.createElement("div",{style:Object(U.a)({},B||{}),className:"".concat(N&&A.a.bgBlack," ").concat(g?A.a.wrp:"hide")},Q&&d.a.createElement("div",{className:A.a.close,ref:J},!ee&&d.a.createElement(V.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return J.current}},d.a.createElement("span",{onClick:we},d.a.createElement("i",{className:"icon-quxiaozhiding"}))),d.a.createElement(V.a,{title:"\u5173\u95ED",getPopupContainer:function(){return J.current}},d.a.createElement("span",{className:"",onClick:z},d.a.createElement("i",{className:"icon-guanbi1"})))),d.a.createElement("div",{className:"".concat(A.a[H]," ").concat(H," ").concat(A.a.monaco," ").concat(g==="txt"?"show":"hide")},g==="txt"&&d.a.createElement(i.b,F)),g==="audio"&&d.a.createElement("audio",{src:"".concat(((y=u)===null||y===void 0?void 0:y.indexOf("http://"))>-1||((b=u)===null||b===void 0?void 0:b.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(u),autoPlay:!0}),g==="video"&&d.a.createElement(d.a.Fragment,null,((E=u)===null||E===void 0?void 0:E.indexOf("http"))>-1?d.a.createElement("video",{controls:!0,src:"".concat(u),autoPlay:!0}):d.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(u),autoPlay:!0})),g==="office"&&D&&d.a.createElement("iframe",{src:"".concat(te,"/office.html?key=").concat(D.key,"&url=").concat(oe+D.url,"&callbackUrl=").concat(oe+D.callbackUrl,"&fileType=").concat(D.fileType,"&title=").concat(D.title,"&model=").concat(l,"&officeServer=").concat(a.a.OFFICE_SERVER,"&disabledDownload=").concat(!!ee)}),g==="html"&&d.a.createElement("iframe",{src:u+"&disposition=inline"}),g==="pdf"&&d.a.createElement("iframe",{src:"".concat(te,"/js/pdfview/index.html?url=").concat(u,"&disabledDownload=").concat(!!ee)}),g==="image"&&d.a.createElement("img",{src:"".concat(((T=u)===null||T===void 0?void 0:T.indexOf("http://"))>-1||((C=u)===null||C===void 0?void 0:C.indexOf("https://"))>-1||(h=u)!==null&&h!==void 0&&h.startsWith("/api")?"":"data:image/png;base64,").concat(u)}),g==="other"&&d.a.createElement("div",null,d.a.createElement(W.a,{type:"primary",size:"large",onClick:he},d.a.createElement(s.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),g==="download"&&d.a.createElement(W.a,{type:"primary",size:"large",onClick:he},d.a.createElement(s.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},pmY6:function(ft,Oe,K){"use strict";K.d(Oe,"h",function(){return I}),K.d(Oe,"g",function(){return p}),K.d(Oe,"f",function(){return A}),K.d(Oe,"e",function(){return s}),K.d(Oe,"i",function(){return i}),K.d(Oe,"b",function(){return o}),K.d(Oe,"a",function(){return n}),K.d(Oe,"d",function(){return a}),K.d(Oe,"c",function(){return r});var fe=K("C/vA"),W=K("JYp7");const L=!1;let V=null;function U(t){V=t}if(L){const t="__is_disposable_tracked__";U(new class{trackDisposable(y){const b=new Error("Potentially leaked disposable").stack;setTimeout(()=>{y[t]||console.log(b)},3e3)}setParent(y,b){if(y&&y!==n.None)try{y[t]=!0}catch(E){}}markAsDisposed(y){if(y&&y!==n.None)try{y[t]=!0}catch(b){}}markAsSingleton(y){}})}function O(t){return V==null||V.trackDisposable(t),t}function q(t){V==null||V.markAsDisposed(t)}function k(t,y){V==null||V.setParent(t,y)}function e(t,y){if(!V)return;for(const b of t)V.setParent(b,y)}function I(t){return V==null||V.markAsSingleton(t),t}class d extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function p(t){return typeof t.dispose=="function"&&t.dispose.length===0}function A(t){if(W.a.is(t)){let y=[];for(const b of t)if(b)try{b.dispose()}catch(E){y.push(E)}if(y.length===1)throw y[0];if(y.length>1)throw new d(y);return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function s(...t){const y=i(()=>A(t));return e(t,y),y}function i(t){const y=O({dispose:Object(fe.a)(()=>{q(y),t()})});return y}class o{constructor(){this._toDispose=new Set,this._isDisposed=!1,O(this)}dispose(){if(this._isDisposed)return;q(this),this._isDisposed=!0,this.clear()}clear(){try{A(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return k(t,this),this._isDisposed?o.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}}o.DISABLE_DISPOSED_WARNING=!1;class n{constructor(){this._store=new o,O(this),k(this._store,this)}dispose(){q(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}n.None=Object.freeze({dispose(){}});class a{constructor(){this._isDisposed=!1,O(this)}get value(){return this._isDisposed?void 0:this._value}set value(t){var y;if(this._isDisposed||t===this._value)return;(y=this._value)===null||y===void 0||y.dispose(),t&&k(t,this),this._value=t}clear(){this.value=void 0}dispose(){var t;this._isDisposed=!0,q(this),(t=this._value)===null||t===void 0||t.dispose(),this._value=void 0}clearAndLeak(){const t=this._value;return this._value=void 0,t&&k(t,null),t}}class r{constructor(t){this.object=t}dispose(){}}},psGv:function(ft,Oe,K){var fe,W;(function(){var L;(function(){"use strict";var q=[,,function(d){function p(i){this.__parent=i,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}p.prototype.clone_empty=function(){var i=new p(this.__parent);return i.set_indent(this.__indent_count,this.__alignment_count),i},p.prototype.item=function(i){return i<0?this.__items[this.__items.length+i]:this.__items[i]},p.prototype.has_match=function(i){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(i))return!0;return!1},p.prototype.set_indent=function(i,o){this.is_empty()&&(this.__indent_count=i||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},p.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},p.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},p.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var i=this.__parent.current_line;return i.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),i.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),i.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,i.__items[0]===" "&&(i.__items.splice(0,1),i.__character_count-=1),!0}return!1},p.prototype.is_empty=function(){return this.__items.length===0},p.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},p.prototype.push=function(i){this.__items.push(i);var o=i.lastIndexOf(`
|
|
`);o!==-1?this.__character_count=i.length-o:this.__character_count+=i.length},p.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},p.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},p.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},p.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},p.prototype.toString=function(){var i="";return this.is_empty()?this.__parent.indent_empty_lines&&(i=this.__parent.get_indent_string(this.__indent_count)):(i=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),i+=this.__items.join("")),i};function A(i,o){this.__cache=[""],this.__indent_size=i.indent_size,this.__indent_string=i.indent_char,i.indent_with_tabs||(this.__indent_string=new Array(i.indent_size+1).join(i.indent_char)),o=o||"",i.indent_level>0&&(o=new Array(i.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}A.prototype.get_indent_size=function(i,o){var n=this.__base_string_length;return o=o||0,i<0&&(n=0),n+=i*this.__indent_size,n+=o,n},A.prototype.get_indent_string=function(i,o){var n=this.__base_string;return o=o||0,i<0&&(i=0,n=""),o+=i*this.__indent_size,this.__ensure_cache(o),n+=this.__cache[o],n},A.prototype.__ensure_cache=function(i){for(;i>=this.__cache.length;)this.__add_column()},A.prototype.__add_column=function(){var i=this.__cache.length,o=0,n="";this.__indent_size&&i>=this.__indent_size&&(o=Math.floor(i/this.__indent_size),i-=o*this.__indent_size,n=new Array(o+1).join(this.__indent_string)),i&&(n+=new Array(i+1).join(" ")),this.__cache.push(n)};function s(i,o){this.__indent_cache=new A(i,o),this.raw=!1,this._end_with_newline=i.end_with_newline,this.indent_size=i.indent_size,this.wrap_line_length=i.wrap_line_length,this.indent_empty_lines=i.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new p(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(i,o){return this.__indent_cache.get_indent_string(i,o)},s.prototype.get_indent_size=function(i,o){return this.__indent_cache.get_indent_size(i,o)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(i){return this.is_empty()||!i&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},s.prototype.get_code=function(i){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===`
|
|
`&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join(`
|
|
`);return i!==`
|
|
`&&(n=n.replace(/[\n]/g,i)),n},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.prototype.set_indent=function(i,o){return i=i||0,o=o||0,this.next_line.set_indent(i,o),this.__lines.length>1?(this.current_line.set_indent(i,o),!0):(this.current_line.set_indent(),!1)},s.prototype.add_raw_token=function(i){for(var o=0;o<i.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(i.whitespace_before),this.current_line.push(i.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},s.prototype.add_token=function(i){this.__add_space_before_token(),this.current_line.push(i),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},s.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},s.prototype.remove_indent=function(i){for(var o=this.__lines.length;i<o;)this.__lines[i]._remove_indent(),i++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(i){for(i=i===void 0?!1:i,this.current_line.trim();i&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(i,o){for(var n=this.__lines.length-2;n>=0;){var a=this.__lines[n];if(a.is_empty())break;if(a.item(0).indexOf(i)!==0&&a.item(-1)!==o){this.__lines.splice(n+1,0,new p(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},d.exports.Output=s},function(d){function p(A,s,i,o){this.type=A,this.text=s,this.comments_before=null,this.newlines=i||0,this.whitespace_before=o||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}d.exports.Token=p},,,function(d){function p(i,o){this.raw_options=A(i,o),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}p.prototype._get_array=function(i,o){var n=this.raw_options[i],a=o||[];return typeof n=="object"?n!==null&&typeof n.concat=="function"&&(a=n.concat()):typeof n=="string"&&(a=n.split(/[^a-zA-Z0-9_\/\-]+/)),a},p.prototype._get_boolean=function(i,o){var n=this.raw_options[i],a=n===void 0?!!o:!!n;return a},p.prototype._get_characters=function(i,o){var n=this.raw_options[i],a=o||"";return typeof n=="string"&&(a=n.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),a},p.prototype._get_number=function(i,o){var n=this.raw_options[i];o=parseInt(o,10),isNaN(o)&&(o=0);var a=parseInt(n,10);return isNaN(a)&&(a=o),a},p.prototype._get_selection=function(i,o,n){var a=this._get_selection_list(i,o,n);if(a.length!==1)throw new Error("Invalid Option Value: The option '"+i+`' can only be one of the following values:
|
|
`+o+`
|
|
You passed in: '`+this.raw_options[i]+"'");return a[0]},p.prototype._get_selection_list=function(i,o,n){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(n=n||[o[0]],!this._is_valid_selection(n,o))throw new Error("Invalid Default Value!");var a=this._get_array(i,n);if(!this._is_valid_selection(a,o))throw new Error("Invalid Option Value: The option '"+i+`' can contain only the following values:
|
|
`+o+`
|
|
You passed in: '`+this.raw_options[i]+"'");return a},p.prototype._is_valid_selection=function(i,o){return i.length&&o.length&&!i.some(function(n){return o.indexOf(n)===-1})};function A(i,o){var n={};i=s(i);var a;for(a in i)a!==o&&(n[a]=i[a]);if(o&&i[o])for(a in i[o])n[a]=i[o][a];return n}function s(i){var o={},n;for(n in i){var a=n.replace(/-/g,"_");o[a]=i[n]}return o}d.exports.Options=p,d.exports.normalizeOpts=s,d.exports.mergeOpts=A},,function(d){var p=RegExp.prototype.hasOwnProperty("sticky");function A(s){this.__input=s||"",this.__input_length=this.__input.length,this.__position=0}A.prototype.restart=function(){this.__position=0},A.prototype.back=function(){this.__position>0&&(this.__position-=1)},A.prototype.hasNext=function(){return this.__position<this.__input_length},A.prototype.next=function(){var s=null;return this.hasNext()&&(s=this.__input.charAt(this.__position),this.__position+=1),s},A.prototype.peek=function(s){var i=null;return s=s||0,s+=this.__position,s>=0&&s<this.__input_length&&(i=this.__input.charAt(s)),i},A.prototype.__match=function(s,i){s.lastIndex=i;var o=s.exec(this.__input);return o&&!(p&&s.sticky)&&(o.index!==i&&(o=null)),o},A.prototype.test=function(s,i){return i=i||0,i+=this.__position,i>=0&&i<this.__input_length?!!this.__match(s,i):!1},A.prototype.testChar=function(s,i){var o=this.peek(i);return s.lastIndex=0,o!==null&&s.test(o)},A.prototype.match=function(s){var i=this.__match(s,this.__position);return i?this.__position+=i[0].length:i=null,i},A.prototype.read=function(s,i,o){var n="",a;return s&&(a=this.match(s),a&&(n+=a[0])),i&&(a||!s)&&(n+=this.readUntil(i,o)),n},A.prototype.readUntil=function(s,i){var o="",n=this.__position;s.lastIndex=this.__position;var a=s.exec(this.__input);return a?(n=a.index,i&&(n+=a[0].length)):n=this.__input_length,o=this.__input.substring(this.__position,n),this.__position=n,o},A.prototype.readUntilAfter=function(s){return this.readUntil(s,!0)},A.prototype.get_regexp=function(s,i){var o=null,n="g";return i&&p&&(n="y"),typeof s=="string"&&s!==""?o=new RegExp(s,n):s&&(o=new RegExp(s.source,n)),o},A.prototype.get_literal_regexp=function(s){return RegExp(s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},A.prototype.peekUntilAfter=function(s){var i=this.__position,o=this.readUntilAfter(s);return this.__position=i,o},A.prototype.lookBack=function(s){var i=this.__position-1;return i>=s.length&&this.__input.substring(i-s.length,i).toLowerCase()===s},d.exports.InputScanner=A},function(d,p,A){var s=A(8).InputScanner,i=A(3).Token,o=A(10).TokenStream,n=A(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(t,y){this._input=new s(t),this._options=y||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new n(this._input)};r.prototype.tokenize=function(){this._input.restart(),this.__tokens=new o,this._reset();for(var t,y=new i(a.START,""),b=null,E=[],T=new o;y.type!==a.EOF;){for(t=this._get_next_token(y,b);this._is_comment(t);)T.add(t),t=this._get_next_token(y,b);T.isEmpty()||(t.comments_before=T,T=new o),t.parent=b,this._is_opening(t)?(E.push(b),b=t):b&&this._is_closing(t,b)&&(t.opened=b,b.closed=t,b=E.pop(),t.parent=b),t.previous=y,y.next=t,this.__tokens.add(t),y=t}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(t,y){this._readWhitespace();var b=this._input.read(/.+/g);return b?this._create_token(a.RAW,b):this._create_token(a.EOF,"")},r.prototype._is_comment=function(t){return!1},r.prototype._is_opening=function(t){return!1},r.prototype._is_closing=function(t,y){return!1},r.prototype._create_token=function(t,y){var b=new i(t,y,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return b},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},d.exports.Tokenizer=r,d.exports.TOKEN=a},function(d){function p(A){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=A}p.prototype.restart=function(){this.__position=0},p.prototype.isEmpty=function(){return this.__tokens_length===0},p.prototype.hasNext=function(){return this.__position<this.__tokens_length},p.prototype.next=function(){var A=null;return this.hasNext()&&(A=this.__tokens[this.__position],this.__position+=1),A},p.prototype.peek=function(A){var s=null;return A=A||0,A+=this.__position,A>=0&&A<this.__tokens_length&&(s=this.__tokens[A]),s},p.prototype.add=function(A){this.__parent_token&&(A.parent=this.__parent_token),this.__tokens.push(A),this.__tokens_length+=1},d.exports.TokenStream=p},function(d,p,A){var s=A(12).Pattern;function i(o,n){s.call(this,o,n),n?this._line_regexp=this._input.get_regexp(n._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}i.prototype=new s,i.prototype.__set_whitespace_patterns=function(o,n){o+="\\t ",n+="\\n\\r",this._match_pattern=this._input.get_regexp("["+o+n+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+n+"]")},i.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var o=this._input.read(this._match_pattern);if(o===" ")this.whitespace_before_token=" ";else if(o){var n=this.__split(this._newline_regexp,o);this.newline_count=n.length-1,this.whitespace_before_token=n[this.newline_count]}return o},i.prototype.matching=function(o,n){var a=this._create();return a.__set_whitespace_patterns(o,n),a._update(),a},i.prototype._create=function(){return new i(this._input,this)},i.prototype.__split=function(o,n){o.lastIndex=0;for(var a=0,r=[],t=o.exec(n);t;)r.push(n.substring(a,t.index)),a=t.index+t[0].length,t=o.exec(n);return a<n.length?r.push(n.substring(a,n.length)):r.push(""),r},d.exports.WhitespacePattern=i},function(d){function p(A,s){this._input=A,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,s&&(this._starting_pattern=this._input.get_regexp(s._starting_pattern,!0),this._match_pattern=this._input.get_regexp(s._match_pattern,!0),this._until_pattern=this._input.get_regexp(s._until_pattern),this._until_after=s._until_after)}p.prototype.read=function(){var A=this._input.read(this._starting_pattern);return(!this._starting_pattern||A)&&(A+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),A},p.prototype.read_match=function(){return this._input.match(this._match_pattern)},p.prototype.until_after=function(A){var s=this._create();return s._until_after=!0,s._until_pattern=this._input.get_regexp(A),s._update(),s},p.prototype.until=function(A){var s=this._create();return s._until_after=!1,s._until_pattern=this._input.get_regexp(A),s._update(),s},p.prototype.starting_with=function(A){var s=this._create();return s._starting_pattern=this._input.get_regexp(A,!0),s._update(),s},p.prototype.matching=function(A){var s=this._create();return s._match_pattern=this._input.get_regexp(A,!0),s._update(),s},p.prototype._create=function(){return new p(this._input,this)},p.prototype._update=function(){},d.exports.Pattern=p},function(d){function p(A,s){A=typeof A=="string"?A:A.source,s=typeof s=="string"?s:s.source,this.__directives_block_pattern=new RegExp(A+/ beautify( \w+[:]\w+)+ /.source+s,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(A+/\sbeautify\signore:end\s/.source+s,"g")}p.prototype.get_directives=function(A){if(!A.match(this.__directives_block_pattern))return null;var s={};this.__directive_pattern.lastIndex=0;for(var i=this.__directive_pattern.exec(A);i;)s[i[1]]=i[2],i=this.__directive_pattern.exec(A);return s},p.prototype.readIgnored=function(A){return A.readUntilAfter(this.__directives_end_ignore_pattern)},d.exports.Directives=p},function(d,p,A){var s=A(12).Pattern,i={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function o(n,a){s.call(this,n,a),this.__template_pattern=null,this._disabled=Object.assign({},i),this._excluded=Object.assign({},i),a&&(this.__template_pattern=this._input.get_regexp(a.__template_pattern),this._excluded=Object.assign(this._excluded,a._excluded),this._disabled=Object.assign(this._disabled,a._disabled));var r=new s(n);this.__patterns={handlebars_comment:r.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:r.starting_with(/{{{/).until_after(/}}}/),handlebars:r.starting_with(/{{/).until_after(/}}/),php:r.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:r.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:r.starting_with(/{%/).until_after(/%}/),django_value:r.starting_with(/{{/).until_after(/}}/),django_comment:r.starting_with(/{#/).until_after(/#}/),smarty:r.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:r.starting_with(/{\*/).until_after(/\*}/),smarty_literal:r.starting_with(/{literal}/).until_after(/{\/literal}/)}}o.prototype=new s,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(n){var a=this._create();return a._disabled[n]=!0,a._update(),a},o.prototype.read_options=function(n){var a=this._create();for(var r in i)a._disabled[r]=n.templating.indexOf(r)===-1;return a._update(),a},o.prototype.exclude=function(n){var a=this._create();return a._excluded[n]=!0,a._update(),a},o.prototype.read=function(){var n="";this._match_pattern?n=this._input.read(this._starting_pattern):n=this._input.read(this._starting_pattern,this.__template_pattern);for(var a=this._read_template();a;)this._match_pattern?a+=this._input.read(this._match_pattern):a+=this._input.readUntil(this.__template_pattern),n+=a,a=this._read_template();return this._until_after&&(n+=this._input.readUntilAfter(this._until_pattern)),n},o.prototype.__set_templated_pattern=function(){var n=[];this._disabled.php||n.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||n.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||n.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(n.push(this.__patterns.django._starting_pattern.source),n.push(this.__patterns.django_value._starting_pattern.source),n.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||n.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&n.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+n.join("|")+")")},o.prototype._read_template=function(){var n="",a=this._input.peek();if(a==="<"){var r=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&r==="?"&&(n=n||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&r==="%"&&(n=n||this.__patterns.erb.read())}else a==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(n=n||this.__patterns.handlebars_comment.read(),n=n||this.__patterns.handlebars_unescaped.read(),n=n||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(n=n||this.__patterns.django_value.read()),this._excluded.django||(n=n||this.__patterns.django_comment.read(),n=n||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(n=n||this.__patterns.smarty_comment.read(),n=n||this.__patterns.smarty_literal.read(),n=n||this.__patterns.smarty.read()));return n},d.exports.TemplatablePattern=o},,,,function(d,p,A){var s=A(19).Beautifier,i=A(20).Options;function o(n,a,r,t){var y=new s(n,a,r,t);return y.beautify()}d.exports=o,d.exports.defaultOptions=function(){return new i}},function(d,p,A){var s=A(20).Options,i=A(2).Output,o=A(21).Tokenizer,n=A(21).TOKEN,a=/\r\n|[\r\n]/,r=/\r\n|[\r\n]/g,t=function(_,g){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=_.max_preserve_newlines,this.preserve_newlines=_.preserve_newlines,this._output=new i(_,g)};t.prototype.current_line_has_match=function(_){return this._output.current_line.has_match(_)},t.prototype.set_space_before_token=function(_,g){this._output.space_before_token=_,this._output.non_breaking_space=g},t.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},t.prototype.add_raw_token=function(_){this._output.add_raw_token(_)},t.prototype.print_preserved_newlines=function(_){var g=0;_.type!==n.TEXT&&_.previous.type!==n.TEXT&&(g=_.newlines?1:0),this.preserve_newlines&&(g=_.newlines<this.max_preserve_newlines+1?_.newlines:this.max_preserve_newlines+1);for(var m=0;m<g;m++)this.print_newline(m>0);return g!==0},t.prototype.traverse_whitespace=function(_){return _.whitespace_before||_.newlines?(this.print_preserved_newlines(_)||(this._output.space_before_token=!0),!0):!1},t.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},t.prototype.print_newline=function(_){this._output.add_new_line(_)},t.prototype.print_token=function(_){_.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(_.text))},t.prototype.indent=function(){this.indent_level++},t.prototype.get_full_indent=function(_){return _=this.indent_level+(_||0),_<1?"":this._output.get_indent_string(_)};var y=function(_){for(var g=null,m=_.next;m.type!==n.EOF&&_.closed!==m;){if(m.type===n.ATTRIBUTE&&m.text==="type"){m.next&&m.next.type===n.EQUALS&&m.next.next&&m.next.next.type===n.VALUE&&(g=m.next.next.text);break}m=m.next}return g},b=function(_,g){var m=null,F=null;return g.closed?(_==="script"?m="text/javascript":_==="style"&&(m="text/css"),m=y(g)||m,m.search("text/css")>-1?F="css":m.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?F="javascript":m.search(/(text|application|dojo)\/(x-)?(html)/)>-1?F="html":m.search(/test\/null/)>-1&&(F="null"),F):null};function E(_,g){return g.indexOf(_)!==-1}function T(_,g,m){this.parent=_||null,this.tag=g?g.tag_name:"",this.indent_level=m||0,this.parser_token=g||null}function C(_){this._printer=_,this._current_frame=null}C.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},C.prototype.record_tag=function(_){var g=new T(this._current_frame,_,this._printer.indent_level);this._current_frame=g},C.prototype._try_pop_frame=function(_){var g=null;return _&&(g=_.parser_token,this._printer.indent_level=_.indent_level,this._current_frame=_.parent),g},C.prototype._get_frame=function(_,g){for(var m=this._current_frame;m&&!(_.indexOf(m.tag)!==-1);){if(g&&g.indexOf(m.tag)!==-1){m=null;break}m=m.parent}return m},C.prototype.try_pop=function(_,g){var m=this._get_frame([_],g);return this._try_pop_frame(m)},C.prototype.indent_to_tag=function(_){var g=this._get_frame(_);g&&(this._printer.indent_level=g.indent_level)};function h(_,g,m,F){this._source_text=_||"",g=g||{},this._js_beautify=m,this._css_beautify=F,this._tag_stack=null;var H=new s(g,"html");this._options=H,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}h.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _=this._source_text,g=this._options.eol;this._options.eol==="auto"&&(g=`
|
|
`,_&&a.test(_)&&(g=_.match(a)[0])),_=_.replace(r,`
|
|
`);var m=_.match(/^[\t ]*/)[0],F={text:"",type:""},H=new c,B=new t(this._options,m),Q=new o(_,this._options).tokenize();this._tag_stack=new C(B);for(var z=null,N=Q.next();N.type!==n.EOF;)N.type===n.TAG_OPEN||N.type===n.COMMENT?(z=this._handle_tag_open(B,N,H,F),H=z):N.type===n.ATTRIBUTE||N.type===n.EQUALS||N.type===n.VALUE||N.type===n.TEXT&&!H.tag_complete?z=this._handle_inside_tag(B,N,H,Q):N.type===n.TAG_CLOSE?z=this._handle_tag_close(B,N,H):N.type===n.TEXT?z=this._handle_text(B,N,H):B.add_raw_token(N),F=z,N=Q.next();var ee=B._output.get_code(g);return ee},h.prototype._handle_tag_close=function(_,g,m){var F={text:g.text,type:g.type};return _.alignment_size=0,m.tag_complete=!0,_.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),m.is_unformatted?_.add_raw_token(g):(m.tag_start_char==="<"&&(_.set_space_before_token(g.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&m.has_wrapped_attrs&&_.print_newline(!1)),_.print_token(g)),m.indent_content&&!(m.is_unformatted||m.is_content_unformatted)&&(_.indent(),m.indent_content=!1),!m.is_inline_element&&!(m.is_unformatted||m.is_content_unformatted)&&_.set_wrap_point(),F},h.prototype._handle_inside_tag=function(_,g,m,F){var H=m.has_wrapped_attrs,B={text:g.text,type:g.type};if(_.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),m.is_unformatted)_.add_raw_token(g);else if(m.tag_start_char==="{"&&g.type===n.TEXT)_.print_preserved_newlines(g)?(g.newlines=0,_.add_raw_token(g)):_.print_token(g);else{if(g.type===n.ATTRIBUTE?(_.set_space_before_token(!0),m.attr_count+=1):(g.type===n.EQUALS||g.type===n.VALUE&&g.previous.type===n.EQUALS)&&_.set_space_before_token(!1),g.type===n.ATTRIBUTE&&m.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(_.traverse_whitespace(g),H=H||g.newlines!==0),this._is_wrap_attributes_force)){var Q=m.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&m.attr_count===1){var z=!0,N=0,ee;do{if(ee=F.peek(N),ee.type===n.ATTRIBUTE){z=!1;break}N+=1}while(N<4&&ee.type!==n.EOF&&ee.type!==n.TAG_CLOSE);Q=!z}Q&&(_.print_newline(!1),H=!0)}_.print_token(g),H=H||_.previous_token_wrapped(),m.has_wrapped_attrs=H}return B},h.prototype._handle_text=function(_,g,m){var F={text:g.text,type:"TK_CONTENT"};return m.custom_beautifier_name?this._print_custom_beatifier_text(_,g,m):m.is_unformatted||m.is_content_unformatted?_.add_raw_token(g):(_.traverse_whitespace(g),_.print_token(g)),F},h.prototype._print_custom_beatifier_text=function(_,g,m){var F=this;if(g.text!==""){var H=g.text,B,Q=1,z="",N="";m.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?B=this._js_beautify:m.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?B=this._css_beautify:m.custom_beautifier_name==="html"&&(B=function(Le,je){var He=new h(Le,je,F._js_beautify,F._css_beautify);return He.beautify()}),this._options.indent_scripts==="keep"?Q=0:this._options.indent_scripts==="separate"&&(Q=-_.indent_level);var ee=_.get_full_indent(Q);if(H=H.replace(/\n[ \t]*$/,""),m.custom_beautifier_name!=="html"&&H[0]==="<"&&H.match(/^(<!--|<!\[CDATA\[)/)){var le=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(H);if(!le){_.add_raw_token(g);return}z=ee+le[1]+`
|
|
`,H=le[4],le[5]&&(N=ee+le[5]),H=H.replace(/\n[ \t]*$/,""),(le[2]||le[3].indexOf(`
|
|
`)!==-1)&&(le=le[3].match(/[ \t]+$/),le&&(g.whitespace_before=le[0]))}if(H)if(B){var Be=function(){this.eol=`
|
|
`};Be.prototype=this._options.raw_options;var Ce=new Be;H=B(ee+H,Ce)}else{var Me=g.whitespace_before;Me&&(H=H.replace(new RegExp(`
|
|
(`+Me+")?","g"),`
|
|
`)),H=ee+H.replace(/\n/g,`
|
|
`+ee)}z&&(H?H=z+H+`
|
|
`+N:H=z+N),_.print_newline(!1),H&&(g.text=H,g.whitespace_before="",g.newlines=0,_.add_raw_token(g),_.print_newline(!0))}},h.prototype._handle_tag_open=function(_,g,m,F){var H=this._get_tag_open_token(g);return(m.is_unformatted||m.is_content_unformatted)&&!m.is_empty_element&&g.type===n.TAG_OPEN&&g.text.indexOf("</")===0?(_.add_raw_token(g),H.start_tag_token=this._tag_stack.try_pop(H.tag_name)):(_.traverse_whitespace(g),this._set_tag_position(_,g,H,m,F),H.is_inline_element||_.set_wrap_point(),_.print_token(g)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(H.alignment_size=g.text.length+1),!H.tag_complete&&!H.is_unformatted&&(_.alignment_size=H.alignment_size),H};var c=function(_,g){if(this.parent=_||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!g)this.tag_complete=!0;else{var m;this.tag_start_char=g.text[0],this.text=g.text,this.tag_start_char==="<"?(m=g.text.match(/^<([^\s>]*)/),this.tag_check=m?m[1]:""):(m=g.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=m?m[1]:"",(g.text.startsWith("{{#>")||g.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&g.next!==null?this.tag_check=g.next.text.split(" ")[0]:this.tag_check=g.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),g.type===n.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||g.closed&&g.closed.text==="/>";var F=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(F=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(F)))}};h.prototype._get_tag_open_token=function(_){var g=new c(this._tag_stack.get_parser_token(),_);return g.alignment_size=this._options.wrap_attributes_indent_size,g.is_end_tag=g.is_end_tag||E(g.tag_check,this._options.void_elements),g.is_empty_element=g.tag_complete||g.is_start_tag&&g.is_end_tag,g.is_unformatted=!g.tag_complete&&E(g.tag_check,this._options.unformatted),g.is_content_unformatted=!g.is_empty_element&&E(g.tag_check,this._options.content_unformatted),g.is_inline_element=E(g.tag_name,this._options.inline)||g.tag_name.includes("-")||g.tag_start_char==="{",g},h.prototype._set_tag_position=function(_,g,m,F,H){if(m.is_empty_element||(m.is_end_tag?m.start_tag_token=this._tag_stack.try_pop(m.tag_name):(this._do_optional_end_element(m)&&(m.is_inline_element||_.print_newline(!1)),this._tag_stack.record_tag(m),(m.tag_name==="script"||m.tag_name==="style")&&!(m.is_unformatted||m.is_content_unformatted)&&(m.custom_beautifier_name=b(m.tag_check,g)))),E(m.tag_check,this._options.extra_liners)&&(_.print_newline(!1),_._output.just_added_blankline()||_.print_newline(!0)),m.is_empty_element){if(m.tag_start_char==="{"&&m.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),m.indent_content=!0;var B=_.current_line_has_match(/{{#if/);B||_.print_newline(!1)}m.tag_name==="!--"&&H.type===n.TAG_CLOSE&&F.is_end_tag&&m.text.indexOf(`
|
|
`)===-1||(m.is_inline_element||m.is_unformatted||_.print_newline(!1),this._calcluate_parent_multiline(_,m))}else if(m.is_end_tag){var Q=!1;Q=m.start_tag_token&&m.start_tag_token.multiline_content,Q=Q||!m.is_inline_element&&!(F.is_inline_element||F.is_unformatted)&&!(H.type===n.TAG_CLOSE&&m.start_tag_token===F)&&H.type!=="TK_CONTENT",(m.is_content_unformatted||m.is_unformatted)&&(Q=!1),Q&&_.print_newline(!1)}else m.indent_content=!m.custom_beautifier_name,m.tag_start_char==="<"&&(m.tag_name==="html"?m.indent_content=this._options.indent_inner_html:m.tag_name==="head"?m.indent_content=this._options.indent_head_inner_html:m.tag_name==="body"&&(m.indent_content=this._options.indent_body_inner_html)),!(m.is_inline_element||m.is_unformatted)&&(H.type!=="TK_CONTENT"||m.is_content_unformatted)&&_.print_newline(!1),this._calcluate_parent_multiline(_,m)},h.prototype._calcluate_parent_multiline=function(_,g){g.parent&&_._output.just_added_newline()&&!((g.is_inline_element||g.is_unformatted)&&g.parent.is_inline_element)&&(g.parent.multiline_content=!0)};var l=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],u=["a","audio","del","ins","map","noscript","video"];h.prototype._do_optional_end_element=function(_){var g=null;if(_.is_empty_element||!_.is_start_tag||!_.parent)return;if(_.tag_name==="body")g=g||this._tag_stack.try_pop("head");else if(_.tag_name==="li")g=g||this._tag_stack.try_pop("li",["ol","ul"]);else if(_.tag_name==="dd"||_.tag_name==="dt")g=g||this._tag_stack.try_pop("dt",["dl"]),g=g||this._tag_stack.try_pop("dd",["dl"]);else if(_.parent.tag_name==="p"&&l.indexOf(_.tag_name)!==-1){var m=_.parent.parent;(!m||u.indexOf(m.tag_name)===-1)&&(g=g||this._tag_stack.try_pop("p"))}else _.tag_name==="rp"||_.tag_name==="rt"?(g=g||this._tag_stack.try_pop("rt",["ruby","rtc"]),g=g||this._tag_stack.try_pop("rp",["ruby","rtc"])):_.tag_name==="optgroup"?g=g||this._tag_stack.try_pop("optgroup",["select"]):_.tag_name==="option"?g=g||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):_.tag_name==="colgroup"?g=g||this._tag_stack.try_pop("caption",["table"]):_.tag_name==="thead"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"])):_.tag_name==="tbody"||_.tag_name==="tfoot"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("thead",["table"]),g=g||this._tag_stack.try_pop("tbody",["table"])):_.tag_name==="tr"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"]),g=g||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(_.tag_name==="th"||_.tag_name==="td")&&(g=g||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),g=g||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return _.parent=this._tag_stack.get_parser_token(),g},d.exports.Beautifier=h},function(d,p,A){var s=A(6).Options;function i(o){s.call(this,o,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}i.prototype=new s,d.exports.Options=i},function(d,p,A){var s=A(9).Tokenizer,i=A(9).TOKEN,o=A(13).Directives,n=A(14).TemplatablePattern,a=A(12).Pattern,r={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:i.START,RAW:i.RAW,EOF:i.EOF},t=new o(/<\!--/,/-->/),y=function(b,E){s.call(this,b,E),this._current_tag_name="";var T=new n(this._input).read_options(this._options),C=new a(this._input);if(this.__patterns={word:T.until(/[\n\r\t <]/),single_quote:T.until_after(/'/),double_quote:T.until_after(/"/),attribute:T.until(/[\n\r\t =>]|\/>/),element_name:T.until(/[\n\r\t >\/]/),handlebars_comment:C.starting_with(/{{!--/).until_after(/--}}/),handlebars:C.starting_with(/{{/).until_after(/}}/),handlebars_open:C.until(/[\n\r\t }]/),handlebars_raw_close:C.until(/}}/),comment:C.starting_with(/<!--/).until_after(/-->/),cdata:C.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:C.starting_with(/<!\[/).until_after(/]>/),processing:C.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var h=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=C.matching(h).until_after(h)}};y.prototype=new s,y.prototype._is_comment=function(b){return!1},y.prototype._is_opening=function(b){return b.type===r.TAG_OPEN},y.prototype._is_closing=function(b,E){return b.type===r.TAG_CLOSE&&E&&((b.text===">"||b.text==="/>")&&E.text[0]==="<"||b.text==="}}"&&E.text[0]==="{"&&E.text[1]==="{")},y.prototype._reset=function(){this._current_tag_name=""},y.prototype._get_next_token=function(b,E){var T=null;this._readWhitespace();var C=this._input.peek();return C===null?this._create_token(r.EOF,""):(T=T||this._read_open_handlebars(C,E),T=T||this._read_attribute(C,b,E),T=T||this._read_close(C,E),T=T||this._read_raw_content(C,b,E),T=T||this._read_content_word(C),T=T||this._read_comment_or_cdata(C),T=T||this._read_processing(C),T=T||this._read_open(C,E),T=T||this._create_token(r.UNKNOWN,this._input.next()),T)},y.prototype._read_comment_or_cdata=function(b){var E=null,T=null,C=null;if(b==="<"){var h=this._input.peek(1);h==="!"&&(T=this.__patterns.comment.read(),T?(C=t.get_directives(T),C&&C.ignore==="start"&&(T+=t.readIgnored(this._input))):T=this.__patterns.cdata.read()),T&&(E=this._create_token(r.COMMENT,T),E.directives=C)}return E},y.prototype._read_processing=function(b){var E=null,T=null,C=null;if(b==="<"){var h=this._input.peek(1);(h==="!"||h==="?")&&(T=this.__patterns.conditional_comment.read(),T=T||this.__patterns.processing.read()),T&&(E=this._create_token(r.COMMENT,T),E.directives=C)}return E},y.prototype._read_open=function(b,E){var T=null,C=null;return E||b==="<"&&(T=this._input.next(),this._input.peek()==="/"&&(T+=this._input.next()),T+=this.__patterns.element_name.read(),C=this._create_token(r.TAG_OPEN,T)),C},y.prototype._read_open_handlebars=function(b,E){var T=null,C=null;return E||this._options.indent_handlebars&&b==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(T=this.__patterns.handlebars_comment.read(),T=T||this.__patterns.handlebars.read(),C=this._create_token(r.COMMENT,T)):(T=this.__patterns.handlebars_open.read(),C=this._create_token(r.TAG_OPEN,T))),C},y.prototype._read_close=function(b,E){var T=null,C=null;return E&&(E.text[0]==="<"&&(b===">"||b==="/"&&this._input.peek(1)===">")?(T=this._input.next(),b==="/"&&(T+=this._input.next()),C=this._create_token(r.TAG_CLOSE,T)):E.text[0]==="{"&&b==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),C=this._create_token(r.TAG_CLOSE,"}}"))),C},y.prototype._read_attribute=function(b,E,T){var C=null,h="";if(T&&T.text[0]==="<")if(b==="=")C=this._create_token(r.EQUALS,this._input.next());else if(b==='"'||b==="'"){var c=this._input.next();b==='"'?c+=this.__patterns.double_quote.read():c+=this.__patterns.single_quote.read(),C=this._create_token(r.VALUE,c)}else h=this.__patterns.attribute.read(),h&&(E.type===r.EQUALS?C=this._create_token(r.VALUE,h):C=this._create_token(r.ATTRIBUTE,h));return C},y.prototype._is_content_unformatted=function(b){return this._options.void_elements.indexOf(b)===-1&&(this._options.content_unformatted.indexOf(b)!==-1||this._options.unformatted.indexOf(b)!==-1)},y.prototype._read_raw_content=function(b,E,T){var C="";if(T&&T.text[0]==="{")C=this.__patterns.handlebars_raw_close.read();else if(E.type===r.TAG_CLOSE&&E.opened.text[0]==="<"&&E.text[0]!=="/"){var h=E.opened.text.substr(1).toLowerCase();if(h==="script"||h==="style"){var c=this._read_comment_or_cdata(b);if(c)return c.type=r.TEXT,c;C=this._input.readUntil(new RegExp("</"+h+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(h)&&(C=this._input.readUntil(new RegExp("</"+h+"[\\n\\r\\t ]*?>","ig")))}return C?this._create_token(r.TEXT,C):null},y.prototype._read_content_word=function(b){var E="";if(this._options.unformatted_content_delimiter&&(b===this._options.unformatted_content_delimiter[0]&&(E=this.__patterns.unformatted_content_delimiter.read())),E||(E=this.__patterns.word.read()),E)return this._create_token(r.TEXT,E)},d.exports.Tokenizer=y,d.exports.TOKEN=r}],k={};function e(d){var p=k[d];if(p!==void 0)return p.exports;var A=k[d]={exports:{}};return q[d](A,A.exports,e),A.exports}var I=e(18);L=I})();var V=L;if(!0)!(fe=[K,K("6UM0"),K("TXwP")],W=function(q){var k=K("6UM0"),e=K("TXwP");return{html_beautify:function(I,d){return V(I,d,k.js_beautify,e.css_beautify)}}}.apply(Oe,fe),W!==void 0&&(ft.exports=W));else var U,O})()},"rAM+":function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return W});var fe=K("Qw5x");function W(L,V){var U;if(typeof Symbol=="undefined"||L[Symbol.iterator]==null){if(Array.isArray(L)||(U=Object(fe.a)(L))||V&&L&&typeof L.length=="number"){U&&(L=U);var O=0,q=function(){};return{s:q,n:function(){return O>=L.length?{done:!0}:{done:!1,value:L[O++]}},e:function(p){throw p},f:q}}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 k=!0,e=!1,I;return{s:function(){U=L[Symbol.iterator]()},n:function(){var p=U.next();return k=p.done,p},e:function(p){e=!0,I=p},f:function(){try{!k&&U.return!=null&&U.return()}finally{if(e)throw I}}}}},rUJ1:function(ft,Oe){const K=/[&<>"']/,fe=/[&<>"']/g,W=/[<>"']|&(?!#?\w+;)/,L=/[<>"']|&(?!#?\w+;)/g,V={"&":"&","<":"<",">":">",'"':""","'":"'"},U=C=>V[C];function O(C,h){if(h){if(K.test(C))return C.replace(fe,U)}else if(W.test(C))return C.replace(L,U);return C}const q=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function k(C){return C.replace(q,(h,c)=>(c=c.toLowerCase(),c==="colon"?":":c.charAt(0)==="#"?c.charAt(1)==="x"?String.fromCharCode(parseInt(c.substring(2),16)):String.fromCharCode(+c.substring(1)):""))}const e=/(^|[^\[])\^/g;function I(C,h){C=C.source||C,h=h||"";const c={replace:(l,u)=>(u=u.source||u,u=u.replace(e,"$1"),C=C.replace(l,u),c),getRegex:()=>new RegExp(C,h)};return c}const d=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function A(C,h,c){if(C){let l;try{l=decodeURIComponent(k(c)).replace(d,"").toLowerCase()}catch(u){return null}if(l.indexOf("javascript:")===0||l.indexOf("vbscript:")===0||l.indexOf("data:")===0)return null}h&&!p.test(c)&&(c=a(h,c));try{c=encodeURI(c).replace(/%25/g,"%")}catch(l){return null}return c}const s={},i=/^[^:]+:\/*[^/]*$/,o=/^([^:]+:)[\s\S]*$/,n=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(C,h){s[" "+C]||(i.test(C)?s[" "+C]=C+"/":s[" "+C]=b(C,"/",!0)),C=s[" "+C];const c=C.indexOf(":")===-1;return h.substring(0,2)==="//"?c?h:C.replace(o,"$1")+h:h.charAt(0)==="/"?c?h:C.replace(n,"$1")+h:C+h}const r={exec:function(){}};function t(C){let h=1,c,l;for(;h<arguments.length;h++){c=arguments[h];for(l in c)Object.prototype.hasOwnProperty.call(c,l)&&(C[l]=c[l])}return C}function y(C,h){const c=C.replace(/\|/g,(_,g,m)=>{let F=!1,H=g;for(;--H>=0&&m[H]==="\\";)F=!F;return F?"|":" |"}),l=c.split(/ \|/);let u=0;if(l.length>h)l.splice(h);else for(;l.length<h;)l.push("");for(;u<l.length;u++)l[u]=l[u].trim().replace(/\\\|/g,"|");return l}function b(C,h,c){const l=C.length;if(l===0)return"";let u=0;for(;u<l;){const _=C.charAt(l-u-1);if(_===h&&!c)u++;else if(_!==h&&c)u++;else break}return C.substr(0,l-u)}function E(C,h){if(C.indexOf(h[1])===-1)return-1;const c=C.length;let l=0,u=0;for(;u<c;u++)if(C[u]==="\\")u++;else if(C[u]===h[0])l++;else if(C[u]===h[1]&&(l--,l<0))return u;return-1}function T(C){C&&C.sanitize&&!C.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}ft.exports={escape:O,unescape:k,edit:I,cleanUrl:A,resolveUrl:a,noopTest:r,merge:t,splitCells:y,rtrim:b,findClosingBracket:E,checkSanitizeDeprecation:T}},"rd/4":function(ft,Oe,K){ft.exports=K.p+"static/noData.dc777645.png"},sR1s:function(ft,Oe,K){"use strict";K.d(Oe,"b",function(){return V}),K.d(Oe,"a",function(){return U}),K.d(Oe,"c",function(){return O}),K.d(Oe,"d",function(){return q});var fe=K("U8pU"),W="RC_TABLE_KEY";function L(k){return k==null?[]:Array.isArray(k)?k:[k]}function V(k,e){if(!e&&typeof e!="number")return k;for(var I=L(e),d=k,p=0;p<I.length;p+=1){if(!d)return null;var A=I[p];d=d[A]}return d}function U(k){var e=[],I={};return k.forEach(function(d){for(var p=d||{},A=p.key,s=p.dataIndex,i=A||L(s).join("-")||W;I[i];)i="".concat(i,"_next");I[i]=!0,e.push(i)}),e}function O(){var k={};function e(A,s){s&&Object.keys(s).forEach(function(i){var o=s[i];o&&Object(fe.a)(o)==="object"?(A[i]=A[i]||{},e(A[i],o)):A[i]=o})}for(var I=arguments.length,d=new Array(I),p=0;p<I;p++)d[p]=arguments[p];return d.forEach(function(A){e(k,A)}),k}function q(k){return k!=null}},sboe:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return L});var fe=K("q1tI"),W=K.n(fe),L=fe.createContext(null)},t23M:function(ft,Oe,K){"use strict";var fe=K("VTBJ"),W=K("1OyB"),L=K("vuIU"),V=K("Ji7U"),U=K("LK+K"),O=K("q1tI"),q=K.n(O),k=K("m+aA"),e=K("Zm9Q"),I=K("Kwbf"),d=K("c+Xe"),p=K("bdgK"),A="rc-observer-key",s=function(i){Object(V.a)(n,i);var o=Object(U.a)(n);function n(){var a;return Object(W.a)(this,n),a=o.apply(this,arguments),a.resizeObserver=null,a.childNode=null,a.currentElement=null,a.state={width:0,height:0,offsetHeight:0,offsetWidth:0},a.onResize=function(r){var t=a.props.onResize,y=r[0].target,b=y.getBoundingClientRect(),E=b.width,T=b.height,C=y.offsetWidth,h=y.offsetHeight,c=Math.floor(E),l=Math.floor(T);if(a.state.width!==c||a.state.height!==l||a.state.offsetWidth!==C||a.state.offsetHeight!==h){var u={width:c,height:l,offsetWidth:C,offsetHeight:h};a.setState(u),t&&Promise.resolve().then(function(){t(Object(fe.a)(Object(fe.a)({},u),{},{offsetWidth:C,offsetHeight:h}))})}},a.setChildNode=function(r){a.childNode=r},a}return Object(L.a)(n,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var r=this.props.disabled;if(r){this.destroyObserver();return}var t=Object(k.a)(this.childNode||this),y=t!==this.currentElement;y&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new p.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var r=this.props.children,t=Object(e.a)(r);if(t.length>1)Object(I.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(I.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var y=t[0];if(O.isValidElement(y)&&Object(d.c)(y)){var b=y.ref;t[0]=O.cloneElement(y,{ref:Object(d.a)(b,this.setChildNode)})}return t.length===1?t[0]:t.map(function(E,T){return!O.isValidElement(E)||"key"in E&&E.key!==null?E:O.cloneElement(E,{key:"".concat(A,"-").concat(T)})})}}]),n}(O.Component);s.displayName="ResizeObserver",Oe.a=s},t9D7:function(ft,Oe,K){"use strict";K.d(Oe,"b",function(){return q}),K.d(Oe,"g",function(){return e}),K.d(Oe,"d",function(){return I}),K.d(Oe,"e",function(){return d}),K.d(Oe,"a",function(){return p}),K.d(Oe,"f",function(){return i}),K.d(Oe,"c",function(){return o});var fe=K("Vhoy"),W=K("MI8n"),L=K("pmY6"),V=K("Cg/j"),U=K("ic2d"),O=K("nEHx");const q=Object(V.c)("themeService");var k;(function(n){function a(r){return r&&typeof r=="object"&&typeof r.id=="string"}n.isThemeColor=a})(k||(k={}));function e(n){return{id:n}}var I;(function(n){function a(T){return T&&typeof T=="object"&&typeof T.id=="string"&&(typeof T.color=="undefined"||k.isThemeColor(T.color))}n.isThemeIcon=a;const r=new RegExp(`^\\$\\((${fe.a.iconNameExpression}(?:${fe.a.iconModifierExpression})?)\\)$`);function t(T){const C=r.exec(T);if(!C)return;let[,h]=C;return{id:h}}n.fromString=t;function y(T,C){let h=T.id;const c=h.lastIndexOf("~");return c!==-1&&(h=h.substring(0,c)),C&&(h=`${h}~${C}`),{id:h}}n.modify=y;function b(T,C){var h,c;return T.id===C.id&&((h=T.color)===null||h===void 0?void 0:h.id)===((c=C.color)===null||c===void 0?void 0:c.id)}n.isEqual=b;function E(T,C){return{id:T.id,color:C?e(C):void 0}}n.asThemeIcon=E,n.asClassNameArray=fe.a.asClassNameArray,n.asClassName=fe.a.asClassName,n.asCSSSelector=fe.a.asCSSSelector})(I||(I={}));function d(n){switch(n){case O.a.DARK:return"vs-dark";case O.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const p={ThemingContribution:"base.contributions.theming"};class A{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new W.b}onColorThemeChange(n){return this.themingParticipants.push(n),this.onThemingParticipantAddedEmitter.fire(n),Object(L.i)(()=>{const a=this.themingParticipants.indexOf(n);this.themingParticipants.splice(a,1)})}getThemingParticipants(){return this.themingParticipants}}let s=new A;U.a.add(p.ThemingContribution,s);function i(n){return s.onColorThemeChange(n)}class o extends L.a{constructor(n){super();this.themeService=n,this.theme=n.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(a=>this.onThemeChange(a)))}onThemeChange(n){this.theme=n,this.updateStyles()}updateStyles(){}}},ulZh:function(ft,Oe,K){typeof window!="undefined"&&function(W,L){ft.exports=L()}(this,function(){return function(fe){var W={};function L(V){if(W[V])return W[V].exports;var U=W[V]={i:V,l:!1,exports:{}};return fe[V].call(U.exports,U,U.exports,L),U.l=!0,U.exports}return L.m=fe,L.c=W,L.d=function(V,U,O){L.o(V,U)||Object.defineProperty(V,U,{enumerable:!0,get:O})},L.r=function(V){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(V,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(V,"__esModule",{value:!0})},L.t=function(V,U){if(U&1&&(V=L(V)),U&8)return V;if(U&4&&typeof V=="object"&&V&&V.__esModule)return V;var O=Object.create(null);if(L.r(O),Object.defineProperty(O,"default",{enumerable:!0,value:V}),U&2&&typeof V!="string")for(var q in V)L.d(O,q,function(k){return V[k]}.bind(null,q));return O},L.n=function(V){var U=V&&V.__esModule?function(){return V.default}:function(){return V};return L.d(U,"a",U),U},L.o=function(V,U){return Object.prototype.hasOwnProperty.call(V,U)},L.p="/dist/",L(L.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(fe,W,L){"use strict";var V=Object.prototype.hasOwnProperty,U="~";function O(){}Object.create&&(O.prototype=Object.create(null),new O().__proto__||(U=!1));function q(d,p,A){this.fn=d,this.context=p,this.once=A||!1}function k(d,p,A,s,i){if(typeof A!="function")throw new TypeError("The listener must be a function");var o=new q(A,s||d,i),n=U?U+p:p;return d._events[n]?d._events[n].fn?d._events[n]=[d._events[n],o]:d._events[n].push(o):(d._events[n]=o,d._eventsCount++),d}function e(d,p){--d._eventsCount===0?d._events=new O:delete d._events[p]}function I(){this._events=new O,this._eventsCount=0}I.prototype.eventNames=function(){var p=[],A,s;if(this._eventsCount===0)return p;for(s in A=this._events)V.call(A,s)&&p.push(U?s.slice(1):s);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(A)):p},I.prototype.listeners=function(p){var A=U?U+p:p,s=this._events[A];if(!s)return[];if(s.fn)return[s.fn];for(var i=0,o=s.length,n=new Array(o);i<o;i++)n[i]=s[i].fn;return n},I.prototype.listenerCount=function(p){var A=U?U+p:p,s=this._events[A];return s?s.fn?1:s.length:0},I.prototype.emit=function(p,A,s,i,o,n){var a=U?U+p:p;if(!this._events[a])return!1;var r=this._events[a],t=arguments.length,y,b;if(r.fn){r.once&&this.removeListener(p,r.fn,void 0,!0);switch(t){case 1:return r.fn.call(r.context),!0;case 2:return r.fn.call(r.context,A),!0;case 3:return r.fn.call(r.context,A,s),!0;case 4:return r.fn.call(r.context,A,s,i),!0;case 5:return r.fn.call(r.context,A,s,i,o),!0;case 6:return r.fn.call(r.context,A,s,i,o,n),!0}for(b=1,y=new Array(t-1);b<t;b++)y[b-1]=arguments[b];r.fn.apply(r.context,y)}else{var E=r.length,T;for(b=0;b<E;b++){r[b].once&&this.removeListener(p,r[b].fn,void 0,!0);switch(t){case 1:r[b].fn.call(r[b].context);break;case 2:r[b].fn.call(r[b].context,A);break;case 3:r[b].fn.call(r[b].context,A,s);break;case 4:r[b].fn.call(r[b].context,A,s,i);break;default:if(!y)for(T=1,y=new Array(t-1);T<t;T++)y[T-1]=arguments[T];r[b].fn.apply(r[b].context,y)}}}return!0},I.prototype.on=function(p,A,s){return k(this,p,A,s,!1)},I.prototype.once=function(p,A,s){return k(this,p,A,s,!0)},I.prototype.removeListener=function(p,A,s,i){var o=U?U+p:p;if(!this._events[o])return this;if(!A)return e(this,o),this;var n=this._events[o];if(n.fn)n.fn===A&&(!i||n.once)&&(!s||n.context===s)&&e(this,o);else{for(var a=0,r=[],t=n.length;a<t;a++)(n[a].fn!==A||i&&!n[a].once||s&&n[a].context!==s)&&r.push(n[a]);r.length?this._events[o]=r.length===1?r[0]:r:e(this,o)}return this},I.prototype.removeAllListeners=function(p){var A;return p?(A=U?U+p:p,this._events[A]&&e(this,A)):(this._events=new O,this._eventsCount=0),this},I.prototype.off=I.prototype.removeListener,I.prototype.addListener=I.prototype.on,I.prefixed=U,I.EventEmitter=I,fe.exports=I},"./node_modules/url-toolkit/src/url-toolkit.js":function(fe,W,L){(function(V){var U=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,O=/^([^\/?#]*)([^]*)$/,q=/(?:\/|^)\.(?=\/)/g,k=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,e={buildAbsoluteURL:function(I,d,p){if(p=p||{},I=I.trim(),d=d.trim(),!d){if(!p.alwaysNormalize)return I;var A=e.parseURL(I);if(!A)throw new Error("Error trying to parse base URL.");return A.path=e.normalizePath(A.path),e.buildURLFromParts(A)}var s=e.parseURL(d);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return p.alwaysNormalize?(s.path=e.normalizePath(s.path),e.buildURLFromParts(s)):d;var i=e.parseURL(I);if(!i)throw new Error("Error trying to parse base URL.");if(!i.netLoc&&i.path&&i.path[0]!=="/"){var o=O.exec(i.path);i.netLoc=o[1],i.path=o[2]}i.netLoc&&!i.path&&(i.path="/");var n={scheme:i.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(n.netLoc=i.netLoc,s.path[0]!=="/"))if(!s.path)n.path=i.path,s.params||(n.params=i.params,s.query||(n.query=i.query));else{var a=i.path,r=a.substring(0,a.lastIndexOf("/")+1)+s.path;n.path=e.normalizePath(r)}return n.path===null&&(n.path=p.alwaysNormalize?e.normalizePath(s.path):s.path),e.buildURLFromParts(n)},parseURL:function(I){var d=U.exec(I);return d?{scheme:d[1]||"",netLoc:d[2]||"",path:d[3]||"",params:d[4]||"",query:d[5]||"",fragment:d[6]||""}:null},normalizePath:function(I){for(I=I.split("").reverse().join("").replace(q,"");I.length!==(I=I.replace(k,"")).length;);return I.split("").reverse().join("")},buildURLFromParts:function(I){return I.scheme+I.netLoc+I.path+I.params+I.query+I.fragment}};fe.exports=e})(this)},"./node_modules/webworkify-webpack/index.js":function(fe,W,L){function V(p){var A={};function s(o){if(A[o])return A[o].exports;var n=A[o]={i:o,l:!1,exports:{}};return p[o].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=p,s.c=A,s.i=function(o){return o},s.d=function(o,n,a){s.o(o,n)||Object.defineProperty(o,n,{configurable:!1,enumerable:!0,get:a})},s.r=function(o){Object.defineProperty(o,"__esModule",{value:!0})},s.n=function(o){var n=o&&o.__esModule?function(){return o.default}:function(){return o};return s.d(n,"a",n),n},s.o=function(o,n){return Object.prototype.hasOwnProperty.call(o,n)},s.p="/",s.oe=function(o){throw console.error(o),o};var i=s(s.s=ENTRY_MODULE);return i.default||i}var U="[\\.|\\-|\\+|\\w|/|@]+",O="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+U+").*?\\)";function q(p){return(p+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function k(p){return!isNaN(1*p)}function e(p,A,s){var i={};i[s]=[];var o=A.toString(),n=o.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!n)return i;for(var a=n[1],r=new RegExp("(\\\\n|\\W)"+q(a)+O,"g"),t;t=r.exec(o);){if(t[3]==="dll-reference")continue;i[s].push(t[3])}for(r=new RegExp("\\("+q(a)+'\\("(dll-reference\\s('+U+'))"\\)\\)'+O,"g");t=r.exec(o);)p[t[2]]||(i[s].push(t[1]),p[t[2]]=L(t[1]).m),i[t[2]]=i[t[2]]||[],i[t[2]].push(t[4]);for(var y=Object.keys(i),b=0;b<y.length;b++)for(var E=0;E<i[y[b]].length;E++)k(i[y[b]][E])&&(i[y[b]][E]=1*i[y[b]][E]);return i}function I(p){var A=Object.keys(p);return A.reduce(function(s,i){return s||p[i].length>0},!1)}function d(p,A){for(var s={main:[A]},i={main:[]},o={main:{}};I(s);)for(var n=Object.keys(s),a=0;a<n.length;a++){var r=n[a],t=s[r],y=t.pop();if(o[r]=o[r]||{},o[r][y]||!p[r][y])continue;o[r][y]=!0,i[r]=i[r]||[],i[r].push(y);for(var b=e(p,p[r][y],r),E=Object.keys(b),T=0;T<E.length;T++)s[E[T]]=s[E[T]]||[],s[E[T]]=s[E[T]].concat(b[E[T]])}return i}fe.exports=function(p,A){A=A||{};var s={main:L.m},i=A.all?{main:Object.keys(s.main)}:d(s,p),o="";Object.keys(i).filter(function(y){return y!=="main"}).forEach(function(y){for(var b=0;i[y][b];)b++;i[y].push(b),s[y][b]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",o=o+"var "+y+" = ("+V.toString().replace("ENTRY_MODULE",JSON.stringify(b))+")({"+i[y].map(function(E){return""+JSON.stringify(E)+": "+s[y][E].toString()}).join(",")+`});
|
|
`}),o=o+"new (("+V.toString().replace("ENTRY_MODULE",JSON.stringify(p))+")({"+i.main.map(function(y){return""+JSON.stringify(y)+": "+s.main[y].toString()}).join(",")+"}))(self);";var n=new window.Blob([o],{type:"text/javascript"});if(A.bare)return n;var a=window.URL||window.webkitURL||window.mozURL||window.msURL,r=a.createObjectURL(n),t=new window.Worker(r);return t.objectURL=r,t}},"./src/config.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"hlsDefaultConfig",function(){return T}),L.d(W,"mergeConfig",function(){return h}),L.d(W,"enableStreamingMode",function(){return c});var V=L("./src/controller/abr-controller.ts"),U=L("./src/controller/audio-stream-controller.ts"),O=L("./src/controller/audio-track-controller.ts"),q=L("./src/controller/subtitle-stream-controller.ts"),k=L("./src/controller/subtitle-track-controller.ts"),e=L("./src/controller/buffer-controller.ts"),I=L("./src/controller/timeline-controller.ts"),d=L("./src/controller/cap-level-controller.ts"),p=L("./src/controller/fps-controller.ts"),A=L("./src/controller/eme-controller.ts"),s=L("./src/controller/cmcd-controller.ts"),i=L("./src/utils/xhr-loader.ts"),o=L("./src/utils/fetch-loader.ts"),n=L("./src/utils/cues.ts"),a=L("./src/utils/mediakeys-helper.ts"),r=L("./src/utils/logger.ts");function t(){return t=Object.assign||function(l){for(var u=1;u<arguments.length;u++){var _=arguments[u];for(var g in _)Object.prototype.hasOwnProperty.call(_,g)&&(l[g]=_[g])}return l},t.apply(this,arguments)}function y(l,u){var _=Object.keys(l);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(l);u&&(g=g.filter(function(m){return Object.getOwnPropertyDescriptor(l,m).enumerable})),_.push.apply(_,g)}return _}function b(l){for(var u=1;u<arguments.length;u++){var _=arguments[u]!=null?arguments[u]:{};u%2?y(Object(_),!0).forEach(function(g){E(l,g,_[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(_)):y(Object(_)).forEach(function(g){Object.defineProperty(l,g,Object.getOwnPropertyDescriptor(_,g))})}return l}function E(l,u,_){return u in l?Object.defineProperty(l,u,{value:_,enumerable:!0,configurable:!0,writable:!0}):l[u]=_,l}var T=b(b({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:i.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:V.default,bufferController:e.default,capLevelController:d.default,fpsController:p.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:a.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},C()),{},{subtitleStreamController:q.SubtitleStreamController,subtitleTrackController:k.default,timelineController:I.TimelineController,audioStreamController:U.default,audioTrackController:O.default,emeController:A.default,cmcdController:s.default});function C(){return{cueHandler:n.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function h(l,u){if((u.liveSyncDurationCount||u.liveMaxLatencyDurationCount)&&(u.liveSyncDuration||u.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(u.liveMaxLatencyDurationCount!==void 0&&(u.liveSyncDurationCount===void 0||u.liveMaxLatencyDurationCount<=u.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(u.liveMaxLatencyDuration!==void 0&&(u.liveSyncDuration===void 0||u.liveMaxLatencyDuration<=u.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},l,u)}function c(l){var u=l.loader;if(u!==o.default&&u!==i.default)r.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),l.progressive=!1;else{var _=Object(o.fetchSupported)();_&&(l.loader=o.default,l.progressive=!0,l.enableSoftwareAES=!0,r.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/polyfills/number.ts"),U=L("./src/utils/ewma-bandwidth-estimator.ts"),O=L("./src/events.ts"),q=L("./src/utils/buffer-helper.ts"),k=L("./src/errors.ts"),e=L("./src/types/loader.ts"),I=L("./src/utils/logger.ts");function d(s,i){for(var o=0;o<i.length;o++){var n=i[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,n.key,n)}}function p(s,i,o){return i&&d(s.prototype,i),o&&d(s,o),s}var A=function(){function s(o){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=o;var n=o.config;this.bwEstimator=new U.default(n.abrEwmaSlowVoD,n.abrEwmaFastVoD,n.abrEwmaDefaultEstimate),this.registerListeners()}var i=s.prototype;return i.registerListeners=function(){var n=this.hls;n.on(O.Events.FRAG_LOADING,this.onFragLoading,this),n.on(O.Events.FRAG_LOADED,this.onFragLoaded,this),n.on(O.Events.FRAG_BUFFERED,this.onFragBuffered,this),n.on(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.on(O.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var n=this.hls;n.off(O.Events.FRAG_LOADING,this.onFragLoading,this),n.off(O.Events.FRAG_LOADED,this.onFragLoaded,this),n.off(O.Events.FRAG_BUFFERED,this.onFragBuffered,this),n.off(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),n.off(O.Events.ERROR,this.onError,this)},i.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},i.onFragLoading=function(n,a){var r=a.frag;if(r.type===e.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=r,this.partCurrent=(t=a.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},i.onLevelLoaded=function(n,a){var r=this.hls.config;a.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD)},i._abandonRulesCheck=function(){var n=this.fragCurrent,a=this.partCurrent,r=this.hls,t=r.autoLevelEnabled,y=r.config,b=r.media;if(!n||!b)return;var E=a?a.stats:n.stats,T=a?a.duration:n.duration;if(E.aborted){I.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||b.paused||!b.playbackRate||!b.readyState)return;var C=performance.now()-E.loading.start,h=Math.abs(b.playbackRate);if(C<=500*T/h)return;var c=r.levels,l=r.minAutoLevel,u=c[n.level],_=E.total||Math.max(E.loaded,Math.round(T*u.maxBitrate/8)),g=Math.max(1,E.bwEstimate?E.bwEstimate/8:E.loaded*1e3/C),m=(_-E.loaded)/g,F=b.currentTime,H=(q.BufferHelper.bufferInfo(b,F,y.maxBufferHole).end-F)/h;if(H>=2*T/h||m<=H)return;var B=Number.POSITIVE_INFINITY,Q;for(Q=n.level-1;Q>l;Q--){var z=c[Q].maxBitrate;if(B=T*z/(8*.8*g),B<H)break}if(B>=m)return;var N=this.bwEstimator.getEstimate();I.logger.warn("Fragment "+n.sn+(a?" part "+a.index:"")+" of level "+n.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+Q+`
|
|
Current BW estimate: `+(Object(V.isFiniteNumber)(N)?(N/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+m.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+B.toFixed(3)+` s
|
|
Time to underbuffer: `+H.toFixed(3)+" s"),r.nextLoadLevel=Q,this.bwEstimator.sample(C,E.loaded),this.clearTimer(),n.loader&&(this.fragCurrent=this.partCurrent=null,n.loader.abort()),r.trigger(O.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,part:a,stats:E})},i.onFragLoaded=function(n,a){var r=a.frag,t=a.part;if(r.type===e.PlaylistLevelType.MAIN&&Object(V.isFiniteNumber)(r.sn)){var y=t?t.stats:r.stats,b=t?t.duration:r.duration;if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var E=this.hls.levels[r.level],T=(E.loaded?E.loaded.bytes:0)+y.loaded,C=(E.loaded?E.loaded.duration:0)+b;E.loaded={bytes:T,duration:C},E.realBitrate=Math.round(8*T/C)}if(r.bitrateTest){var h={stats:y,frag:r,part:t,id:r.type};this.onFragBuffered(O.Events.FRAG_BUFFERED,h),r.bitrateTest=!1}}},i.onFragBuffered=function(n,a){var r=a.frag,t=a.part,y=t?t.stats:r.stats;if(y.aborted)return;if(r.type!==e.PlaylistLevelType.MAIN||r.sn==="initSegment")return;var b=y.parsing.end-y.loading.start;this.bwEstimator.sample(b,y.loaded),y.bwEstimate=this.bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=b/1e3:this.bitrateTestDelay=0},i.onError=function(n,a){switch(a.details){case k.ErrorDetails.FRAG_LOAD_ERROR:case k.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},i.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},i.getNextABRAutoLevel=function(){var n=this.fragCurrent,a=this.partCurrent,r=this.hls,t=r.maxAutoLevel,y=r.config,b=r.minAutoLevel,E=r.media,T=a?a.duration:n?n.duration:0,C=E?E.currentTime:0,h=E&&E.playbackRate!==0?Math.abs(E.playbackRate):1,c=this.bwEstimator?this.bwEstimator.getEstimate():y.abrEwmaDefaultEstimate,l=(q.BufferHelper.bufferInfo(E,C,y.maxBufferHole).end-C)/h,u=this.findBestLevel(c,b,t,l,y.abrBandWidthFactor,y.abrBandWidthUpFactor);if(u>=0)return u;I.logger.trace((l?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var _=T?Math.min(T,y.maxStarvationDelay):y.maxStarvationDelay,g=y.abrBandWidthFactor,m=y.abrBandWidthUpFactor;if(!l){var F=this.bitrateTestDelay;if(F){var H=T?Math.min(T,y.maxLoadingDelay):y.maxLoadingDelay;_=H-F,I.logger.trace("bitrate test took "+Math.round(1e3*F)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*_)+" ms"),g=m=1}}return u=this.findBestLevel(c,b,t,l+_,g,m),Math.max(u,0)},i.findBestLevel=function(n,a,r,t,y,b){for(var E,T=this.fragCurrent,C=this.partCurrent,h=this.lastLoadedFragLevel,c=this.hls.levels,l=c[h],u=!!(l!=null&&(E=l.details)!==null&&E!==void 0&&E.live),_=l==null?void 0:l.codecSet,g=C?C.duration:T?T.duration:0,m=r;m>=a;m--){var F=c[m];if(!F||_&&F.codecSet!==_)continue;var H=F.details,B=(C?H==null?void 0:H.partTarget:H==null?void 0:H.averagetargetduration)||g,Q=void 0;m<=h?Q=y*n:Q=b*n;var z=c[m].maxBitrate,N=z*B/Q;if(I.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+m+"/"+Math.round(Q)+"/"+z+"/"+B+"/"+t+"/"+N),Q>z&&(!N||u&&!this.bitrateTestDelay||N<t))return m}return-1},p(s,[{key:"nextAutoLevel",get:function(){var n=this._nextAutoLevel,a=this.bwEstimator;if(n!==-1&&(!a||!a.canEstimate()))return n;var r=this.getNextABRAutoLevel();return n!==-1&&(r=Math.min(n,r)),r},set:function(n){this._nextAutoLevel=n}}]),s}();W.default=A},"./src/controller/audio-stream-controller.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/polyfills/number.ts"),U=L("./src/controller/base-stream-controller.ts"),O=L("./src/events.ts"),q=L("./src/utils/buffer-helper.ts"),k=L("./src/controller/fragment-tracker.ts"),e=L("./src/types/level.ts"),I=L("./src/types/loader.ts"),d=L("./src/loader/fragment.ts"),p=L("./src/demux/chunk-cache.ts"),A=L("./src/demux/transmuxer-interface.ts"),s=L("./src/types/transmuxer.ts"),i=L("./src/controller/fragment-finders.ts"),o=L("./src/utils/discontinuities.ts"),n=L("./src/errors.ts"),a=L("./src/utils/logger.ts");function r(){return r=Object.assign||function(T){for(var C=1;C<arguments.length;C++){var h=arguments[C];for(var c in h)Object.prototype.hasOwnProperty.call(h,c)&&(T[c]=h[c])}return T},r.apply(this,arguments)}function t(T,C){T.prototype=Object.create(C.prototype),T.prototype.constructor=T,y(T,C)}function y(T,C){return y=Object.setPrototypeOf||function(c,l){return c.__proto__=l,c},y(T,C)}var b=100,E=function(T){t(C,T);function C(c,l){var u;return u=T.call(this,c,l,"[audio-stream-controller]")||this,u.videoBuffer=null,u.videoTrackCC=-1,u.waitingVideoCC=-1,u.audioSwitch=!1,u.trackId=-1,u.waitingData=null,u.mainDetails=null,u.bufferFlushed=!1,u._registerListeners(),u}var h=C.prototype;return h.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},h._registerListeners=function(){var l=this.hls;l.on(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.on(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.on(O.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.on(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.on(O.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),l.on(O.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),l.on(O.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.on(O.Events.ERROR,this.onError,this),l.on(O.Events.BUFFER_RESET,this.onBufferReset,this),l.on(O.Events.BUFFER_CREATED,this.onBufferCreated,this),l.on(O.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),l.on(O.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.on(O.Events.FRAG_BUFFERED,this.onFragBuffered,this)},h._unregisterListeners=function(){var l=this.hls;l.off(O.Events.MEDIA_ATTACHED,this.onMediaAttached,this),l.off(O.Events.MEDIA_DETACHING,this.onMediaDetaching,this),l.off(O.Events.MANIFEST_LOADING,this.onManifestLoading,this),l.off(O.Events.LEVEL_LOADED,this.onLevelLoaded,this),l.off(O.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),l.off(O.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),l.off(O.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),l.off(O.Events.ERROR,this.onError,this),l.off(O.Events.BUFFER_RESET,this.onBufferReset,this),l.off(O.Events.BUFFER_CREATED,this.onBufferCreated,this),l.off(O.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),l.off(O.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),l.off(O.Events.FRAG_BUFFERED,this.onFragBuffered,this)},h.onInitPtsFound=function(l,u){var _=u.frag,g=u.id,m=u.initPTS;if(g==="main"){var F=_.cc;this.initPTS[_.cc]=m,this.log("InitPTS for cc: "+F+" found from main: "+m),this.videoTrackCC=F,this.state===U.State.WAITING_INIT_PTS&&this.tick()}},h.startLoad=function(l){if(!this.levels){this.startPosition=l,this.state=U.State.STOPPED;return}var u=this.lastCurrentTime;this.stopLoad(),this.setInterval(b),this.fragLoadError=0,u>0&&l===-1?(this.log("Override startPosition with lastCurrentTime @"+u.toFixed(3)),this.state=U.State.IDLE):(this.loadedmetadata=!1,this.state=U.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=l,this.tick()},h.doTick=function(){switch(this.state){case U.State.IDLE:this.doTickIdle();break;case U.State.WAITING_TRACK:{var l,u=this.levels,_=this.trackId,g=u==null||((l=u[_])===null||l===void 0)?void 0:l.details;if(g){if(this.waitForCdnTuneIn(g))break;this.state=U.State.WAITING_INIT_PTS}break}case U.State.FRAG_LOADING_WAITING_RETRY:{var m,F=performance.now(),H=this.retryDate;(!H||F>=H||(m=this.media)!==null&&m!==void 0&&m.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=U.State.IDLE);break}case U.State.WAITING_INIT_PTS:{var B=this.waitingData;if(B){var Q=B.frag,z=B.part,N=B.cache,ee=B.complete;if(this.initPTS[Q.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=U.State.FRAG_LOADING;var le=N.flush(),Be={frag:Q,part:z,payload:le,networkDetails:null};this._handleFragmentLoadProgress(Be),ee&&T.prototype._handleFragmentLoadComplete.call(this,Be)}else if(this.videoTrackCC!==this.waitingVideoCC)a.logger.log("Waiting fragment cc ("+Q.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var Ce=this.getLoadPosition(),Me=q.BufferHelper.bufferInfo(this.mediaBuffer,Ce,this.config.maxBufferHole),Le=Object(i.fragmentWithinToleranceTest)(Me.end,this.config.maxFragLookUpTolerance,Q);Le<0&&(a.logger.log("Waiting fragment cc ("+Q.cc+") @ "+Q.start+" cancelled because another fragment at "+Me.end+" is needed"),this.clearWaitingFragment())}}else this.state=U.State.IDLE}}this.onTickEnd()},h.clearWaitingFragment=function(){var l=this.waitingData;l&&(this.fragmentTracker.removeFragment(l.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=U.State.IDLE)},h.onTickEnd=function(){var l=this.media;if(!l||!l.readyState)return;var u=this.mediaBuffer?this.mediaBuffer:l,_=u.buffered;!this.loadedmetadata&&_.length&&(this.loadedmetadata=!0),this.lastCurrentTime=l.currentTime},h.doTickIdle=function(){var l,u,_=this.hls,g=this.levels,m=this.media,F=this.trackId,H=_.config;if(!g||!g[F])return;if(!m&&(this.startFragRequested||!H.startFragPrefetch))return;var B=g[F],Q=B.details;if(!Q||Q.live&&this.levelLastLoaded!==F||this.waitForCdnTuneIn(Q)){this.state=U.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,d.ElementaryStreamTypes.AUDIO,I.PlaylistLevelType.AUDIO));var z=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,I.PlaylistLevelType.AUDIO);if(z===null)return;var N=z.len,ee=this.getMaxBufferLength(),le=this.audioSwitch;if(N>=ee&&!le)return;if(!le&&this._streamEnded(z,Q)){_.trigger(O.Events.BUFFER_EOS,{type:"audio"}),this.state=U.State.ENDED;return}var Be=Q.fragments,Ce=Be[0].start,Me=z.end;if(le){var Le=this.getLoadPosition();Me=Le,Q.PTSKnown&&Le<Ce&&((z.end>Ce||z.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),m.currentTime=Ce+.05))}var je=this.getNextFragment(Me,Q);if(!je){this.bufferFlushed=!0;return}((l=je.decryptdata)===null||l===void 0?void 0:l.keyFormat)==="identity"&&!((u=je.decryptdata)!==null&&u!==void 0&&u.key)?this.loadKey(je,Q):this.loadFragment(je,Q,Me)},h.getMaxBufferLength=function(){var l=T.prototype.getMaxBufferLength.call(this),u=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,I.PlaylistLevelType.MAIN);return u===null?l:Math.max(l,u.len)},h.onMediaDetaching=function(){this.videoBuffer=null,T.prototype.onMediaDetaching.call(this)},h.onAudioTracksUpdated=function(l,u){var _=u.audioTracks;this.resetTransmuxer(),this.levels=_.map(function(g){return new e.Level(g)})},h.onAudioTrackSwitching=function(l,u){var _=!!u.url;this.trackId=u.id;var g=this.fragCurrent;g!=null&&g.loader&&g.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),_?this.setInterval(b):this.resetTransmuxer(),_?(this.audioSwitch=!0,this.state=U.State.IDLE):this.state=U.State.STOPPED,this.tick()},h.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},h.onLevelLoaded=function(l,u){this.mainDetails=u.details},h.onAudioTrackLoaded=function(l,u){var _,g=this.levels,m=u.details,F=u.id;if(!g){this.warn("Audio tracks were reset while loading level "+F);return}this.log("Track "+F+" loaded ["+m.startSN+","+m.endSN+"],duration:"+m.totalduration);var H=g[F],B=0;if(m.live||(_=H.details)!==null&&_!==void 0&&_.live){var Q=this.mainDetails;if(m.fragments[0]||(m.deltaUpdateFailed=!0),m.deltaUpdateFailed||!Q)return;!H.details&&m.hasProgramDateTime&&Q.hasProgramDateTime?(Object(o.alignMediaPlaylistByPDT)(m,Q),B=m.fragments[0].start):B=this.alignPlaylists(m,H.details)}H.details=m,this.levelLastLoaded=F,!this.startFragRequested&&(this.mainDetails||!m.live)&&this.setStartPosition(H.details,B),this.state===U.State.WAITING_TRACK&&!this.waitForCdnTuneIn(m)&&(this.state=U.State.IDLE),this.tick()},h._handleFragmentLoadProgress=function(l){var u,_=l.frag,g=l.part,m=l.payload,F=this.config,H=this.trackId,B=this.levels;if(!B){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+_.sn+" of level "+_.level+" will not be buffered");return}var Q=B[H];console.assert(Q,"Audio track is defined on fragment load progress");var z=Q.details;console.assert(z,"Audio track details are defined on fragment load progress");var N=F.defaultAudioCodec||Q.audioCodec||"mp4a.40.2",ee=this.transmuxer;ee||(ee=this.transmuxer=new A.default(this.hls,I.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var le=this.initPTS[_.cc],Be=(u=_.initSegment)===null||u===void 0?void 0:u.data;if(le!==void 0){var Ce=!1,Me=g?g.index:-1,Le=Me!==-1,je=new s.ChunkMetadata(_.level,_.sn,_.stats.chunkCount,m.byteLength,Me,Le);ee.push(m,Be,N,"",_,g,z.totalduration,Ce,je,le)}else{a.logger.log("Unknown video PTS for cc "+_.cc+", waiting for video PTS before demuxing audio frag "+_.sn+" of ["+z.startSN+" ,"+z.endSN+"],track "+H);var He=this.waitingData=this.waitingData||{frag:_,part:g,cache:new p.default,complete:!1},Je=He.cache;Je.push(new Uint8Array(m)),this.waitingVideoCC=this.videoTrackCC,this.state=U.State.WAITING_INIT_PTS}},h._handleFragmentLoadComplete=function(l){if(this.waitingData){this.waitingData.complete=!0;return}T.prototype._handleFragmentLoadComplete.call(this,l)},h.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},h.onBufferCreated=function(l,u){var _=u.tracks.audio;_&&(this.mediaBuffer=_.buffer),u.tracks.video&&(this.videoBuffer=u.tracks.video.buffer)},h.onFragBuffered=function(l,u){var _=u.frag,g=u.part;if(_.type!==I.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(_)){this.warn("Fragment "+_.sn+(g?" p: "+g.index:"")+" of level "+_.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}_.sn!=="initSegment"&&(this.fragPrevious=_,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(O.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(_,g)},h.onError=function(l,u){switch(u.details){case n.ErrorDetails.FRAG_LOAD_ERROR:case n.ErrorDetails.FRAG_LOAD_TIMEOUT:case n.ErrorDetails.KEY_LOAD_ERROR:case n.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(I.PlaylistLevelType.AUDIO,u);break;case n.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case n.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==U.State.ERROR&&this.state!==U.State.STOPPED&&(this.state=u.fatal?U.State.ERROR:U.State.IDLE,this.warn(u.details+" while loading frag, switching to "+this.state+" state"));break;case n.ErrorDetails.BUFFER_FULL_ERROR:if(u.parent==="audio"&&(this.state===U.State.PARSING||this.state===U.State.PARSED)){var _=!0,g=this.getFwdBufferInfo(this.mediaBuffer,I.PlaylistLevelType.AUDIO);g&&g.len>.5&&(_=!this.reduceMaxBufferLength(g.len)),_&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,T.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},h.onBufferFlushed=function(l,u){var _=u.type;_===d.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},h._handleTransmuxComplete=function(l){var u,_="audio",g=this.hls,m=l.remuxResult,F=l.chunkMeta,H=this.getCurrentContext(F);if(!H){this.warn("The loading context changed while buffering fragment "+F.sn+" of level "+F.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(F.level);return}var B=H.frag,Q=H.part,z=m.audio,N=m.text,ee=m.id3,le=m.initSegment;if(this.fragContextChanged(B))return;if(this.state=U.State.PARSING,this.audioSwitch&&z&&this.completeAudioSwitch(),le!=null&&le.tracks&&(this._bufferInitSegment(le.tracks,B,F),g.trigger(O.Events.FRAG_PARSING_INIT_SEGMENT,{frag:B,id:_,tracks:le.tracks})),z){var Be=z.startPTS,Ce=z.endPTS,Me=z.startDTS,Le=z.endDTS;Q&&(Q.elementaryStreams[d.ElementaryStreamTypes.AUDIO]={startPTS:Be,endPTS:Ce,startDTS:Me,endDTS:Le}),B.setElementaryStreamInfo(d.ElementaryStreamTypes.AUDIO,Be,Ce,Me,Le),this.bufferFragmentData(z,B,Q,F)}if(ee!=null&&(u=ee.samples)!==null&&u!==void 0&&u.length){var je=r({frag:B,id:_},ee);g.trigger(O.Events.FRAG_PARSING_METADATA,je)}if(N){var He=r({frag:B,id:_},N);g.trigger(O.Events.FRAG_PARSING_USERDATA,He)}},h._bufferInitSegment=function(l,u,_){if(this.state!==U.State.PARSING)return;l.video&&delete l.video;var g=l.audio;if(!g)return;g.levelCodec=g.codec,g.id="audio",this.log("Init audio buffer, container:"+g.container+", codecs[parsed]=["+g.codec+"]"),this.hls.trigger(O.Events.BUFFER_CODECS,l);var m=g.initSegment;if(m!=null&&m.byteLength){var F={type:"audio",frag:u,part:null,chunkMeta:_,parent:u.type,data:m};this.hls.trigger(O.Events.BUFFER_APPENDING,F)}this.tick()},h.loadFragment=function(l,u,_){var g=this.fragmentTracker.getState(l);this.fragCurrent=l,(this.audioSwitch||g===k.FragmentState.NOT_LOADED||g===k.FragmentState.PARTIAL)&&(l.sn==="initSegment"?this._loadInitSegment(l):u.live&&!Object(V.isFiniteNumber)(this.initPTS[l.cc])?(this.log("Waiting for video PTS in continuity counter "+l.cc+" of live stream before loading audio fragment "+l.sn+" of level "+this.trackId),this.state=U.State.WAITING_INIT_PTS):(this.startFragRequested=!0,T.prototype.loadFragment.call(this,l,u,_)))},h.completeAudioSwitch=function(){var l=this.hls,u=this.media,_=this.trackId;u&&(this.log("Switching audio track : flushing all audio"),T.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,l.trigger(O.Events.AUDIO_TRACK_SWITCHED,{id:_})},C}(U.default);W.default=E},"./src/controller/audio-track-controller.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/events.ts"),U=L("./src/errors.ts"),O=L("./src/controller/base-playlist-controller.ts"),q=L("./src/types/loader.ts");function k(A,s){for(var i=0;i<s.length;i++){var o=s[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(A,o.key,o)}}function e(A,s,i){return s&&k(A.prototype,s),i&&k(A,i),A}function I(A,s){A.prototype=Object.create(s.prototype),A.prototype.constructor=A,d(A,s)}function d(A,s){return d=Object.setPrototypeOf||function(o,n){return o.__proto__=n,o},d(A,s)}var p=function(A){I(s,A);function s(o){var n;return n=A.call(this,o,"[audio-track-controller]")||this,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.trackName="",n.selectDefaultTrack=!0,n.registerListeners(),n}var i=s.prototype;return i.registerListeners=function(){var n=this.hls;n.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(V.Events.LEVEL_LOADING,this.onLevelLoading,this),n.on(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.on(V.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),n.on(V.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var n=this.hls;n.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(V.Events.LEVEL_LOADING,this.onLevelLoading,this),n.off(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),n.off(V.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),n.off(V.Events.ERROR,this.onError,this)},i.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,A.prototype.destroy.call(this)},i.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},i.onManifestParsed=function(n,a){this.tracks=a.audioTracks||[]},i.onAudioTrackLoaded=function(n,a){var r=a.id,t=a.details,y=this.tracksInGroup[r];if(!y){this.warn("Invalid audio track id "+r);return}var b=y.details;y.details=a.details,this.log("audioTrack "+r+" loaded ["+t.startSN+"-"+t.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,a,b))},i.onLevelLoading=function(n,a){this.switchLevel(a.level)},i.onLevelSwitching=function(n,a){this.switchLevel(a.level)},i.switchLevel=function(n){var a=this.hls.levels[n];if(!(a!=null&&a.audioGroupIds))return;var r=a.audioGroupIds[a.urlId];if(this.groupId!==r){this.groupId=r;var t=this.tracks.filter(function(b){return!r||b.groupId===r});this.selectDefaultTrack&&!t.some(function(b){return b.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var y={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(V.Events.AUDIO_TRACKS_UPDATED,y),this.selectInitialTrack()}},i.onError=function(n,a){if(A.prototype.onError.call(this,n,a),a.fatal||!a.context)return;a.context.type===q.PlaylistContextType.AUDIO_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},i.setAudioTrack=function(n){var a=this.tracksInGroup;if(n<0||n>=a.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var r=a[this.trackId];this.log("Now switching to audio-track index "+n);var t=a[n],y=t.id,b=t.groupId,E=b===void 0?"":b,T=t.name,C=t.type,h=t.url;if(this.trackId=n,this.trackName=T,this.selectDefaultTrack=!1,this.hls.trigger(V.Events.AUDIO_TRACK_SWITCHING,{id:y,groupId:E,name:T,type:C,url:h}),t.details&&!t.details.live)return;var c=this.switchParams(t.url,r==null?void 0:r.details);this.loadPlaylist(c)},i.selectInitialTrack=function(){var n=this.tracksInGroup;console.assert(n.length,"Initial audio track should be selected when tracks are known");var a=this.trackName,r=this.findTrackId(a)||this.findTrackId();r!==-1?this.setAudioTrack(r):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},i.findTrackId=function(n){for(var a=this.tracksInGroup,r=0;r<a.length;r++){var t=a[r];if((!this.selectDefaultTrack||t.default)&&(!n||n===t.name))return t.id}return-1},i.loadPlaylist=function(n){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var r=a.id,t=a.groupId,y=a.url;if(n)try{y=n.addDirectives(y)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("loading audio-track playlist for id: "+r),this.clearTimer(),this.hls.trigger(V.Events.AUDIO_TRACK_LOADING,{url:y,id:r,groupId:t,deliveryDirectives:n||null})}},e(s,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(n){this.selectDefaultTrack=!1,this.setAudioTrack(n)}}]),s}(O.default);W.default=p},"./src/controller/base-playlist-controller.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return e});var V=L("./src/polyfills/number.ts"),U=L("./src/types/level.ts"),O=L("./src/controller/level-helper.ts"),q=L("./src/utils/logger.ts"),k=L("./src/errors.ts"),e=function(){function I(p,A){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=q.logger.log.bind(q.logger,A+":"),this.warn=q.logger.warn.bind(q.logger,A+":"),this.hls=p}var d=I.prototype;return d.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},d.onError=function(A,s){s.fatal&&s.type===k.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},d.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},d.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},d.stopLoad=function(){this.canLoad=!1,this.clearTimer()},d.switchParams=function(A,s){var i=s==null?void 0:s.renditionReports;if(i)for(var o=0;o<i.length;o++){var n=i[o],a=""+n.URI;if(a===A.substr(-a.length)){var r=parseInt(n["LAST-MSN"]),t=parseInt(n["LAST-PART"]);if(s&&this.hls.config.lowLatencyMode){var y=Math.min(s.age-s.partTarget,s.targetduration);t!==void 0&&y>s.partTarget&&(t+=1)}if(Object(V.isFiniteNumber)(r))return new U.HlsUrlParameters(r,Object(V.isFiniteNumber)(t)?t:void 0,U.HlsSkip.No)}}},d.loadPlaylist=function(A){},d.shouldLoadTrack=function(A){return this.canLoad&&A&&!!A.url&&(!A.details||A.details.live)},d.playlistLoaded=function(A,s,i){var o=this,n=s.details,a=s.stats,r=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(n.advancedDateTime=Date.now()-r,n.live||i!=null&&i.live){if(n.reloaded(i),i&&this.log("live playlist "+A+" "+(n.advanced?"REFRESHED "+n.lastPartSn+"-"+n.lastPartIndex:"MISSED")),i&&n.fragments.length>0&&Object(O.mergeDetails)(i,n),!this.canLoad||!n.live)return;var t,y=void 0,b=void 0;if(n.canBlockReload&&n.endSN&&n.advanced){var E=this.hls.config.lowLatencyMode,T=n.lastPartSn,C=n.endSN,h=n.lastPartIndex,c=h!==-1,l=T===C,u=E?0:h;c?(y=l?C+1:T,b=l?u:h+1):y=C+1;var _=n.age,g=_+n.ageHeader,m=Math.min(g-n.partTarget,n.targetduration*1.5);if(m>0){if(i&&m>i.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+i.tuneInGoal+" to: "+m+" with playlist age: "+n.age),m=0;else{var F=Math.floor(m/n.targetduration);if(y+=F,b!==void 0){var H=Math.round(m%n.targetduration/n.partTarget);b+=H}this.log("CDN Tune-in age: "+n.ageHeader+"s last advanced "+_.toFixed(2)+"s goal: "+m+" skip sn "+F+" to part "+b)}n.tuneInGoal=m}if(t=this.getDeliveryDirectives(n,s.deliveryDirectives,y,b),E||!l){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(n,s.deliveryDirectives,y,b);var B=Object(O.computeReloadInterval)(n,a);y!==void 0&&n.canBlockReload&&(B-=n.partTarget||1),this.log("reload live playlist "+A+" in "+Math.round(B)+" ms"),this.timer=self.setTimeout(function(){return o.loadPlaylist(t)},B)}else this.clearTimer()},d.getDeliveryDirectives=function(A,s,i,o){var n=Object(U.getSkipValue)(A,i);return s!=null&&s.skip&&A.deltaUpdateFailed&&(i=s.msn,o=s.part,n=U.HlsSkip.No),new U.HlsUrlParameters(i,o,n)},d.retryLoadingOrFail=function(A){var s=this,i=this.hls.config,o=this.retryCount<i.levelLoadingMaxRetry;if(o){var n;if(this.retryCount++,A.details.indexOf("LoadTimeOut")>-1&&(n=A.context)!==null&&n!==void 0&&n.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+A.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*i.levelLoadingRetryDelay,i.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return s.loadPlaylist()},a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+A.details+'"')}}else this.warn('cannot recover from error "'+A.details+'"'),this.clearTimer(),A.fatal=!0;return o},I}()},"./src/controller/base-stream-controller.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"State",function(){return C}),L.d(W,"default",function(){return h});var V=L("./src/polyfills/number.ts"),U=L("./src/task-loop.ts"),O=L("./src/controller/fragment-tracker.ts"),q=L("./src/utils/buffer-helper.ts"),k=L("./src/utils/logger.ts"),e=L("./src/events.ts"),I=L("./src/errors.ts"),d=L("./src/types/transmuxer.ts"),p=L("./src/utils/mp4-tools.ts"),A=L("./src/utils/discontinuities.ts"),s=L("./src/controller/fragment-finders.ts"),i=L("./src/controller/level-helper.ts"),o=L("./src/loader/fragment-loader.ts"),n=L("./src/crypt/decrypter.ts"),a=L("./src/utils/time-ranges.ts"),r=L("./src/types/loader.ts");function t(c,l){for(var u=0;u<l.length;u++){var _=l[u];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(c,_.key,_)}}function y(c,l,u){return l&&t(c.prototype,l),u&&t(c,u),c}function b(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function E(c,l){c.prototype=Object.create(l.prototype),c.prototype.constructor=c,T(c,l)}function T(c,l){return T=Object.setPrototypeOf||function(_,g){return _.__proto__=g,_},T(c,l)}var C={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},h=function(c){E(l,c);function l(_,g,m){var F;return F=c.call(this)||this,F.hls=void 0,F.fragPrevious=null,F.fragCurrent=null,F.fragmentTracker=void 0,F.transmuxer=null,F._state=C.STOPPED,F.media=void 0,F.mediaBuffer=void 0,F.config=void 0,F.bitrateTest=!1,F.lastCurrentTime=0,F.nextLoadPosition=0,F.startPosition=0,F.loadedmetadata=!1,F.fragLoadError=0,F.retryDate=0,F.levels=null,F.fragmentLoader=void 0,F.levelLastLoaded=null,F.startFragRequested=!1,F.decrypter=void 0,F.initPTS=[],F.onvseeking=null,F.onvended=null,F.logPrefix="",F.log=void 0,F.warn=void 0,F.logPrefix=m,F.log=k.logger.log.bind(k.logger,m+":"),F.warn=k.logger.warn.bind(k.logger,m+":"),F.hls=_,F.fragmentLoader=new o.default(_.config),F.fragmentTracker=g,F.config=_.config,F.decrypter=new n.default(_,_.config),_.on(e.Events.KEY_LOADED,F.onKeyLoaded,b(F)),F}var u=l.prototype;return u.doTick=function(){this.onTickEnd()},u.onTickEnd=function(){},u.startLoad=function(g){},u.stopLoad=function(){this.fragmentLoader.abort();var g=this.fragCurrent;g&&this.fragmentTracker.removeFragment(g),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=C.STOPPED},u._streamEnded=function(g,m){var F=this.fragCurrent,H=this.fragmentTracker;if(!m.live&&F&&F.sn===m.endSN&&!g.nextStart){var B=H.getState(F);return B===O.FragmentState.PARTIAL||B===O.FragmentState.OK}return!1},u.onMediaAttached=function(g,m){var F=this.media=this.mediaBuffer=m.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),F.addEventListener("seeking",this.onvseeking),F.addEventListener("ended",this.onvended);var H=this.config;this.levels&&H.autoStartLoad&&this.state===C.STOPPED&&this.startLoad(H.startPosition)},u.onMediaDetaching=function(){var g=this.media;g!=null&&g.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),g&&(g.removeEventListener("seeking",this.onvseeking),g.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},u.onMediaSeeking=function(){var g=this.config,m=this.fragCurrent,F=this.media,H=this.mediaBuffer,B=this.state,Q=F?F.currentTime:0,z=q.BufferHelper.bufferInfo(H||F,Q,g.maxBufferHole);if(this.log("media seeking to "+(Object(V.isFiniteNumber)(Q)?Q.toFixed(3):Q)+", state: "+B),B===C.ENDED)this.resetLoadingState();else if(m&&!z.len){var N=g.maxFragLookUpTolerance,ee=m.start-N,le=m.start+m.duration+N,Be=Q>le;(Q<ee||Be)&&(Be&&m.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),m.loader.abort()),this.resetLoadingState())}F&&(this.lastCurrentTime=Q),!this.loadedmetadata&&!z.len&&(this.nextLoadPosition=this.startPosition=Q),this.tickImmediate()},u.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},u.onKeyLoaded=function(g,m){if(this.state!==C.KEY_LOADING||m.frag!==this.fragCurrent||!this.levels)return;this.state=C.IDLE;var F=this.levels[m.frag.level].details;F&&this.loadFragment(m.frag,F,m.frag.start)},u.onHandlerDestroying=function(){this.stopLoad(),c.prototype.onHandlerDestroying.call(this)},u.onHandlerDestroyed=function(){this.state=C.STOPPED,this.hls.off(e.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,c.prototype.onHandlerDestroyed.call(this)},u.loadKey=function(g,m){this.log("Loading key for "+g.sn+" of ["+m.startSN+"-"+m.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+g.level),this.state=C.KEY_LOADING,this.fragCurrent=g,this.hls.trigger(e.Events.KEY_LOADING,{frag:g})},u.loadFragment=function(g,m,F){this._loadFragForPlayback(g,m,F)},u._loadFragForPlayback=function(g,m,F){var H=this,B=function(z){if(H.fragContextChanged(g)){H.warn("Fragment "+g.sn+(z.part?" p: "+z.part.index:"")+" of level "+g.level+" was dropped during download."),H.fragmentTracker.removeFragment(g);return}g.stats.chunkCount++,H._handleFragmentLoadProgress(z)};this._doFragLoad(g,m,F,B).then(function(Q){if(!Q)return;H.fragLoadError=0;var z=H.state;if(H.fragContextChanged(g)){(z===C.FRAG_LOADING||z===C.BACKTRACKING||!H.fragCurrent&&z===C.PARSING)&&(H.fragmentTracker.removeFragment(g),H.state=C.IDLE);return}if("payload"in Q&&(H.log("Loaded fragment "+g.sn+" of level "+g.level),H.hls.trigger(e.Events.FRAG_LOADED,Q),H.state===C.BACKTRACKING)){H.fragmentTracker.backtrack(g,Q),H.resetFragmentLoading(g);return}H._handleFragmentLoadComplete(Q)}).catch(function(Q){H.warn(Q),H.resetFragmentLoading(g)})},u.flushMainBuffer=function(g,m,F){if(F===void 0&&(F=null),!(g-m))return;var H={startOffset:g,endOffset:m,type:F};this.fragLoadError=0,this.hls.trigger(e.Events.BUFFER_FLUSHING,H)},u._loadInitSegment=function(g){var m=this;this._doFragLoad(g).then(function(F){if(!F||m.fragContextChanged(g)||!m.levels)throw new Error("init load aborted");return F}).then(function(F){var H=m.hls,B=F.payload,Q=g.decryptdata;if(B&&B.byteLength>0&&Q&&Q.key&&Q.iv&&Q.method==="AES-128"){var z=self.performance.now();return m.decrypter.webCryptoDecrypt(new Uint8Array(B),Q.key.buffer,Q.iv.buffer).then(function(N){var ee=self.performance.now();return H.trigger(e.Events.FRAG_DECRYPTED,{frag:g,payload:N,stats:{tstart:z,tdecrypt:ee}}),F.payload=N,F})}return F}).then(function(F){var H=m.fragCurrent,B=m.hls,Q=m.levels;if(!Q)throw new Error("init load aborted, missing levels");var z=Q[g.level].details;console.assert(z,"Level details are defined when init segment is loaded");var N=g.stats;m.state=C.IDLE,m.fragLoadError=0,g.data=new Uint8Array(F.payload),N.parsing.start=N.buffering.start=self.performance.now(),N.parsing.end=N.buffering.end=self.performance.now(),F.frag===H&&B.trigger(e.Events.FRAG_BUFFERED,{stats:N,frag:H,part:null,id:g.type}),m.tick()}).catch(function(F){m.warn(F),m.resetFragmentLoading(g)})},u.fragContextChanged=function(g){var m=this.fragCurrent;return!g||!m||g.level!==m.level||g.sn!==m.sn||g.urlId!==m.urlId},u.fragBufferedComplete=function(g,m){var F=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+g.type+" sn: "+g.sn+(m?" part: "+m.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+g.level+" "+a.default.toString(q.BufferHelper.getBuffered(F))),this.state=C.IDLE,this.tick()},u._handleFragmentLoadComplete=function(g){var m=this.transmuxer;if(!m)return;var F=g.frag,H=g.part,B=g.partsLoaded,Q=!B||B.length===0||B.some(function(N){return!N}),z=new d.ChunkMetadata(F.level,F.sn,F.stats.chunkCount+1,0,H?H.index:-1,!Q);m.flush(z)},u._handleFragmentLoadProgress=function(g){},u._doFragLoad=function(g,m,F,H){var B=this;if(F===void 0&&(F=null),!this.levels)throw new Error("frag load aborted, missing levels");if(F=Math.max(g.start,F||0),this.config.lowLatencyMode&&m){var Q=m.partList;if(Q&&H){F>g.end&&m.fragmentHint&&(g=m.fragmentHint);var z=this.getNextPart(Q,g,F);if(z>-1){var N=Q[z];return this.log("Loading part sn: "+g.sn+" p: "+N.index+" cc: "+g.cc+" of playlist ["+m.startSN+"-"+m.endSN+"] parts [0-"+z+"-"+(Q.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+g.level+", target: "+parseFloat(F.toFixed(3))),this.nextLoadPosition=N.start+N.duration,this.state=C.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:g,part:Q[z],targetBufferTime:F}),this.doFragPartsLoad(g,Q,z,H).catch(function(ee){return B.handleFragLoadError(ee)})}else if(!g.url||this.loadedEndOfParts(Q,F))return Promise.resolve(null)}}return this.log("Loading fragment "+g.sn+" cc: "+g.cc+" "+(m?"of ["+m.startSN+"-"+m.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+g.level+", target: "+parseFloat(F.toFixed(3))),Object(V.isFiniteNumber)(g.sn)&&!this.bitrateTest&&(this.nextLoadPosition=g.start+g.duration),this.state=C.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:g,targetBufferTime:F}),this.fragmentLoader.load(g,H).catch(function(ee){return B.handleFragLoadError(ee)})},u.doFragPartsLoad=function(g,m,F,H){var B=this;return new Promise(function(Q,z){var N=[],ee=function le(Be){var Ce=m[Be];B.fragmentLoader.loadPart(g,Ce,H).then(function(Me){N[Ce.index]=Me;var Le=Me.part;B.hls.trigger(e.Events.FRAG_LOADED,Me);var je=m[Be+1];if(je&&je.fragment===g)le(Be+1);else return Q({frag:g,part:Le,partsLoaded:N})}).catch(z)};ee(F)})},u.handleFragLoadError=function(g){var m=g.data;return m&&m.details===I.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(m.frag,m.part):this.hls.trigger(e.Events.ERROR,m),null},u._handleTransmuxerFlush=function(g){var m=this.getCurrentContext(g);if(!m||this.state!==C.PARSING){this.fragCurrent||(this.state=C.IDLE);return}var F=m.frag,H=m.part,B=m.level,Q=self.performance.now();F.stats.parsing.end=Q,H&&(H.stats.parsing.end=Q),this.updateLevelTiming(F,H,B,g.partial)},u.getCurrentContext=function(g){var m=this.levels,F=g.level,H=g.sn,B=g.part;if(!m||!m[F])return this.warn("Levels object was unset while buffering fragment "+H+" of level "+F+". The current chunk will not be buffered."),null;var Q=m[F],z=B>-1?Object(i.getPartWith)(Q,H,B):null,N=z?z.fragment:Object(i.getFragmentWithSN)(Q,H,this.fragCurrent);return N?{frag:N,part:z,level:Q}:null},u.bufferFragmentData=function(g,m,F,H){if(!g||this.state!==C.PARSING)return;var B=g.data1,Q=g.data2,z=B;if(B&&Q&&(z=Object(p.appendUint8Array)(B,Q)),!z||!z.length)return;var N={type:g.type,frag:m,part:F,chunkMeta:H,parent:m.type,data:z};this.hls.trigger(e.Events.BUFFER_APPENDING,N),g.dropped&&g.independent&&!F&&this.flushBufferGap(m)},u.flushBufferGap=function(g){var m=this.media;if(!m)return;if(!q.BufferHelper.isBuffered(m,m.currentTime)){this.flushMainBuffer(0,g.start);return}var F=m.currentTime,H=q.BufferHelper.bufferInfo(m,F,0),B=g.duration,Q=Math.min(this.config.maxFragLookUpTolerance*2,B*.25),z=Math.max(Math.min(g.start-Q,H.end-Q),F+Q);g.start-z>Q&&this.flushMainBuffer(z,g.start)},u.getFwdBufferInfo=function(g,m){var F=this.config,H=this.getLoadPosition();if(!Object(V.isFiniteNumber)(H))return null;var B=q.BufferHelper.bufferInfo(g,H,F.maxBufferHole);if(B.len===0&&B.nextStart!==void 0){var Q=this.fragmentTracker.getBufferedFrag(H,m);if(Q&&B.nextStart<Q.end)return q.BufferHelper.bufferInfo(g,H,Math.max(B.nextStart,F.maxBufferHole))}return B},u.getMaxBufferLength=function(g){var m=this.config,F;return g?F=Math.max(8*m.maxBufferSize/g,m.maxBufferLength):F=m.maxBufferLength,Math.min(F,m.maxMaxBufferLength)},u.reduceMaxBufferLength=function(g){var m=this.config,F=g||m.maxBufferLength;return m.maxMaxBufferLength>=F?(m.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+m.maxMaxBufferLength+"s"),!0):!1},u.getNextFragment=function(g,m){var F,H,B=m.fragments,Q=B.length;if(!Q)return null;var z=this.config,N=B[0].start,ee;if(m.live){var le=z.initialLiveManifestSize;if(Q<le)return this.warn("Not enough fragments to start playback (have: "+Q+", need: "+le+")"),null;!m.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(ee=this.getInitialLiveFragment(m,B),this.startPosition=ee?this.hls.liveSyncPosition||ee.start:g)}else g<=N&&(ee=B[0]);if(!ee){var Be=z.lowLatencyMode?m.partEnd:m.fragmentEnd;ee=this.getFragmentAtPosition(g,Be,m)}return(F=ee)!==null&&F!==void 0&&F.initSegment&&!((H=ee)!==null&&H!==void 0&&H.initSegment.data)&&!this.bitrateTest&&(ee=ee.initSegment),ee},u.getNextPart=function(g,m,F){for(var H=-1,B=!1,Q=!0,z=0,N=g.length;z<N;z++){var ee=g[z];if(Q=Q&&!ee.independent,H>-1&&F<ee.start)break;var le=ee.loaded;!le&&(B||ee.independent||Q)&&ee.fragment===m&&(H=z),B=le}return H},u.loadedEndOfParts=function(g,m){var F=g[g.length-1];return F&&m>F.start&&F.loaded},u.getInitialLiveFragment=function(g,m){var F=this.fragPrevious,H=null;if(F){if(g.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+F.programDateTime),H=Object(s.findFragmentByPDT)(m,F.endProgramDateTime,this.config.maxFragLookUpTolerance)),!H){var B=F.sn+1;if(B>=g.startSN&&B<=g.endSN){var Q=m[B-g.startSN];F.cc===Q.cc&&(H=Q,this.log("Live playlist, switching playlist, load frag with next SN: "+H.sn))}H||(H=Object(s.findFragWithCC)(m,F.cc),H&&this.log("Live playlist, switching playlist, load frag with same CC: "+H.sn))}}else{var z=this.hls.liveSyncPosition;z!==null&&(H=this.getFragmentAtPosition(z,this.bitrateTest?g.fragmentEnd:g.edge,g))}return H},u.getFragmentAtPosition=function(g,m,F){var H=this.config,B=this.fragPrevious,Q=F.fragments,z=F.endSN,N=F.fragmentHint,ee=H.maxFragLookUpTolerance,le=!!(H.lowLatencyMode&&F.partList&&N);le&&N&&!this.bitrateTest&&(Q=Q.concat(N),z=N.sn);var Be;if(g<m){var Ce=g>m-ee?0:ee;Be=Object(s.findFragmentByPTS)(B,Q,g,Ce)}else Be=Q[Q.length-1];if(Be){var Me=Be.sn-F.startSN,Le=B&&Be.level===B.level,je=Q[Me+1],He=this.fragmentTracker.getState(Be);if(He===O.FragmentState.BACKTRACKED){Be=null;for(var Je=Me;Q[Je]&&this.fragmentTracker.getState(Q[Je])===O.FragmentState.BACKTRACKED;)B?Be=Q[Je--]:Be=Q[--Je];Be||(Be=je)}else B&&Be.sn===B.sn&&!le&&(Le&&(Be.sn<z&&this.fragmentTracker.getState(je)!==O.FragmentState.OK?(this.log("SN "+Be.sn+" just loaded, load next one: "+je.sn),Be=je):Be=null))}return Be},u.synchronizeToLiveEdge=function(g){var m=this.config,F=this.media;if(!F)return;var H=this.hls.liveSyncPosition,B=F.currentTime,Q=g.fragments[0].start,z=g.edge,N=B>=Q-m.maxFragLookUpTolerance&&B<=z;if(H!==null&&F.duration>H&&(B<H||!N)){var ee=m.liveMaxLatencyDuration!==void 0?m.liveMaxLatencyDuration:m.liveMaxLatencyDurationCount*g.targetduration;(!N&&F.readyState<4||B<z-ee)&&(this.loadedmetadata||(this.nextLoadPosition=H),F.readyState&&(this.warn("Playback: "+B.toFixed(3)+" is located too far from the end of live sliding playlist: "+z+", reset currentTime to : "+H.toFixed(3)),F.currentTime=H))}},u.alignPlaylists=function(g,m){var F=this.levels,H=this.levelLastLoaded,B=this.fragPrevious,Q=H!==null?F[H]:null,z=g.fragments.length;if(!z)return this.warn("No fragments in live playlist"),0;var N=g.fragments[0].start,ee=!m,le=g.alignedSliding&&Object(V.isFiniteNumber)(N);if(ee||!le&&!N){Object(A.alignStream)(B,Q,g);var Be=g.fragments[0].start;return this.log("Live playlist sliding: "+Be.toFixed(2)+" start-sn: "+(m?m.startSN:"na")+"->"+g.startSN+" prev-sn: "+(B?B.sn:"na")+" fragments: "+z),Be}return N},u.waitForCdnTuneIn=function(g){var m=3;return g.live&&g.canBlockReload&&g.tuneInGoal>Math.max(g.partHoldBack,g.partTarget*m)},u.setStartPosition=function(g,m){var F=this.startPosition;if(F<m&&(F=-1),F===-1||this.lastCurrentTime===-1){var H=g.startTimeOffset;Object(V.isFiniteNumber)(H)?(F=m+H,H<0&&(F+=g.totalduration),F=Math.min(Math.max(m,F),m+g.totalduration),this.log("Start time offset "+H+" found in playlist, adjust startPosition to "+F),this.startPosition=F):g.live?F=this.hls.liveSyncPosition||m:this.startPosition=F=0,this.lastCurrentTime=F}this.nextLoadPosition=F},u.getLoadPosition=function(){var g=this.media,m=0;return this.loadedmetadata&&g?m=g.currentTime:this.nextLoadPosition&&(m=this.nextLoadPosition),m},u.handleFragLoadAborted=function(g,m){this.transmuxer&&g.sn!=="initSegment"&&g.stats.aborted&&(this.warn("Fragment "+g.sn+(m?" part"+m.index:"")+" of level "+g.level+" was aborted"),this.resetFragmentLoading(g))},u.resetFragmentLoading=function(g){(!this.fragCurrent||!this.fragContextChanged(g))&&(this.state=C.IDLE)},u.onFragmentOrKeyLoadError=function(g,m){if(m.fatal)return;var F=m.frag;if(!F||F.type!==g)return;var H=this.fragCurrent;console.assert(H&&F.sn===H.sn&&F.level===H.level&&F.urlId===H.urlId,"Frag load error must match current frag to retry");var B=this.config;if(this.fragLoadError+1<=B.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(F.level))return;var Q=Math.min(Math.pow(2,this.fragLoadError)*B.fragLoadingRetryDelay,B.fragLoadingMaxRetryTimeout);this.warn("Fragment "+F.sn+" of "+g+" "+F.level+" failed to load, retrying in "+Q+"ms"),this.retryDate=self.performance.now()+Q,this.fragLoadError++,this.state=C.FRAG_LOADING_WAITING_RETRY}else m.levelRetry?(g===r.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=C.IDLE):(k.logger.error(m.details+" reaches max retry, redispatch as fatal ..."),m.fatal=!0,this.hls.stopLoad(),this.state=C.ERROR)},u.afterBufferFlushed=function(g,m,F){if(!g)return;var H=q.BufferHelper.getBuffered(g);this.fragmentTracker.detectEvictedFragments(m,H,F),this.state===C.ENDED&&this.resetLoadingState()},u.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=C.IDLE},u.resetLiveStartWhenNotLoaded=function(g){if(!this.loadedmetadata){this.startFragRequested=!1;var m=this.levels?this.levels[g].details:null;if(m!=null&&m.live)return this.startPosition=-1,this.setStartPosition(m,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},u.updateLevelTiming=function(g,m,F,H){var B=this,Q=F.details;console.assert(!!Q,"level.details must be defined");var z=Object.keys(g.elementaryStreams).reduce(function(N,ee){var le=g.elementaryStreams[ee];if(le){var Be=le.endPTS-le.startPTS;if(Be<=0)return B.warn("Could not parse fragment "+g.sn+" "+ee+" duration reliably ("+Be+") resetting transmuxer to fallback to playlist timing"),B.resetTransmuxer(),N||!1;var Ce=H?0:Object(i.updateFragPTSDTS)(Q,g,le.startPTS,le.endPTS,le.startDTS,le.endDTS);return B.hls.trigger(e.Events.LEVEL_PTS_UPDATED,{details:Q,level:F,drift:Ce,type:ee,frag:g,start:le.startPTS,end:le.endPTS}),!0}return N},!1);z?(this.state=C.PARSED,this.hls.trigger(e.Events.FRAG_PARSED,{frag:g,part:m})):this.resetLoadingState()},u.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},y(l,[{key:"state",get:function(){return this._state},set:function(g){var m=this._state;m!==g&&(this._state=g,this.log(m+"->"+g))}}]),l}(U.default)},"./src/controller/buffer-controller.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return s});var V=L("./src/polyfills/number.ts"),U=L("./src/events.ts"),O=L("./src/utils/logger.ts"),q=L("./src/errors.ts"),k=L("./src/utils/buffer-helper.ts"),e=L("./src/utils/mediasource-helper.ts"),I=L("./src/loader/fragment.ts"),d=L("./src/controller/buffer-operation-queue.ts"),p=Object(e.getMediaSource)(),A=/([ha]vc.)(?:\.[^.,]+)+/,s=function(){function i(n){var a=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var r=a.hls,t=a.media,y=a.mediaSource;O.logger.log("[buffer-controller]: Media source opened"),t&&(a.updateMediaElementDuration(),r.trigger(U.Events.MEDIA_ATTACHED,{media:t})),y&&y.removeEventListener("sourceopen",a._onMediaSourceOpen),a.checkPendingTracks()},this._onMediaSourceClose=function(){O.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){O.logger.log("[buffer-controller]: Media source ended")},this.hls=n,this._initSourceBuffer(),this.registerListeners()}var o=i.prototype;return o.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},o.destroy=function(){this.unregisterListeners(),this.details=null},o.registerListeners=function(){var a=this.hls;a.on(U.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(U.Events.BUFFER_RESET,this.onBufferReset,this),a.on(U.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.on(U.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(U.Events.BUFFER_EOS,this.onBufferEos,this),a.on(U.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.on(U.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.on(U.Events.FRAG_PARSED,this.onFragParsed,this),a.on(U.Events.FRAG_CHANGED,this.onFragChanged,this)},o.unregisterListeners=function(){var a=this.hls;a.off(U.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(U.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(U.Events.BUFFER_RESET,this.onBufferReset,this),a.off(U.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.off(U.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(U.Events.BUFFER_EOS,this.onBufferEos,this),a.off(U.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.off(U.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.off(U.Events.FRAG_PARSED,this.onFragParsed,this),a.off(U.Events.FRAG_CHANGED,this.onFragChanged,this)},o._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new d.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},o.onManifestParsed=function(a,r){var t=2;(r.audio&&!r.video||!r.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,O.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},o.onMediaAttaching=function(a,r){var t=this.media=r.media;if(t&&p){var y=this.mediaSource=new p;y.addEventListener("sourceopen",this._onMediaSourceOpen),y.addEventListener("sourceended",this._onMediaSourceEnded),y.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(y),this._objectUrl=t.src}},o.onMediaDetaching=function(){var a=this.media,r=this.mediaSource,t=this._objectUrl;if(r){if(O.logger.log("[buffer-controller]: media source detaching"),r.readyState==="open")try{r.endOfStream()}catch(y){O.logger.warn("[buffer-controller]: onMediaDetaching: "+y.message+" while calling endOfStream")}this.onBufferReset(),r.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("sourceended",this._onMediaSourceEnded),r.removeEventListener("sourceclose",this._onMediaSourceClose),a&&(t&&self.URL.revokeObjectURL(t),a.src===t?(a.removeAttribute("src"),a.load()):O.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(U.Events.MEDIA_DETACHED,void 0)},o.onBufferReset=function(){var a=this;this.getSourceBufferTypes().forEach(function(r){var t=a.sourceBuffer[r];try{t&&(a.removeBufferListeners(r),a.mediaSource&&a.mediaSource.removeSourceBuffer(t),a.sourceBuffer[r]=void 0)}catch(y){O.logger.warn("[buffer-controller]: Failed to reset the "+r+" buffer",y)}}),this._initSourceBuffer()},o.onBufferCodecs=function(a,r){var t=this,y=this.getSourceBufferTypes().length;if(Object.keys(r).forEach(function(b){if(y){var E=t.tracks[b];if(E&&typeof E.buffer.changeType=="function"){var T=r[b],C=T.codec,h=T.levelCodec,c=T.container,l=(E.levelCodec||E.codec).replace(A,"$1"),u=(h||C).replace(A,"$1");if(l!==u){var _=c+";codecs="+(h||C);t.appendChangeType(b,_)}}}else t.pendingTracks[b]=r[b]}),y)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},o.appendChangeType=function(a,r){var t=this,y=this.operationQueue,b={execute:function(){var T=t.sourceBuffer[a];T&&(O.logger.log("[buffer-controller]: changing "+a+" sourceBuffer type to "+r),T.changeType(r)),y.shiftAndExecuteNext(a)},onStart:function(){},onComplete:function(){},onError:function(T){O.logger.warn("[buffer-controller]: Failed to change "+a+" SourceBuffer type",T)}};y.append(b,a)},o.onBufferAppending=function(a,r){var t=this,y=this.hls,b=this.operationQueue,E=this.tracks,T=r.data,C=r.type,h=r.frag,c=r.part,l=r.chunkMeta,u=l.buffering[C],_=self.performance.now();u.start=_;var g=h.stats.buffering,m=c?c.stats.buffering:null;g.start===0&&(g.start=_),m&&m.start===0&&(m.start=_);var F=E.audio,H=C==="audio"&&l.id===1&&(F==null?void 0:F.container)==="audio/mpeg",B={execute:function(){if(u.executeStart=self.performance.now(),H){var z=t.sourceBuffer[C];if(z){var N=h.start-z.timestampOffset;Math.abs(N)>=.1&&(O.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+h.start+" (delta: "+N+") sn: "+h.sn+")"),z.timestampOffset=h.start)}}t.appendExecutor(T,C)},onStart:function(){},onComplete:function(){var z=self.performance.now();u.executeEnd=u.end=z,g.first===0&&(g.first=z),m&&m.first===0&&(m.first=z);var N=t.sourceBuffer,ee={};for(var le in N)ee[le]=k.BufferHelper.getBuffered(N[le]);t.appendError=0,t.hls.trigger(U.Events.BUFFER_APPENDED,{type:C,frag:h,part:c,chunkMeta:l,parent:h.type,timeRanges:ee})},onError:function(z){O.logger.error("[buffer-controller]: Error encountered while trying to append to the "+C+" SourceBuffer",z);var N={type:q.ErrorTypes.MEDIA_ERROR,parent:h.type,details:q.ErrorDetails.BUFFER_APPEND_ERROR,err:z,fatal:!1};z.code===DOMException.QUOTA_EXCEEDED_ERR?N.details=q.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,N.details=q.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>y.config.appendErrorMaxRetry&&(O.logger.error("[buffer-controller]: Failed "+y.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),N.fatal=!0)),y.trigger(U.Events.ERROR,N)}};b.append(B,C)},o.onBufferFlushing=function(a,r){var t=this,y=this.operationQueue,b=function(T){return{execute:t.removeExecutor.bind(t,T,r.startOffset,r.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(U.Events.BUFFER_FLUSHED,{type:T})},onError:function(h){O.logger.warn("[buffer-controller]: Failed to remove from "+T+" SourceBuffer",h)}}};r.type?y.append(b(r.type),r.type):this.getSourceBufferTypes().forEach(function(E){y.append(b(E),E)})},o.onFragParsed=function(a,r){var t=this,y=r.frag,b=r.part,E=[],T=b?b.elementaryStreams:y.elementaryStreams;T[I.ElementaryStreamTypes.AUDIOVIDEO]?E.push("audiovideo"):(T[I.ElementaryStreamTypes.AUDIO]&&E.push("audio"),T[I.ElementaryStreamTypes.VIDEO]&&E.push("video"));var C=function(){var c=self.performance.now();y.stats.buffering.end=c,b&&(b.stats.buffering.end=c);var l=b?b.stats:y.stats;t.hls.trigger(U.Events.FRAG_BUFFERED,{frag:y,part:b,stats:l,id:y.type})};E.length===0&&O.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+y.type+" level: "+y.level+" sn: "+y.sn),this.blockBuffers(C,E)},o.onFragChanged=function(a,r){this.flushBackBuffer()},o.onBufferEos=function(a,r){var t=this,y=this.getSourceBufferTypes().reduce(function(b,E){var T=t.sourceBuffer[E];return(!r.type||r.type===E)&&(T&&!T.ended&&(T.ended=!0,O.logger.log("[buffer-controller]: "+E+" sourceBuffer now EOS"))),b&&!!(!T||T.ended)},!0);y&&this.blockBuffers(function(){var b=t.mediaSource;if(!b||b.readyState!=="open")return;b.endOfStream()})},o.onLevelUpdated=function(a,r){var t=r.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},o.flushBackBuffer=function(){var a=this.hls,r=this.details,t=this.media,y=this.sourceBuffer;if(!t||r===null)return;var b=this.getSourceBufferTypes();if(!b.length)return;var E=r.live&&a.config.liveBackBufferLength!==null?a.config.liveBackBufferLength:a.config.backBufferLength;if(!Object(V.isFiniteNumber)(E)||E<0)return;var T=t.currentTime,C=r.levelTargetDuration,h=Math.max(E,C),c=Math.floor(T/C)*C-h;b.forEach(function(l){var u=y[l];if(u){var _=k.BufferHelper.getBuffered(u);_.length>0&&c>_.start(0)&&(a.trigger(U.Events.BACK_BUFFER_REACHED,{bufferEnd:c}),r.live&&a.trigger(U.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:c}),a.trigger(U.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:c,type:l}))}})},o.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var a=this.details,r=this.hls,t=this.media,y=this.mediaSource,b=a.fragments[0].start+a.totalduration,E=t.duration,T=Object(V.isFiniteNumber)(y.duration)?y.duration:0;a.live&&r.config.liveDurationInfinity?(O.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),y.duration=Infinity,this.updateSeekableRange(a)):(b>T&&b>E||!Object(V.isFiniteNumber)(E))&&(O.logger.log("[buffer-controller]: Updating Media Source duration to "+b.toFixed(3)),y.duration=b)},o.updateSeekableRange=function(a){var r=this.mediaSource,t=a.fragments,y=t.length;if(y&&a.live&&r!==null&&r!==void 0&&r.setLiveSeekableRange){var b=Math.max(0,t[0].start),E=Math.max(b,b+a.totalduration);r.setLiveSeekableRange(b,E)}},o.checkPendingTracks=function(){var a=this.bufferCodecEventsExpected,r=this.operationQueue,t=this.pendingTracks,y=Object.keys(t).length;if(y&&!a||y===2){this.createSourceBuffers(t),this.pendingTracks={};var b=this.getSourceBufferTypes();if(b.length===0){this.hls.trigger(U.Events.ERROR,{type:q.ErrorTypes.MEDIA_ERROR,details:q.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}b.forEach(function(E){r.executeNext(E)})}},o.createSourceBuffers=function(a){var r=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var y=0;for(var b in a)if(!r[b]){var E=a[b];if(!E)throw Error("source buffer exists for track "+b+", however track does not");var T=E.levelCodec||E.codec,C=E.container+";codecs="+T;O.logger.log("[buffer-controller]: creating sourceBuffer("+C+")");try{var h=r[b]=t.addSourceBuffer(C),c=b;this.addBufferListener(c,"updatestart",this._onSBUpdateStart),this.addBufferListener(c,"updateend",this._onSBUpdateEnd),this.addBufferListener(c,"error",this._onSBUpdateError),this.tracks[b]={buffer:h,codec:T,container:E.container,levelCodec:E.levelCodec,id:E.id},y++}catch(l){O.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+l.message),this.hls.trigger(U.Events.ERROR,{type:q.ErrorTypes.MEDIA_ERROR,details:q.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:l,mimeType:C})}}y&&this.hls.trigger(U.Events.BUFFER_CREATED,{tracks:this.tracks})},o._onSBUpdateStart=function(a){var r=this.operationQueue,t=r.current(a);t.onStart()},o._onSBUpdateEnd=function(a){var r=this.operationQueue,t=r.current(a);t.onComplete(),r.shiftAndExecuteNext(a)},o._onSBUpdateError=function(a,r){O.logger.error("[buffer-controller]: "+a+" SourceBuffer error",r),this.hls.trigger(U.Events.ERROR,{type:q.ErrorTypes.MEDIA_ERROR,details:q.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(a);t&&t.onError(r)},o.removeExecutor=function(a,r,t){var y=this.media,b=this.mediaSource,E=this.operationQueue,T=this.sourceBuffer,C=T[a];if(!y||!b||!C){O.logger.warn("[buffer-controller]: Attempting to remove from the "+a+" SourceBuffer, but it does not exist"),E.shiftAndExecuteNext(a);return}var h=Object(V.isFiniteNumber)(y.duration)?y.duration:Infinity,c=Object(V.isFiniteNumber)(b.duration)?b.duration:Infinity,l=Math.max(0,r),u=Math.min(t,h,c);u>l?(O.logger.log("[buffer-controller]: Removing ["+l+","+u+"] from the "+a+" SourceBuffer"),console.assert(!C.updating,a+" sourceBuffer must not be updating"),C.remove(l,u)):E.shiftAndExecuteNext(a)},o.appendExecutor=function(a,r){var t=this.operationQueue,y=this.sourceBuffer,b=y[r];if(!b){O.logger.warn("[buffer-controller]: Attempting to append to the "+r+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(r);return}b.ended=!1,console.assert(!b.updating,r+" sourceBuffer must not be updating"),b.appendBuffer(a)},o.blockBuffers=function(a,r){var t=this;if(r===void 0&&(r=this.getSourceBufferTypes()),!r.length){O.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(a);return}var y=this.operationQueue,b=r.map(function(E){return y.appendBlocker(E)});Promise.all(b).then(function(){a(),r.forEach(function(E){var T=t.sourceBuffer[E];(!T||!T.updating)&&y.shiftAndExecuteNext(E)})})},o.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},o.addBufferListener=function(a,r,t){var y=this.sourceBuffer[a];if(!y)return;var b=t.bind(this,a);this.listeners[a].push({event:r,listener:b}),y.addEventListener(r,b)},o.removeBufferListeners=function(a){var r=this.sourceBuffer[a];if(!r)return;this.listeners[a].forEach(function(t){r.removeEventListener(t.event,t.listener)})},i}()},"./src/controller/buffer-operation-queue.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return U});var V=L("./src/utils/logger.ts"),U=function(){function O(k){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=k}var q=O.prototype;return q.append=function(e,I){var d=this.queues[I];d.push(e),d.length===1&&this.buffers[I]&&this.executeNext(I)},q.insertAbort=function(e,I){var d=this.queues[I];d.unshift(e),this.executeNext(I)},q.appendBlocker=function(e){var I,d=new Promise(function(A){I=A}),p={execute:I,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(p,e),d},q.executeNext=function(e){var I=this.buffers,d=this.queues,p=I[e],A=d[e];if(A.length){var s=A[0];try{s.execute()}catch(i){V.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),s.onError(i),(!p||!p.updating)&&(A.shift(),this.executeNext(e))}}},q.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},q.current=function(e){return this.queues[e][0]},O}()},"./src/controller/cap-level-controller.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/events.ts");function U(k,e){for(var I=0;I<e.length;I++){var d=e[I];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(k,d.key,d)}}function O(k,e,I){return e&&U(k.prototype,e),I&&U(k,I),k}var q=function(){function k(I){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=I,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var e=k.prototype;return e.setStreamController=function(d){this.streamController=d},e.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},e.registerListeners=function(){var d=this.hls;d.on(V.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),d.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),d.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.on(V.Events.BUFFER_CODECS,this.onBufferCodecs,this),d.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.unregisterListener=function(){var d=this.hls;d.off(V.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),d.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),d.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.off(V.Events.BUFFER_CODECS,this.onBufferCodecs,this),d.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.onFpsDropLevelCapping=function(d,p){k.isLevelAllowed(p.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(p.droppedLevel)},e.onMediaAttaching=function(d,p){this.media=p.media instanceof HTMLVideoElement?p.media:null},e.onManifestParsed=function(d,p){var A=this.hls;this.restrictedLevels=[],this.firstLevel=p.firstLevel,A.config.capLevelToPlayerSize&&p.video&&this.startCapping()},e.onBufferCodecs=function(d,p){var A=this.hls;A.config.capLevelToPlayerSize&&p.video&&this.startCapping()},e.onMediaDetaching=function(){this.stopCapping()},e.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var d=this.hls.levels;if(d.length){var p=this.hls;p.autoLevelCapping=this.getMaxLevel(d.length-1),p.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=p.autoLevelCapping}}},e.getMaxLevel=function(d){var p=this,A=this.hls.levels;if(!A.length)return-1;var s=A.filter(function(i,o){return k.isLevelAllowed(o,p.restrictedLevels)&&o<=d});return this.clientRect=null,k.getMaxLevelByMediaSize(s,this.mediaWidth,this.mediaHeight)},e.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},e.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},e.getDimensions=function(){if(this.clientRect)return this.clientRect;var d=this.media,p={width:0,height:0};if(d){var A=d.getBoundingClientRect();p.width=A.width,p.height=A.height,!p.width&&!p.height&&(p.width=A.right-A.left||d.width||0,p.height=A.bottom-A.top||d.height||0)}return this.clientRect=p,p},k.isLevelAllowed=function(d,p){return p===void 0&&(p=[]),p.indexOf(d)===-1},k.getMaxLevelByMediaSize=function(d,p,A){if(!d||!d.length)return-1;for(var s=function(r,t){return t?r.width!==t.width||r.height!==t.height:!0},i=d.length-1,o=0;o<d.length;o+=1){var n=d[o];if((n.width>=p||n.height>=A)&&s(n,d[o+1])){i=o;break}}return i},O(k,[{key:"mediaWidth",get:function(){return this.getDimensions().width*k.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*k.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var d=1;try{d=self.devicePixelRatio}catch(p){}return d}}]),k}();W.default=q},"./src/controller/cmcd-controller.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return s});var V=L("./src/events.ts"),U=L("./src/types/cmcd.ts"),O=L("./src/utils/buffer-helper.ts"),q=L("./src/utils/logger.ts");function k(i,o){for(var n=0;n<o.length;n++){var a=o[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(i,a.key,a)}}function e(i,o,n){return o&&k(i.prototype,o),n&&k(i,n),i}function I(i,o){var n=typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(n)return(n=n.call(i)).next.bind(n);if(Array.isArray(i)||(n=d(i))||o&&i&&typeof i.length=="number"){n&&(i=n);var a=0;return function(){return a>=i.length?{done:!0}:{done:!1,value:i[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(i,o){if(!i)return;if(typeof i=="string")return p(i,o);var n=Object.prototype.toString.call(i).slice(8,-1);if(n==="Object"&&i.constructor&&(n=i.constructor.name),n==="Map"||n==="Set")return Array.from(i);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(i,o)}function p(i,o){(o==null||o>i.length)&&(o=i.length);for(var n=0,a=new Array(o);n<o;n++)a[n]=i[n];return a}function A(){return A=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(i[a]=n[a])}return i},A.apply(this,arguments)}var s=function(){function i(n){var a=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){a.initialized&&(a.starved=!0),a.buffering=!0},this.onPlaying=function(){a.initialized||(a.initialized=!0),a.buffering=!1},this.applyPlaylistData=function(y){try{a.apply(y,{ot:U.CMCDObjectType.MANIFEST,su:!a.initialized})}catch(b){q.logger.warn("Could not generate manifest CMCD data.",b)}},this.applyFragmentData=function(y){try{var b=y.frag,E=a.hls.levels[b.level],T=a.getObjectType(b),C={d:b.duration*1e3,ot:T};(T===U.CMCDObjectType.VIDEO||T===U.CMCDObjectType.AUDIO||T==U.CMCDObjectType.MUXED)&&(C.br=E.bitrate/1e3,C.tb=a.getTopBandwidth(T),C.bl=a.getBufferLength(T)),a.apply(y,C)}catch(h){q.logger.warn("Could not generate segment CMCD data.",h)}},this.hls=n;var r=this.config=n.config,t=r.cmcd;t!=null&&(r.pLoader=this.createPlaylistLoader(),r.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||i.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var o=i.prototype;return o.registerListeners=function(){var a=this.hls;a.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.on(V.Events.BUFFER_CREATED,this.onBufferCreated,this)},o.unregisterListeners=function(){var a=this.hls;a.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.off(V.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},o.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},o.onMediaAttached=function(a,r){this.media=r.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},o.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},o.onBufferCreated=function(a,r){var t,y;this.audioBuffer=(t=r.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(y=r.tracks.video)===null||y===void 0?void 0:y.buffer},o.createData=function(){var a;return{v:U.CMCDVersion,sf:U.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(a=this.media)===null||a===void 0?void 0:a.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},o.apply=function(a,r){r===void 0&&(r={}),A(r,this.createData());var t=r.ot===U.CMCDObjectType.INIT||r.ot===U.CMCDObjectType.VIDEO||r.ot===U.CMCDObjectType.MUXED;if(this.starved&&t&&(r.bs=!0,r.su=!0,this.starved=!1),r.su==null&&(r.su=this.buffering),this.useHeaders){var y=i.toHeaders(r);if(!Object.keys(y).length)return;a.headers||(a.headers={}),A(a.headers,y)}else{var b=i.toQuery(r);if(!b)return;a.url=i.appendQueryToUri(a.url,b)}},o.getObjectType=function(a){var r=a.type;return r==="subtitle"?U.CMCDObjectType.TIMED_TEXT:a.sn==="initSegment"?U.CMCDObjectType.INIT:r==="audio"?U.CMCDObjectType.AUDIO:r==="main"?this.hls.audioTracks.length?U.CMCDObjectType.VIDEO:U.CMCDObjectType.MUXED:void 0},o.getTopBandwidth=function(a){for(var r=0,t=a===U.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,y=I(t),b;!(b=y()).done;){var E=b.value;E.bitrate>r&&(r=E.bitrate)}return r>0?r:NaN},o.getBufferLength=function(a){var r=this.hls.media,t=a===U.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!r)return NaN;var y=O.BufferHelper.bufferInfo(t,r.currentTime,this.config.maxBufferHole);return y.len*1e3},o.createPlaylistLoader=function(){var a=this.config.pLoader,r=this.applyPlaylistData,t=a||this.config.loader;return function(){function y(E){this.loader=void 0,this.loader=new t(E)}var b=y.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(T,C,h){r(T),this.loader.load(T,C,h)},e(y,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),y}()},o.createFragmentLoader=function(){var a=this.config.fLoader,r=this.applyFragmentData,t=a||this.config.loader;return function(){function y(E){this.loader=void 0,this.loader=new t(E)}var b=y.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(T,C,h){r(T),this.loader.load(T,C,h)},e(y,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),y}()},i.uuid=function(){var a=URL.createObjectURL(new Blob),r=a.toString();return URL.revokeObjectURL(a),r.substr(r.lastIndexOf("/")+1)},i.serialize=function(a){for(var r=[],t=function(H){return!Number.isNaN(H)&&H!=null&&H!==""&&H!==!1},y=function(H){return Math.round(H)},b=function(H){return y(H/100)*100},E=function(H){return encodeURIComponent(H)},T={br:y,d:y,bl:b,dl:b,mtp:b,nor:E,rtp:b,tb:y},C=Object.keys(a||{}).sort(),h=I(C),c;!(c=h()).done;){var l=c.value,u=a[l];if(!t(u))continue;if(l==="v"&&u===1)continue;if(l=="pr"&&u===1)continue;var _=T[l];_&&(u=_(u));var g=typeof u,m=void 0;l==="ot"||l==="sf"||l==="st"?m=l+"="+u:g==="boolean"?m=l:g==="number"?m=l+"="+u:m=l+"="+JSON.stringify(u),r.push(m)}return r.join(",")},i.toHeaders=function(a){for(var r=Object.keys(a),t={},y=["Object","Request","Session","Status"],b=[{},{},{},{}],E={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},T=0,C=r;T<C.length;T++){var h=C[T],c=E[h]!=null?E[h]:1;b[c][h]=a[h]}for(var l=0;l<b.length;l++){var u=i.serialize(b[l]);u&&(t["CMCD-"+y[l]]=u)}return t},i.toQuery=function(a){return"CMCD="+encodeURIComponent(i.serialize(a))},i.appendQueryToUri=function(a,r){if(!r)return a;var t=a.includes("?")?"&":"?";return""+a+t+r},i}()},"./src/controller/eme-controller.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/events.ts"),U=L("./src/errors.ts"),O=L("./src/utils/logger.ts"),q=L("./src/utils/mediakeys-helper.ts");function k(s,i){for(var o=0;o<i.length;o++){var n=i[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,n.key,n)}}function e(s,i,o){return i&&k(s.prototype,i),o&&k(s,o),s}var I=3,d=function(i,o,n){var a={audioCapabilities:[],videoCapabilities:[]};return i.forEach(function(r){a.audioCapabilities.push({contentType:'audio/mp4; codecs="'+r+'"',robustness:n.audioRobustness||""})}),o.forEach(function(r){a.videoCapabilities.push({contentType:'video/mp4; codecs="'+r+'"',robustness:n.videoRobustness||""})}),[a]},p=function(i,o,n,a){switch(i){case q.KeySystems.WIDEVINE:return d(o,n,a);default:throw new Error("Unknown key-system: "+i)}},A=function(){function s(o){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=o,this._config=o.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var i=s.prototype;return i.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},i._registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this)},i._unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this)},i.getLicenseServerUrl=function(n){switch(n){case q.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+n+'"')},i._attemptKeySystemAccess=function(n,a,r){var t=this,y=p(n,a,r,this._drmSystemOptions);O.logger.log("Requesting encrypted media key-system access");var b=this.requestMediaKeySystemAccess(n,y);this.mediaKeysPromise=b.then(function(E){return t._onMediaKeySystemAccessObtained(n,E)}),b.catch(function(E){O.logger.error('Failed to obtain key-system "'+n+'" access:',E)})},i._onMediaKeySystemAccessObtained=function(n,a){var r=this;O.logger.log('Access for key-system "'+n+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:a,mediaKeySystemDomain:n};this._mediaKeysList.push(t);var y=Promise.resolve().then(function(){return a.createMediaKeys()}).then(function(b){return t.mediaKeys=b,O.logger.log('Media-keys created for key-system "'+n+'"'),r._onMediaKeysCreated(),b});return y.catch(function(b){O.logger.error("Failed to create media-keys:",b)}),y},i._onMediaKeysCreated=function(){var n=this;this._mediaKeysList.forEach(function(a){a.mediaKeysSession||(a.mediaKeysSession=a.mediaKeys.createSession(),n._onNewMediaKeySession(a.mediaKeysSession))})},i._onNewMediaKeySession=function(n){var a=this;O.logger.log("New key-system session "+n.sessionId),n.addEventListener("message",function(r){a._onKeySessionMessage(n,r.message)},!1)},i._onKeySessionMessage=function(n,a){O.logger.log("Got EME message event, creating license request"),this._requestLicense(a,function(r){O.logger.log("Received license data (length: "+(r&&r.byteLength)+"), updating key-session"),n.update(r)})},i.onMediaEncrypted=function(n){var a=this;if(O.logger.log('Media is encrypted using "'+n.initDataType+'" init data type'),!this.mediaKeysPromise){O.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.KEY_SYSTEM_ERROR,details:U.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var r=function(y){if(!a._media)return;a._attemptSetMediaKeys(y),a._generateRequestWithPreferredKeySession(n.initDataType,n.initData)};this.mediaKeysPromise.then(r).catch(r)},i._attemptSetMediaKeys=function(n){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var a=this._mediaKeysList[0];if(!a||!a.mediaKeys){O.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.KEY_SYSTEM_ERROR,details:U.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}O.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(a.mediaKeys),this._hasSetMediaKeys=!0}},i._generateRequestWithPreferredKeySession=function(n,a){var r=this,t=this._mediaKeysList[0];if(!t){O.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.KEY_SYSTEM_ERROR,details:U.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){O.logger.warn("Key-Session already initialized but requested again");return}var y=t.mediaKeysSession;if(!y){O.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.KEY_SYSTEM_ERROR,details:U.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!a){O.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.KEY_SYSTEM_ERROR,details:U.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}O.logger.log('Generating key-session request for "'+n+'" init data type'),t.mediaKeysSessionInitialized=!0,y.generateRequest(n,a).then(function(){O.logger.debug("Key-session generation succeeded")}).catch(function(b){O.logger.error("Error generating key-session request:",b),r.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.KEY_SYSTEM_ERROR,details:U.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},i._createLicenseXhr=function(n,a,r){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,n,a,r);var y=this._licenseXhrSetup;if(y)try{y.call(this.hls,t,n),y=void 0}catch(b){O.logger.error(b)}try{t.readyState||t.open("POST",n,!0),y&&y.call(this.hls,t,n)}catch(b){throw new Error("issue setting up KeySystem license XHR "+b)}return t},i._onLicenseRequestReadyStageChange=function(n,a,r,t){switch(n.readyState){case 4:if(n.status===200){this._requestLicenseFailureCount=0,O.logger.log("License request succeeded");var y=n.response,b=this._licenseResponseCallback;if(b)try{y=b.call(this.hls,n,a)}catch(T){O.logger.error(T)}t(y)}else{if(O.logger.error("License Request XHR failed ("+a+"). Status: "+n.status+" ("+n.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>I){this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.KEY_SYSTEM_ERROR,details:U.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var E=I-this._requestLicenseFailureCount+1;O.logger.warn("Retrying license request, "+E+" attempts left"),this._requestLicense(r,t)}break}},i._generateLicenseRequestChallenge=function(n,a){switch(n.mediaKeySystemDomain){case q.KeySystems.WIDEVINE:return a}throw new Error("unsupported key-system: "+n.mediaKeySystemDomain)},i._requestLicense=function(n,a){O.logger.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r){O.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.KEY_SYSTEM_ERROR,details:U.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(r.mediaKeySystemDomain),y=this._createLicenseXhr(t,n,a);O.logger.log("Sending license request to URL: "+t);var b=this._generateLicenseRequestChallenge(r,n);y.send(b)}catch(E){O.logger.error("Failure requesting DRM license: "+E),this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.KEY_SYSTEM_ERROR,details:U.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},i.onMediaAttached=function(n,a){if(!this._emeEnabled)return;var r=a.media;this._media=r,r.addEventListener("encrypted",this._onMediaEncrypted)},i.onMediaDetached=function(){var n=this._media,a=this._mediaKeysList;if(!n)return;n.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(a.map(function(r){if(r.mediaKeysSession)return r.mediaKeysSession.close().catch(function(){})})).then(function(){return n.setMediaKeys(null)}).catch(function(){})},i.onManifestParsed=function(n,a){if(!this._emeEnabled)return;var r=a.levels.map(function(y){return y.audioCodec}).filter(function(y){return!!y}),t=a.levels.map(function(y){return y.videoCodec}).filter(function(y){return!!y});this._attemptKeySystemAccess(q.KeySystems.WIDEVINE,r,t)},e(s,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),s}();W.default=A},"./src/controller/fps-controller.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/events.ts"),U=L("./src/utils/logger.ts"),O=function(){function q(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var k=q.prototype;return k.setStreamController=function(I){this.streamController=I},k.registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},k.unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching)},k.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},k.onMediaAttaching=function(I,d){var p=this.hls.config;if(p.capLevelOnFPSDrop){var A=d.media instanceof self.HTMLVideoElement?d.media:null;this.media=A,A&&typeof A.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),p.fpsDroppedMonitoringPeriod)}},k.checkFPS=function(I,d,p){var A=performance.now();if(d){if(this.lastTime){var s=A-this.lastTime,i=p-this.lastDroppedFrames,o=d-this.lastDecodedFrames,n=1e3*i/s,a=this.hls;if(a.trigger(V.Events.FPS_DROP,{currentDropped:i,currentDecoded:o,totalDroppedFrames:p}),n>0&&i>a.config.fpsDroppedMonitoringThreshold*o){var r=a.currentLevel;U.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+r),r>0&&(a.autoLevelCapping===-1||a.autoLevelCapping>=r)&&(r=r-1,a.trigger(V.Events.FPS_DROP_LEVEL_CAPPING,{level:r,droppedLevel:a.currentLevel}),a.autoLevelCapping=r,this.streamController.nextLevelSwitch())}}this.lastTime=A,this.lastDroppedFrames=p,this.lastDecodedFrames=d}},k.checkFPSInterval=function(){var I=this.media;if(I)if(this.isVideoPlaybackQualityAvailable){var d=I.getVideoPlaybackQuality();this.checkFPS(I,d.totalVideoFrames,d.droppedVideoFrames)}else this.checkFPS(I,I.webkitDecodedFrameCount,I.webkitDroppedFrameCount)},q}();W.default=O},"./src/controller/fragment-finders.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"findFragmentByPDT",function(){return O}),L.d(W,"findFragmentByPTS",function(){return q}),L.d(W,"fragmentWithinToleranceTest",function(){return k}),L.d(W,"pdtWithinToleranceTest",function(){return e}),L.d(W,"findFragWithCC",function(){return I});var V=L("./src/polyfills/number.ts"),U=L("./src/utils/binary-search.ts");function O(d,p,A){if(p===null||!Array.isArray(d)||!d.length||!Object(V.isFiniteNumber)(p))return null;var s=d[0].programDateTime;if(p<(s||0))return null;var i=d[d.length-1].endProgramDateTime;if(p>=(i||0))return null;A=A||0;for(var o=0;o<d.length;++o){var n=d[o];if(e(p,A,n))return n}return null}function q(d,p,A,s){A===void 0&&(A=0),s===void 0&&(s=0);var i=null;if(d?i=p[d.sn-p[0].sn+1]||null:A===0&&p[0].start===0&&(i=p[0]),i&&k(A,s,i)===0)return i;var o=U.default.search(p,k.bind(null,A,s));return o||i}function k(d,p,A){d===void 0&&(d=0),p===void 0&&(p=0);var s=Math.min(p,A.duration+(A.deltaPTS?A.deltaPTS:0));return A.start+A.duration-s<=d?1:A.start-s>d&&A.start?-1:0}function e(d,p,A){var s=Math.min(p,A.duration+(A.deltaPTS?A.deltaPTS:0))*1e3,i=A.endProgramDateTime||0;return i-s>d}function I(d,p){return U.default.search(d,function(A){return A.cc<p?1:A.cc>p?-1:0})}},"./src/controller/fragment-tracker.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"FragmentState",function(){return O}),L.d(W,"FragmentTracker",function(){return q});var V=L("./src/events.ts"),U=L("./src/types/loader.ts"),O;(function(I){I.NOT_LOADED="NOT_LOADED",I.BACKTRACKED="BACKTRACKED",I.APPENDING="APPENDING",I.PARTIAL="PARTIAL",I.OK="OK"})(O||(O={}));var q=function(){function I(p){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=p,this._registerListeners()}var d=I.prototype;return d._registerListeners=function(){var A=this.hls;A.on(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),A.on(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),A.on(V.Events.FRAG_LOADED,this.onFragLoaded,this)},d._unregisterListeners=function(){var A=this.hls;A.off(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),A.off(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),A.off(V.Events.FRAG_LOADED,this.onFragLoaded,this)},d.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},d.getAppendedFrag=function(A,s){if(s===U.PlaylistLevelType.MAIN){var i=this.activeFragment,o=this.activeParts;if(!i)return null;if(o)for(var n=o.length;n--;){var a=o[n],r=a?a.end:i.appendedPTS;if(a.start<=A&&r!==void 0&&A<=r)return n>9&&(this.activeParts=o.slice(n-9)),a}else if(i.start<=A&&i.appendedPTS!==void 0&&A<=i.appendedPTS)return i}return this.getBufferedFrag(A,s)},d.getBufferedFrag=function(A,s){for(var i=this.fragments,o=Object.keys(i),n=o.length;n--;){var a=i[o[n]];if((a==null?void 0:a.body.type)===s&&a.buffered){var r=a.body;if(r.start<=A&&A<=r.end)return r}}return null},d.detectEvictedFragments=function(A,s,i){var o=this;Object.keys(this.fragments).forEach(function(n){var a=o.fragments[n];if(!a)return;if(!a.buffered){a.body.type===i&&o.removeFragment(a.body);return}var r=a.range[A];if(!r)return;r.time.some(function(t){var y=!o.isTimeBuffered(t.startPTS,t.endPTS,s);return y&&o.removeFragment(a.body),y})})},d.detectPartialFragments=function(A){var s=this,i=this.timeRanges,o=A.frag,n=A.part;if(!i||o.sn==="initSegment")return;var a=e(o),r=this.fragments[a];if(!r)return;Object.keys(i).forEach(function(t){var y=o.elementaryStreams[t];if(!y)return;var b=i[t],E=n!==null||y.partial===!0;r.range[t]=s.getBufferedTimes(o,n,E,b)}),r.backtrack=r.loaded=null,Object.keys(r.range).length?r.buffered=!0:this.removeFragment(r.body)},d.fragBuffered=function(A){var s=e(A),i=this.fragments[s];i&&(i.backtrack=i.loaded=null,i.buffered=!0)},d.getBufferedTimes=function(A,s,i,o){for(var n={time:[],partial:i},a=s?s.start:A.start,r=s?s.end:A.end,t=A.minEndPTS||r,y=A.maxStartPTS||a,b=0;b<o.length;b++){var E=o.start(b)-this.bufferPadding,T=o.end(b)+this.bufferPadding;if(y>=E&&t<=T){n.time.push({startPTS:Math.max(a,o.start(b)),endPTS:Math.min(r,o.end(b))});break}else if(a<T&&r>E)n.partial=!0,n.time.push({startPTS:Math.max(a,o.start(b)),endPTS:Math.min(r,o.end(b))});else if(r<=E)break}return n},d.getPartialFragment=function(A){var s=null,i,o,n,a=0,r=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(y){var b=t[y];if(!b)return;k(b)&&(o=b.body.start-r,n=b.body.end+r,A>=o&&A<=n&&(i=Math.min(A-o,n-A),a<=i&&(s=b.body,a=i)))}),s},d.getState=function(A){var s=e(A),i=this.fragments[s];return i?i.buffered?k(i)?O.PARTIAL:O.OK:i.backtrack?O.BACKTRACKED:O.APPENDING:O.NOT_LOADED},d.backtrack=function(A,s){var i=e(A),o=this.fragments[i];if(!o||o.backtrack)return null;var n=o.backtrack=s||o.loaded;return o.loaded=null,n},d.getBacktrackData=function(A){var s=e(A),i=this.fragments[s];if(i){var o,n=i.backtrack;if(n!=null&&(o=n.payload)!==null&&o!==void 0&&o.byteLength)return n;this.removeFragment(A)}return null},d.isTimeBuffered=function(A,s,i){for(var o,n,a=0;a<i.length;a++){if(o=i.start(a)-this.bufferPadding,n=i.end(a)+this.bufferPadding,A>=o&&s<=n)return!0;if(s<=o)return!1}return!1},d.onFragLoaded=function(A,s){var i=s.frag,o=s.part;if(i.sn==="initSegment"||i.bitrateTest||o)return;var n=e(i);this.fragments[n]={body:i,loaded:s,backtrack:null,buffered:!1,range:Object.create(null)}},d.onBufferAppended=function(A,s){var i=this,o=s.frag,n=s.part,a=s.timeRanges;if(o.type===U.PlaylistLevelType.MAIN)if(this.activeFragment=o,n){var r=this.activeParts;r||(this.activeParts=r=[]),r.push(n)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach(function(t){var y=a[t];if(i.detectEvictedFragments(t,y),!n)for(var b=0;b<y.length;b++)o.appendedPTS=Math.max(y.end(b),o.appendedPTS||0)})},d.onFragBuffered=function(A,s){this.detectPartialFragments(s)},d.hasFragment=function(A){var s=e(A);return!!this.fragments[s]},d.removeFragmentsInRange=function(A,s,i){var o=this;Object.keys(this.fragments).forEach(function(n){var a=o.fragments[n];if(!a)return;if(a.buffered){var r=a.body;r.type===i&&r.start<s&&r.end>A&&o.removeFragment(r)}})},d.removeFragment=function(A){var s=e(A);A.stats.loaded=0,A.clearElementaryStreamInfo(),delete this.fragments[s]},d.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},I}();function k(I){var d,p;return I.buffered&&(((d=I.range.video)===null||d===void 0?void 0:d.partial)||((p=I.range.audio)===null||p===void 0?void 0:p.partial))}function e(I){return I.type+"_"+I.level+"_"+I.urlId+"_"+I.sn}},"./src/controller/gap-controller.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"STALL_MINIMUM_DURATION_MS",function(){return k}),L.d(W,"MAX_START_GAP_JUMP",function(){return e}),L.d(W,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return I}),L.d(W,"SKIP_BUFFER_RANGE_START",function(){return d}),L.d(W,"default",function(){return p});var V=L("./src/utils/buffer-helper.ts"),U=L("./src/errors.ts"),O=L("./src/events.ts"),q=L("./src/utils/logger.ts"),k=250,e=2,I=.1,d=.05,p=function(){function A(i,o,n,a){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=i,this.media=o,this.fragmentTracker=n,this.hls=a}var s=A.prototype;return s.destroy=function(){this.hls=this.fragmentTracker=this.media=null},s.poll=function(o){var n=this.config,a=this.media,r=this.stalled,t=a.currentTime,y=a.seeking,b=this.seeking&&!y,E=!this.seeking&&y;if(this.seeking=y,t!==o){if(this.moved=!0,r!==null){if(this.stallReported){var T=self.performance.now()-r;q.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(T)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((E||b)&&(this.stalled=null),a.paused||a.ended||a.playbackRate===0||!V.BufferHelper.getBuffered(a).length)return;var C=V.BufferHelper.bufferInfo(a,t,0),h=C.len>0,c=C.nextStart||0;if(!h&&!c)return;if(y){var l=C.len>e,u=!c||c-t>e&&!this.fragmentTracker.getPartialFragment(t);if(l||u)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var _,g=Math.max(c,C.start||0)-t,m=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,F=m==null||((_=m.details)===null||_===void 0)?void 0:_.live,H=F?m.details.targetduration*2:e;if(g>0&&g<=H){this._trySkipBufferHole(null);return}}var B=self.performance.now();if(r===null){this.stalled=B;return}var Q=B-r;!y&&Q>=k&&this._reportStall(C.len);var z=V.BufferHelper.bufferInfo(a,t,n.maxBufferHole);this._tryFixBufferStall(z,Q)},s._tryFixBufferStall=function(o,n){var a=this.config,r=this.fragmentTracker,t=this.media,y=t.currentTime,b=r.getPartialFragment(y);if(b){var E=this._trySkipBufferHole(b);if(E)return}o.len>a.maxBufferHole&&n>a.highBufferWatchdogPeriod*1e3&&(q.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},s._reportStall=function(o){var n=this.hls,a=this.media,r=this.stallReported;r||(this.stallReported=!0,q.logger.warn("Playback stalling at @"+a.currentTime+" due to low buffer (buffer="+o+")"),n.trigger(O.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:o}))},s._trySkipBufferHole=function(o){for(var n=this.config,a=this.hls,r=this.media,t=r.currentTime,y=0,b=V.BufferHelper.getBuffered(r),E=0;E<b.length;E++){var T=b.start(E);if(t+n.maxBufferHole>=y&&t<T){var C=Math.max(T+d,r.currentTime+I);return q.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+C),this.moved=!0,this.stalled=null,r.currentTime=C,o&&a.trigger(O.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+C,frag:o}),C}y=b.end(E)}return 0},s._tryNudgeBuffer=function(){var o=this.config,n=this.hls,a=this.media,r=a.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<o.nudgeMaxRetry){var y=r+t*o.nudgeOffset;q.logger.warn("Nudging 'currentTime' from "+r+" to "+y),a.currentTime=y,n.trigger(O.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else q.logger.error("Playhead still not moving while enough data buffered @"+r+" after "+o.nudgeMaxRetry+" nudges"),n.trigger(O.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},A}()},"./src/controller/id3-track-controller.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/events.ts"),U=L("./src/utils/texttrack-utils.ts"),O=L("./src/demux/id3.ts"),q=.25,k=function(){function e(d){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=d,this._registerListeners()}var I=e.prototype;return I.destroy=function(){this._unregisterListeners()},I._registerListeners=function(){var p=this.hls;p.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),p.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),p.on(V.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),p.on(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},I._unregisterListeners=function(){var p=this.hls;p.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),p.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),p.off(V.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),p.off(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},I.onMediaAttached=function(p,A){this.media=A.media},I.onMediaDetaching=function(){if(!this.id3Track)return;Object(U.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},I.getID3Track=function(p){if(!this.media)return;for(var A=0;A<p.length;A++){var s=p[A];if(s.kind==="metadata"&&s.label==="id3")return Object(U.sendAddTrackEvent)(s,this.media),s}return this.media.addTextTrack("metadata","id3")},I.onFragParsingMetadata=function(p,A){if(!this.media)return;var s=A.frag,i=A.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var o=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,n=0;n<i.length;n++){var a=O.getID3Frames(i[n].data);if(a){var r=i[n].pts,t=n<i.length-1?i[n+1].pts:s.end,y=t-r;y<=0&&(t=r+q);for(var b=0;b<a.length;b++){var E=a[b];if(!O.isTimeStampFrame(E)){var T=new o(r,t,"");T.value=E,this.id3Track.addCue(T)}}}}},I.onBufferFlushing=function(p,A){var s=A.startOffset,i=A.endOffset,o=A.type;if(!o||o==="audio"){var n=this.id3Track;n&&Object(U.removeCuesInRange)(n,s,i)}},e}();W.default=k},"./src/controller/latency-controller.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return e});var V=L("./src/errors.ts"),U=L("./src/events.ts"),O=L("./src/utils/logger.ts");function q(I,d){for(var p=0;p<d.length;p++){var A=d[p];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(I,A.key,A)}}function k(I,d,p){return d&&q(I.prototype,d),p&&q(I,p),I}var e=function(){function I(p){var A=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return A.timeupdate()},this.hls=p,this.config=p.config,this.registerListeners()}var d=I.prototype;return d.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},d.registerListeners=function(){this.hls.on(U.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(U.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(U.Events.ERROR,this.onError,this)},d.unregisterListeners=function(){this.hls.off(U.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(U.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(U.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(U.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(U.Events.ERROR,this.onError)},d.onMediaAttached=function(A,s){this.media=s.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},d.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},d.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},d.onLevelUpdated=function(A,s){var i=s.details;this.levelDetails=i,i.advanced&&this.timeupdate(),!i.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},d.onError=function(A,s){if(s.details!==V.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,O.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},d.timeupdate=function(){var A=this.media,s=this.levelDetails;if(!A||!s)return;this.currentTime=A.currentTime;var i=this.computeLatency();if(i===null)return;this._latency=i;var o=this.config,n=o.lowLatencyMode,a=o.maxLiveSyncPlaybackRate;if(!n||a===1)return;var r=this.targetLatency;if(r===null)return;var t=i-r,y=Math.min(this.maxLatency,r+s.targetduration),b=t<y;if(s.live&&b&&t>.05&&this.forwardBufferLength>1){var E=Math.min(2,Math.max(1,a)),T=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;A.playbackRate=Math.min(E,Math.max(1,T))}else A.playbackRate!==1&&A.playbackRate!==0&&(A.playbackRate=1)},d.estimateLiveEdge=function(){var A=this.levelDetails;return A===null?null:A.edge+A.age},d.computeLatency=function(){var A=this.estimateLiveEdge();return A===null?null:A-this.currentTime},k(I,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var A=this.config,s=this.levelDetails;return A.liveMaxLatencyDuration!==void 0?A.liveMaxLatencyDuration:s?A.liveMaxLatencyDurationCount*s.targetduration:0}},{key:"targetLatency",get:function(){var A=this.levelDetails;if(A===null)return null;var s=A.holdBack,i=A.partHoldBack,o=A.targetduration,n=this.config,a=n.liveSyncDuration,r=n.liveSyncDurationCount,t=n.lowLatencyMode,y=this.hls.userConfig,b=t&&i||s;(y.liveSyncDuration||y.liveSyncDurationCount||b===0)&&(b=a!==void 0?a:r*o);var E=o,T=1;return b+Math.min(this.stallCount*T,E)}},{key:"liveSyncPosition",get:function(){var A=this.estimateLiveEdge(),s=this.targetLatency,i=this.levelDetails;if(A===null||s===null||i===null)return null;var o=i.edge,n=A-s-this.edgeStalled,a=o-i.totalduration,r=o-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(a,n),r)}},{key:"drift",get:function(){var A=this.levelDetails;return A===null?1:A.drift}},{key:"edgeStalled",get:function(){var A=this.levelDetails;if(A===null)return 0;var s=(this.config.lowLatencyMode&&A.partTarget||A.targetduration)*3;return Math.max(A.age-s,0)}},{key:"forwardBufferLength",get:function(){var A=this.media,s=this.levelDetails;if(!A||!s)return 0;var i=A.buffered.length;return i?A.buffered.end(i-1):s.edge-this.currentTime}}]),I}()},"./src/controller/level-controller.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return n});var V=L("./src/types/level.ts"),U=L("./src/events.ts"),O=L("./src/errors.ts"),q=L("./src/utils/codecs.ts"),k=L("./src/controller/level-helper.ts"),e=L("./src/controller/base-playlist-controller.ts"),I=L("./src/types/loader.ts");function d(){return d=Object.assign||function(a){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var y in t)Object.prototype.hasOwnProperty.call(t,y)&&(a[y]=t[y])}return a},d.apply(this,arguments)}function p(a,r){for(var t=0;t<r.length;t++){var y=r[t];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(a,y.key,y)}}function A(a,r,t){return r&&p(a.prototype,r),t&&p(a,t),a}function s(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,i(a,r)}function i(a,r){return i=Object.setPrototypeOf||function(y,b){return y.__proto__=b,y},i(a,r)}var o=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),n=function(a){s(r,a);function r(y){var b;return b=a.call(this,y,"[level-controller]")||this,b._levels=[],b._firstLevel=-1,b._startLevel=void 0,b.currentLevelIndex=-1,b.manualLevelIndex=-1,b.onParsedComplete=void 0,b._registerListeners(),b}var t=r.prototype;return t._registerListeners=function(){var b=this.hls;b.on(U.Events.MANIFEST_LOADED,this.onManifestLoaded,this),b.on(U.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(U.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.on(U.Events.FRAG_LOADED,this.onFragLoaded,this),b.on(U.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var b=this.hls;b.off(U.Events.MANIFEST_LOADED,this.onManifestLoaded,this),b.off(U.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(U.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.off(U.Events.FRAG_LOADED,this.onFragLoaded,this),b.off(U.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,a.prototype.destroy.call(this)},t.startLoad=function(){var b=this._levels;b.forEach(function(E){E.loadError=0}),a.prototype.startLoad.call(this)},t.onManifestLoaded=function(b,E){var T=[],C=[],h=[],c,l={},u,_=!1,g=!1,m=!1;if(E.levels.forEach(function(Q){var z=Q.attrs;_=_||!!(Q.width&&Q.height),g=g||!!Q.videoCodec,m=m||!!Q.audioCodec,o&&Q.audioCodec&&Q.audioCodec.indexOf("mp4a.40.34")!==-1&&(Q.audioCodec=void 0);var N=Q.bitrate+"-"+Q.attrs.RESOLUTION+"-"+Q.attrs.CODECS;u=l[N],u?u.url.push(Q.url):(u=new V.Level(Q),l[N]=u,T.push(u)),z&&(z.AUDIO&&Object(k.addGroupId)(u,"audio",z.AUDIO),z.SUBTITLES&&Object(k.addGroupId)(u,"text",z.SUBTITLES))}),(_||g)&&m&&(T=T.filter(function(Q){var z=Q.videoCodec,N=Q.width,ee=Q.height;return!!z||!!(N&&ee)})),T=T.filter(function(Q){var z=Q.audioCodec,N=Q.videoCodec;return(!z||Object(q.isCodecSupportedInMp4)(z,"audio"))&&(!N||Object(q.isCodecSupportedInMp4)(N,"video"))}),E.audioTracks&&(C=E.audioTracks.filter(function(Q){return!Q.audioCodec||Object(q.isCodecSupportedInMp4)(Q.audioCodec,"audio")}),Object(k.assignTrackIdsByGroup)(C)),E.subtitles&&(h=E.subtitles,Object(k.assignTrackIdsByGroup)(h)),T.length>0){c=T[0].bitrate,T.sort(function(Q,z){return Q.bitrate-z.bitrate}),this._levels=T;for(var F=0;F<T.length;F++)if(T[F].bitrate===c){this._firstLevel=F,this.log("manifest loaded, "+T.length+" level(s) found, first bitrate: "+c);break}var H=m&&!g,B={levels:T,audioTracks:C,subtitleTracks:h,firstLevel:this._firstLevel,stats:E.stats,audio:m,video:g,altAudio:!H&&C.some(function(Q){return!!Q.url})};this.hls.trigger(U.Events.MANIFEST_PARSED,B),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(U.Events.ERROR,{type:O.ErrorTypes.MEDIA_ERROR,details:O.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:E.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(b,E){if(a.prototype.onError.call(this,b,E),E.fatal)return;var T=E.context,C=this._levels[this.currentLevelIndex];if(T&&(T.type===I.PlaylistContextType.AUDIO_TRACK&&C.audioGroupIds&&T.groupId===C.audioGroupIds[C.urlId]||T.type===I.PlaylistContextType.SUBTITLE_TRACK&&C.textGroupIds&&T.groupId===C.textGroupIds[C.urlId])){this.redundantFailover(this.currentLevelIndex);return}var h=!1,c=!0,l;switch(E.details){case O.ErrorDetails.FRAG_LOAD_ERROR:case O.ErrorDetails.FRAG_LOAD_TIMEOUT:case O.ErrorDetails.KEY_LOAD_ERROR:case O.ErrorDetails.KEY_LOAD_TIMEOUT:if(E.frag){var u=this._levels[E.frag.level];u?(u.fragmentError++,u.fragmentError>this.hls.config.fragLoadingMaxRetry&&(l=E.frag.level)):l=E.frag.level}break;case O.ErrorDetails.LEVEL_LOAD_ERROR:case O.ErrorDetails.LEVEL_LOAD_TIMEOUT:T&&(T.deliveryDirectives&&(c=!1),l=T.level),h=!0;break;case O.ErrorDetails.REMUX_ALLOC_ERROR:l=E.level,h=!0;break}l!==void 0&&this.recoverLevel(E,l,h,c)},t.recoverLevel=function(b,E,T,C){var h=b.details,c=this._levels[E];if(c.loadError++,T){var l=this.retryLoadingOrFail(b);if(l)b.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(C){var u=c.url.length;if(u>1&&c.loadError<u)b.levelRetry=!0,this.redundantFailover(E);else if(this.manualLevelIndex===-1){var _=E===0?this._levels.length-1:E-1;this.currentLevelIndex!==_&&this._levels[_].loadError===0&&(this.warn(h+": switch to "+_),b.levelRetry=!0,this.hls.nextAutoLevel=_)}}},t.redundantFailover=function(b){var E=this._levels[b],T=E.url.length;if(T>1){var C=(E.urlId+1)%T;this.warn("Switching to redundant URL-id "+C),this._levels.forEach(function(h){h.urlId=C}),this.level=b}},t.onFragLoaded=function(b,E){var T=E.frag;if(T!==void 0&&T.type===I.PlaylistLevelType.MAIN){var C=this._levels[T.level];C!==void 0&&(C.fragmentError=0,C.loadError=0)}},t.onLevelLoaded=function(b,E){var T,C=E.level,h=E.details,c=this._levels[C];if(!c){var l;this.warn("Invalid level index "+C),(l=E.deliveryDirectives)!==null&&l!==void 0&&l.skip&&(h.deltaUpdateFailed=!0);return}C===this.currentLevelIndex?(c.fragmentError===0&&(c.loadError=0,this.retryCount=0),this.playlistLoaded(C,E,c.details)):(T=E.deliveryDirectives)!==null&&T!==void 0&&T.skip&&(h.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(b,E){var T=this.hls.levels[this.currentLevelIndex];if(!T)return;if(T.audioGroupIds){for(var C=-1,h=this.hls.audioTracks[E.id].groupId,c=0;c<T.audioGroupIds.length;c++)if(T.audioGroupIds[c]===h){C=c;break}C!==T.urlId&&(T.urlId=C,this.startLoad())}},t.loadPlaylist=function(b){var E=this.currentLevelIndex,T=this._levels[E];if(this.canLoad&&T&&T.url.length>0){var C=T.urlId,h=T.url[C];if(b)try{h=b.addDirectives(h)}catch(c){this.warn("Could not construct new URL with HLS Delivery Directives: "+c)}this.log("Attempt loading level index "+E+(b?" at sn "+b.msn+" part "+b.part:"")+" with URL-id "+C+" "+h),this.clearTimer(),this.hls.trigger(U.Events.LEVEL_LOADING,{url:h,level:E,id:C,deliveryDirectives:b||null})}},t.removeLevel=function(b,E){var T=function(c,l){return l!==E},C=this._levels.filter(function(h,c){return c!==b?!0:h.url.length>1&&E!==void 0?(h.url=h.url.filter(T),h.audioGroupIds&&(h.audioGroupIds=h.audioGroupIds.filter(T)),h.textGroupIds&&(h.textGroupIds=h.textGroupIds.filter(T)),h.urlId=0,!0):!1}).map(function(h,c){var l=h.details;return l!=null&&l.fragments&&l.fragments.forEach(function(u){u.level=c}),h});this._levels=C,this.hls.trigger(U.Events.LEVELS_UPDATED,{levels:C})},A(r,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(b){var E,T=this._levels;if(T.length===0)return;if(this.currentLevelIndex===b&&(E=T[b])!==null&&E!==void 0&&E.details)return;if(b<0||b>=T.length){var C=b<0;if(this.hls.trigger(U.Events.ERROR,{type:O.ErrorTypes.OTHER_ERROR,details:O.ErrorDetails.LEVEL_SWITCH_ERROR,level:b,fatal:C,reason:"invalid level idx"}),C)return;b=Math.min(b,T.length-1)}this.clearTimer();var h=this.currentLevelIndex,c=T[h],l=T[b];this.log("switching to level "+b+" from "+h),this.currentLevelIndex=b;var u=d({},l,{level:b,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete u._urlId,this.hls.trigger(U.Events.LEVEL_SWITCHING,u);var _=l.details;if(!_||_.live){var g=this.switchParams(l.uri,c==null?void 0:c.details);this.loadPlaylist(g)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(b){this.manualLevelIndex=b,this._startLevel===void 0&&(this._startLevel=b),b!==-1&&(this.level=b)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(b){this._firstLevel=b}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var b=this.hls.config.startLevel;return b!==void 0?b:this._firstLevel}else return this._startLevel},set:function(b){this._startLevel=b}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(b){this.level=b,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=b)}}]),r}(e.default)},"./src/controller/level-helper.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"addGroupId",function(){return O}),L.d(W,"assignTrackIdsByGroup",function(){return q}),L.d(W,"updatePTS",function(){return k}),L.d(W,"updateFragPTSDTS",function(){return I}),L.d(W,"mergeDetails",function(){return d}),L.d(W,"mapPartIntersection",function(){return p}),L.d(W,"mapFragmentIntersection",function(){return A}),L.d(W,"adjustSliding",function(){return s}),L.d(W,"addSliding",function(){return i}),L.d(W,"computeReloadInterval",function(){return o}),L.d(W,"getFragmentWithSN",function(){return n}),L.d(W,"getPartWith",function(){return a});var V=L("./src/polyfills/number.ts"),U=L("./src/utils/logger.ts");function O(r,t,y){switch(t){case"audio":r.audioGroupIds||(r.audioGroupIds=[]),r.audioGroupIds.push(y);break;case"text":r.textGroupIds||(r.textGroupIds=[]),r.textGroupIds.push(y);break}}function q(r){var t={};r.forEach(function(y){var b=y.groupId||"";y.id=t[b]=t[b]||0,t[b]++})}function k(r,t,y){var b=r[t],E=r[y];e(b,E)}function e(r,t){var y=t.startPTS;if(Object(V.isFiniteNumber)(y)){var b=0,E;t.sn>r.sn?(b=y-r.start,E=r):(b=r.start-y,E=t),E.duration!==b&&(E.duration=b)}else if(t.sn>r.sn){var T=r.cc===t.cc;T&&r.minEndPTS?t.start=r.start+(r.minEndPTS-r.start):t.start=r.start+r.duration}else t.start=Math.max(r.start-t.duration,0)}function I(r,t,y,b,E,T){var C=b-y;C<=0&&(U.logger.warn("Fragment should have a positive duration",t),b=y+t.duration,T=E+t.duration);var h=y,c=b,l=t.startPTS,u=t.endPTS;if(Object(V.isFiniteNumber)(l)){var _=Math.abs(l-y);Object(V.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(_,t.deltaPTS):t.deltaPTS=_,h=Math.max(y,l),y=Math.min(y,l),E=Math.min(E,t.startDTS),c=Math.min(b,u),b=Math.max(b,u),T=Math.max(T,t.endDTS)}t.duration=b-y;var g=y-t.start;t.appendedPTS=b,t.start=t.startPTS=y,t.maxStartPTS=h,t.startDTS=E,t.endPTS=b,t.minEndPTS=c,t.endDTS=T;var m=t.sn;if(!r||m<r.startSN||m>r.endSN)return 0;var F,H=m-r.startSN,B=r.fragments;for(B[H]=t,F=H;F>0;F--)e(B[F],B[F-1]);for(F=H;F<B.length-1;F++)e(B[F],B[F+1]);return r.fragmentHint&&e(B[B.length-1],r.fragmentHint),r.PTSKnown=r.alignedSliding=!0,g}function d(r,t){for(var y=null,b=r.fragments,E=b.length-1;E>=0;E--){var T=b[E].initSegment;if(T){y=T;break}}r.fragmentHint&&delete r.fragmentHint.endPTS;var C=0,h;if(A(r,t,function(F,H){F.relurl&&(C=F.cc-H.cc),Object(V.isFiniteNumber)(F.startPTS)&&Object(V.isFiniteNumber)(F.endPTS)&&(H.start=H.startPTS=F.startPTS,H.startDTS=F.startDTS,H.appendedPTS=F.appendedPTS,H.maxStartPTS=F.maxStartPTS,H.endPTS=F.endPTS,H.endDTS=F.endDTS,H.minEndPTS=F.minEndPTS,H.duration=F.endPTS-F.startPTS,H.duration&&(h=H),t.PTSKnown=t.alignedSliding=!0),H.elementaryStreams=F.elementaryStreams,H.loader=F.loader,H.stats=F.stats,H.urlId=F.urlId,F.initSegment&&(H.initSegment=F.initSegment,y=F.initSegment)}),y){var c=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;c.forEach(function(F){var H;(!F.initSegment||F.initSegment.relurl===((H=y)===null||H===void 0?void 0:H.relurl))&&(F.initSegment=y)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(F){return!F}),t.deltaUpdateFailed)){U.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var l=t.skippedSegments;l--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var u=t.fragments;if(C){U.logger.warn("discontinuity sliding from playlist, take drift into account");for(var _=0;_<u.length;_++)u[_].cc+=C}t.skippedSegments&&(t.startCC=t.fragments[0].cc),p(r.partList,t.partList,function(F,H){H.elementaryStreams=F.elementaryStreams,H.stats=F.stats}),h?I(t,h,h.startPTS,h.endPTS,h.startDTS,h.endDTS):s(r,t),u.length&&(t.totalduration=t.edge-u[0].start),t.driftStartTime=r.driftStartTime,t.driftStart=r.driftStart;var g=t.advancedDateTime;if(t.advanced&&g){var m=t.edge;t.driftStart||(t.driftStartTime=g,t.driftStart=m),t.driftEndTime=g,t.driftEnd=m}else t.driftEndTime=r.driftEndTime,t.driftEnd=r.driftEnd,t.advancedDateTime=r.advancedDateTime}function p(r,t,y){if(r&&t)for(var b=0,E=0,T=r.length;E<=T;E++){var C=r[E],h=t[E+b];C&&h&&C.index===h.index&&C.fragment.sn===h.fragment.sn?y(C,h):b--}}function A(r,t,y){for(var b=t.skippedSegments,E=Math.max(r.startSN,t.startSN)-t.startSN,T=(r.fragmentHint?1:0)+(b?t.endSN:Math.min(r.endSN,t.endSN))-t.startSN,C=t.startSN-r.startSN,h=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,c=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments,l=E;l<=T;l++){var u=c[C+l],_=h[l];b&&!_&&l<b&&(_=t.fragments[l]=u),u&&_&&y(u,_)}}function s(r,t){var y=t.startSN+t.skippedSegments-r.startSN,b=r.fragments;if(y<0||y>=b.length)return;i(t,b[y].start)}function i(r,t){if(t){for(var y=r.fragments,b=r.skippedSegments;b<y.length;b++)y[b].start+=t;r.fragmentHint&&(r.fragmentHint.start+=t)}}function o(r,t){var y=1e3*r.levelTargetDuration,b=y/2,E=r.age,T=E>0&&E<y*3,C=t.loading.end-t.loading.start,h,c=r.availabilityDelay;if(r.updated===!1)if(T){var l=333*r.misses;h=Math.max(Math.min(b,C*2),l),r.availabilityDelay=(r.availabilityDelay||0)+h}else h=b;else T?(c=Math.min(c||y/2,E),r.availabilityDelay=c,h=c+y-E):h=y-C;return Math.round(h)}function n(r,t,y){if(!r||!r.details)return null;var b=r.details,E=b.fragments[t-b.startSN];return E||(E=b.fragmentHint,E&&E.sn===t?E:t<b.startSN&&y&&y.sn===t?y:null)}function a(r,t,y){if(!r||!r.details)return null;var b=r.details.partList;if(b)for(var E=b.length;E--;){var T=b[E];if(T.index===y&&T.fragment.sn===t)return T}return null}},"./src/controller/stream-controller.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return b});var V=L("./src/polyfills/number.ts"),U=L("./src/controller/base-stream-controller.ts"),O=L("./src/is-supported.ts"),q=L("./src/events.ts"),k=L("./src/utils/buffer-helper.ts"),e=L("./src/controller/fragment-tracker.ts"),I=L("./src/types/loader.ts"),d=L("./src/loader/fragment.ts"),p=L("./src/demux/transmuxer-interface.ts"),A=L("./src/types/transmuxer.ts"),s=L("./src/controller/gap-controller.ts"),i=L("./src/errors.ts"),o=L("./src/utils/logger.ts");function n(E,T){for(var C=0;C<T.length;C++){var h=T[C];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(E,h.key,h)}}function a(E,T,C){return T&&n(E.prototype,T),C&&n(E,C),E}function r(E,T){E.prototype=Object.create(T.prototype),E.prototype.constructor=E,t(E,T)}function t(E,T){return t=Object.setPrototypeOf||function(h,c){return h.__proto__=c,h},t(E,T)}var y=100,b=function(E){r(T,E);function T(h,c){var l;return l=E.call(this,h,c,"[stream-controller]")||this,l.audioCodecSwap=!1,l.gapController=null,l.level=-1,l._forceStartLoad=!1,l.altAudio=!1,l.audioOnly=!1,l.fragPlaying=null,l.onvplaying=null,l.onvseeked=null,l.fragLastKbps=0,l.stalled=!1,l.couldBacktrack=!1,l.audioCodecSwitch=!1,l.videoBuffer=null,l._registerListeners(),l}var C=T.prototype;return C._registerListeners=function(){var c=this.hls;c.on(q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.on(q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.on(q.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.on(q.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.on(q.Events.LEVEL_LOADING,this.onLevelLoading,this),c.on(q.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.on(q.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),c.on(q.Events.ERROR,this.onError,this),c.on(q.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),c.on(q.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),c.on(q.Events.BUFFER_CREATED,this.onBufferCreated,this),c.on(q.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),c.on(q.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),c.on(q.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C._unregisterListeners=function(){var c=this.hls;c.off(q.Events.MEDIA_ATTACHED,this.onMediaAttached,this),c.off(q.Events.MEDIA_DETACHING,this.onMediaDetaching,this),c.off(q.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(q.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.off(q.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.off(q.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),c.off(q.Events.ERROR,this.onError,this),c.off(q.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),c.off(q.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),c.off(q.Events.BUFFER_CREATED,this.onBufferCreated,this),c.off(q.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),c.off(q.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),c.off(q.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},C.startLoad=function(c){if(this.levels){var l=this.lastCurrentTime,u=this.hls;if(this.stopLoad(),this.setInterval(y),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var _=u.startLevel;_===-1&&(u.config.testBandwidth?(_=0,this.bitrateTest=!0):_=u.nextAutoLevel),this.level=u.nextLoadLevel=_,this.loadedmetadata=!1}l>0&&c===-1&&(this.log("Override startPosition with lastCurrentTime @"+l.toFixed(3)),c=l),this.state=U.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=c,this.tick()}else this._forceStartLoad=!0,this.state=U.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,E.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case U.State.IDLE:this.doTickIdle();break;case U.State.WAITING_LEVEL:{var c,l=this.levels,u=this.level,_=l==null||((c=l[u])===null||c===void 0)?void 0:c.details;if(_&&(!_.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(_))break;this.state=U.State.IDLE;break}break}case U.State.FRAG_LOADING_WAITING_RETRY:{var g,m=self.performance.now(),F=this.retryDate;(!F||m>=F||(g=this.media)!==null&&g!==void 0&&g.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=U.State.IDLE)}break;default:break}this.onTickEnd()},C.onTickEnd=function(){E.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var c,l,u=this.hls,_=this.levelLastLoaded,g=this.levels,m=this.media,F=u.config,H=u.nextLoadLevel;if(_===null||!m&&(this.startFragRequested||!F.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!g||!g[H])return;var B=g[H];this.level=u.nextLoadLevel=H;var Q=B.details;if(!Q||this.state===U.State.WAITING_LEVEL||Q.live&&this.levelLastLoaded!==H){this.state=U.State.WAITING_LEVEL;return}var z=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:m,I.PlaylistLevelType.MAIN);if(z===null)return;var N=z.len,ee=this.getMaxBufferLength(B.maxBitrate);if(N>=ee)return;if(this._streamEnded(z,Q)){var le={};this.altAudio&&(le.type="video"),this.hls.trigger(q.Events.BUFFER_EOS,le),this.state=U.State.ENDED;return}var Be=z.end,Ce=this.getNextFragment(Be,Q);if(this.couldBacktrack&&!this.fragPrevious&&Ce&&Ce.sn!=="initSegment"){var Me=Ce.sn-Q.startSN;Me>1&&(Ce=Q.fragments[Me-1],this.fragmentTracker.removeFragment(Ce))}if(Ce&&this.fragmentTracker.getState(Ce)===e.FragmentState.OK&&this.nextLoadPosition>Be){var Le=this.audioOnly&&!this.altAudio?d.ElementaryStreamTypes.AUDIO:d.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(m,Le,I.PlaylistLevelType.MAIN),Ce=this.getNextFragment(this.nextLoadPosition,Q)}if(!Ce)return;Ce.initSegment&&!Ce.initSegment.data&&!this.bitrateTest&&(Ce=Ce.initSegment),((c=Ce.decryptdata)===null||c===void 0?void 0:c.keyFormat)==="identity"&&!((l=Ce.decryptdata)!==null&&l!==void 0&&l.key)?this.loadKey(Ce,Q):this.loadFragment(Ce,Q,Be)},C.loadFragment=function(c,l,u){var _,g=this.fragmentTracker.getState(c);if(this.fragCurrent=c,g===e.FragmentState.BACKTRACKED){var m=this.fragmentTracker.getBacktrackData(c);if(m){this._handleFragmentLoadProgress(m),this._handleFragmentLoadComplete(m);return}else g=e.FragmentState.NOT_LOADED}g===e.FragmentState.NOT_LOADED||g===e.FragmentState.PARTIAL?c.sn==="initSegment"?this._loadInitSegment(c):this.bitrateTest?(c.bitrateTest=!0,this.log("Fragment "+c.sn+" of level "+c.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(c)):(this.startFragRequested=!0,E.prototype.loadFragment.call(this,c,l,u)):g===e.FragmentState.APPENDING?this.reduceMaxBufferLength(c.duration)&&this.fragmentTracker.removeFragment(c):((_=this.media)===null||_===void 0?void 0:_.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(c){var l=this.fragmentTracker.getAppendedFrag(c,I.PlaylistLevelType.MAIN);return l&&"fragment"in l?l.fragment:l},C.getBufferedFrag=function(c){return this.fragmentTracker.getBufferedFrag(c,I.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(c){return c?this.getBufferedFrag(c.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var c=this.levels,l=this.media;if(l!=null&&l.readyState){var u,_=this.getAppendedFrag(l.currentTime);if(_&&_.start>1&&this.flushMainBuffer(0,_.start-1),!l.paused&&c){var g=this.hls.nextLoadLevel,m=c[g],F=this.fragLastKbps;F&&this.fragCurrent?u=this.fragCurrent.duration*m.maxBitrate/(1e3*F)+1:u=0}else u=0;var H=this.getBufferedFrag(l.currentTime+u);if(H){var B=this.followingBufferedFrag(H);if(B){this.abortCurrentFrag();var Q=B.maxStartPTS?B.maxStartPTS:B.start,z=B.duration,N=Math.max(H.end,Q+Math.min(Math.max(z-this.config.maxFragLookUpTolerance,z*.5),z*.75));this.flushMainBuffer(N,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var c=this.fragCurrent;this.fragCurrent=null,c!=null&&c.loader&&c.loader.abort(),this.state===U.State.KEY_LOADING&&(this.state=U.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(c,l){E.prototype.flushMainBuffer.call(this,c,l,this.altAudio?"video":null)},C.onMediaAttached=function(c,l){E.prototype.onMediaAttached.call(this,c,l);var u=l.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),u.addEventListener("playing",this.onvplaying),u.addEventListener("seeked",this.onvseeked),this.gapController=new s.default(this.config,u,this.fragmentTracker,this.hls)},C.onMediaDetaching=function(){var c=this.media;c&&(c.removeEventListener("playing",this.onvplaying),c.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),E.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var c=this.media,l=c?c.currentTime:null;Object(V.isFiniteNumber)(l)&&this.log("Media seeked to "+l.toFixed(3)),this.tick()},C.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(q.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},C.onManifestParsed=function(c,l){var u=!1,_=!1,g;l.levels.forEach(function(m){g=m.audioCodec,g&&(g.indexOf("mp4a.40.2")!==-1&&(u=!0),g.indexOf("mp4a.40.5")!==-1&&(_=!0))}),this.audioCodecSwitch=u&&_&&!Object(O.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=l.levels,this.startFragRequested=!1},C.onLevelLoading=function(c,l){var u=this.levels;if(!u||this.state!==U.State.IDLE)return;var _=u[l.level];(!_.details||_.details.live&&this.levelLastLoaded!==l.level||this.waitForCdnTuneIn(_.details))&&(this.state=U.State.WAITING_LEVEL)},C.onLevelLoaded=function(c,l){var u,_=this.levels,g=l.level,m=l.details,F=m.totalduration;if(!_){this.warn("Levels were reset while loading level "+g);return}this.log("Level "+g+" loaded ["+m.startSN+","+m.endSN+"], cc ["+m.startCC+", "+m.endCC+"] duration:"+F);var H=this.fragCurrent;H&&(this.state===U.State.FRAG_LOADING||this.state===U.State.FRAG_LOADING_WAITING_RETRY)&&(H.level!==l.level&&H.loader&&(this.state=U.State.IDLE,H.loader.abort()));var B=_[g],Q=0;if(m.live||(u=B.details)!==null&&u!==void 0&&u.live){if(m.fragments[0]||(m.deltaUpdateFailed=!0),m.deltaUpdateFailed)return;Q=this.alignPlaylists(m,B.details)}if(B.details=m,this.levelLastLoaded=g,this.hls.trigger(q.Events.LEVEL_UPDATED,{details:m,level:g}),this.state===U.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(m))return;this.state=U.State.IDLE}this.startFragRequested?m.live&&this.synchronizeToLiveEdge(m):this.setStartPosition(m,Q),this.tick()},C._handleFragmentLoadProgress=function(c){var l,u=c.frag,_=c.part,g=c.payload,m=this.levels;if(!m){this.warn("Levels were reset while fragment load was in progress. Fragment "+u.sn+" of level "+u.level+" will not be buffered");return}var F=m[u.level],H=F.details;if(!H){this.warn("Dropping fragment "+u.sn+" of level "+u.level+" after level details were reset");return}var B=F.videoCodec,Q=H.PTSKnown||!H.live,z=(l=u.initSegment)===null||l===void 0?void 0:l.data,N=this._getAudioCodec(F),ee=this.transmuxer=this.transmuxer||new p.default(this.hls,I.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),le=_?_.index:-1,Be=le!==-1,Ce=new A.ChunkMetadata(u.level,u.sn,u.stats.chunkCount,g.byteLength,le,Be),Me=this.initPTS[u.cc];ee.push(g,z,N,B,u,_,H.totalduration,Q,Ce,Me)},C.onAudioTrackSwitching=function(c,l){var u=this.altAudio,_=!!l.url,g=l.id;if(!_){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var m=this.fragCurrent;m!=null&&m.loader&&(this.log("Switching to main audio track, cancel main fragment load"),m.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var F=this.hls;u&&F.trigger(q.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),F.trigger(q.Events.AUDIO_TRACK_SWITCHED,{id:g})}},C.onAudioTrackSwitched=function(c,l){var u=l.id,_=!!this.hls.audioTracks[u].url;if(_){var g=this.videoBuffer;g&&this.mediaBuffer!==g&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=g)}this.altAudio=_,this.tick()},C.onBufferCreated=function(c,l){var u=l.tracks,_,g,m=!1;for(var F in u){var H=u[F];if(H.id==="main"){if(g=F,_=H,F==="video"){var B=u[F];B&&(this.videoBuffer=B.buffer)}}else m=!0}m&&_?(this.log("Alternate track found, use "+g+".buffered to schedule main fragment loading"),this.mediaBuffer=_.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(c,l){var u=l.frag,_=l.part;if(u&&u.type!==I.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(u)){this.warn("Fragment "+u.sn+(_?" p: "+_.index:"")+" of level "+u.level+" finished buffering, but was aborted. state: "+this.state),this.state===U.State.PARSED&&(this.state=U.State.IDLE);return}var g=_?_.stats:u.stats;this.fragLastKbps=Math.round(8*g.total/(g.buffering.end-g.loading.first)),u.sn!=="initSegment"&&(this.fragPrevious=u),this.fragBufferedComplete(u,_)},C.onError=function(c,l){switch(l.details){case i.ErrorDetails.FRAG_LOAD_ERROR:case i.ErrorDetails.FRAG_LOAD_TIMEOUT:case i.ErrorDetails.KEY_LOAD_ERROR:case i.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(I.PlaylistLevelType.MAIN,l);break;case i.ErrorDetails.LEVEL_LOAD_ERROR:case i.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==U.State.ERROR&&(l.fatal?(this.warn(""+l.details),this.state=U.State.ERROR):!l.levelRetry&&this.state===U.State.WAITING_LEVEL&&(this.state=U.State.IDLE));break;case i.ErrorDetails.BUFFER_FULL_ERROR:if(l.parent==="main"&&(this.state===U.State.PARSING||this.state===U.State.PARSED)){var u=!0,_=this.getFwdBufferInfo(this.media,I.PlaylistLevelType.MAIN);_&&_.len>.5&&(u=!this.reduceMaxBufferLength(_.len)),u&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},C.checkBuffer=function(){var c=this.media,l=this.gapController;if(!c||!l||!c.readyState)return;var u=k.BufferHelper.getBuffered(c);!this.loadedmetadata&&u.length?(this.loadedmetadata=!0,this.seekToStartPos()):l.poll(this.lastCurrentTime),this.lastCurrentTime=c.currentTime},C.onFragLoadEmergencyAborted=function(){this.state=U.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(c,l){var u=l.type;if(u!==d.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var _=(u===d.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(_,u,I.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(c,l){this.levels=l.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var c=this.media,l=c.currentTime,u=this.startPosition;if(u>=0&&l<u){if(c.seeking){o.logger.log("could not seek to "+u+", already seeking at "+l);return}var _=k.BufferHelper.getBuffered(c),g=_.length?_.start(0):0,m=g-u;m>0&&(m<this.config.maxBufferHole||m<this.config.maxFragLookUpTolerance)&&(o.logger.log("adjusting start position by "+m+" to match buffer start"),u+=m,this.startPosition=u),this.log("seek to target start position "+u+" from current time "+l),c.currentTime=u}},C._getAudioCodec=function(c){var l=this.config.defaultAudioCodec||c.audioCodec;return this.audioCodecSwap&&l&&(this.log("Swapping audio codec"),l.indexOf("mp4a.40.5")!==-1?l="mp4a.40.2":l="mp4a.40.5"),l},C._loadBitrateTestFrag=function(c){var l=this;this._doFragLoad(c).then(function(u){var _=l.hls;if(!u||_.nextLoadLevel||l.fragContextChanged(c))return;l.fragLoadError=0,l.state=U.State.IDLE,l.startFragRequested=!1,l.bitrateTest=!1;var g=c.stats;g.parsing.start=g.parsing.end=g.buffering.start=g.buffering.end=self.performance.now(),_.trigger(q.Events.FRAG_LOADED,u)})},C._handleTransmuxComplete=function(c){var l,u="main",_=this.hls,g=c.remuxResult,m=c.chunkMeta,F=this.getCurrentContext(m);if(!F){this.warn("The loading context changed while buffering fragment "+m.sn+" of level "+m.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(m.level);return}var H=F.frag,B=F.part,Q=F.level,z=g.video,N=g.text,ee=g.id3,le=g.initSegment,Be=this.altAudio?void 0:g.audio;if(this.fragContextChanged(H))return;if(this.state=U.State.PARSING,le){le.tracks&&(this._bufferInitSegment(Q,le.tracks,H,m),_.trigger(q.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:u,tracks:le.tracks}));var Ce=le.initPTS,Me=le.timescale;Object(V.isFiniteNumber)(Ce)&&(this.initPTS[H.cc]=Ce,_.trigger(q.Events.INIT_PTS_FOUND,{frag:H,id:u,initPTS:Ce,timescale:Me}))}if(z&&g.independent!==!1){if(Q.details){var Le=z.startPTS,je=z.endPTS,He=z.startDTS,Je=z.endDTS;if(B)B.elementaryStreams[z.type]={startPTS:Le,endPTS:je,startDTS:He,endDTS:Je};else if(z.firstKeyFrame&&z.independent&&(this.couldBacktrack=!0),z.dropped&&z.independent){var Se=this.getLoadPosition()+this.config.maxBufferHole;if(Se<Le){this.backtrack(H);return}H.setElementaryStreamInfo(z.type,H.start,je,H.start,Je,!0)}H.setElementaryStreamInfo(z.type,Le,je,He,Je),this.bufferFragmentData(z,H,B,m)}}else if(g.independent===!1){this.backtrack(H);return}if(Be){var $=Be.startPTS,D=Be.endPTS,M=Be.startDTS,te=Be.endDTS;B&&(B.elementaryStreams[d.ElementaryStreamTypes.AUDIO]={startPTS:$,endPTS:D,startDTS:M,endDTS:te}),H.setElementaryStreamInfo(d.ElementaryStreamTypes.AUDIO,$,D,M,te),this.bufferFragmentData(Be,H,B,m)}if(ee!=null&&(l=ee.samples)!==null&&l!==void 0&&l.length){var oe={frag:H,id:u,samples:ee.samples};_.trigger(q.Events.FRAG_PARSING_METADATA,oe)}if(N){var G={frag:H,id:u,samples:N.samples};_.trigger(q.Events.FRAG_PARSING_USERDATA,G)}},C._bufferInitSegment=function(c,l,u,_){var g=this;if(this.state!==U.State.PARSING)return;this.audioOnly=!!l.audio&&!l.video,this.altAudio&&!this.audioOnly&&delete l.audio;var m=l.audio,F=l.video,H=l.audiovideo;if(m){var B=c.audioCodec,Q=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(B&&(B.indexOf("mp4a.40.5")!==-1?B="mp4a.40.2":B="mp4a.40.5"),m.metadata.channelCount!==1&&Q.indexOf("firefox")===-1&&(B="mp4a.40.5")),Q.indexOf("android")!==-1&&m.container!=="audio/mpeg"&&(B="mp4a.40.2",this.log("Android: force audio codec to "+B)),c.audioCodec&&c.audioCodec!==B&&this.log('Swapping manifest audio codec "'+c.audioCodec+'" for "'+B+'"'),m.levelCodec=B,m.id="main",this.log("Init audio buffer, container:"+m.container+", codecs[selected/level/parsed]=["+(B||"")+"/"+(c.audioCodec||"")+"/"+m.codec+"]")}F&&(F.levelCodec=c.videoCodec,F.id="main",this.log("Init video buffer, container:"+F.container+", codecs[level/parsed]=["+(c.videoCodec||"")+"/"+F.codec+"]")),H&&this.log("Init audiovideo buffer, container:"+H.container+", codecs[level/parsed]=["+(c.attrs.CODECS||"")+"/"+H.codec+"]"),this.hls.trigger(q.Events.BUFFER_CODECS,l),Object.keys(l).forEach(function(z){var N=l[z],ee=N.initSegment;ee!=null&&ee.byteLength&&g.hls.trigger(q.Events.BUFFER_APPENDING,{type:z,data:ee,frag:u,part:null,chunkMeta:_,parent:u.type})}),this.tick()},C.backtrack=function(c){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(c);var l=this.fragmentTracker.backtrack(c);this.fragPrevious=null,this.nextLoadPosition=c.start,l?this.resetFragmentLoading(c):this.state=U.State.BACKTRACKING},C.checkFragmentChanged=function(){var c=this.media,l=null;if(c&&c.readyState>1&&c.seeking===!1){var u=c.currentTime;if(k.BufferHelper.isBuffered(c,u)?l=this.getAppendedFrag(u):k.BufferHelper.isBuffered(c,u+.1)&&(l=this.getAppendedFrag(u+.1)),l){var _=this.fragPlaying,g=l.level;(!_||l.sn!==_.sn||_.level!==g||l.urlId!==_.urlId)&&(this.hls.trigger(q.Events.FRAG_CHANGED,{frag:l}),(!_||_.level!==g)&&this.hls.trigger(q.Events.LEVEL_SWITCHED,{level:g}),this.fragPlaying=l)}}},a(T,[{key:"nextLevel",get:function(){var c=this.nextBufferedFrag;return c?c.level:-1}},{key:"currentLevel",get:function(){var c=this.media;if(c){var l=this.getAppendedFrag(c.currentTime);if(l)return l.level}return-1}},{key:"nextBufferedFrag",get:function(){var c=this.media;if(c){var l=this.getAppendedFrag(c.currentTime);return this.followingBufferedFrag(l)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),T}(U.default)},"./src/controller/subtitle-stream-controller.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"SubtitleStreamController",function(){return r});var V=L("./src/events.ts"),U=L("./src/utils/logger.ts"),O=L("./src/utils/buffer-helper.ts"),q=L("./src/controller/fragment-finders.ts"),k=L("./src/utils/discontinuities.ts"),e=L("./src/controller/level-helper.ts"),I=L("./src/controller/fragment-tracker.ts"),d=L("./src/controller/base-stream-controller.ts"),p=L("./src/types/loader.ts"),A=L("./src/types/level.ts");function s(t,y){for(var b=0;b<y.length;b++){var E=y[b];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(t,E.key,E)}}function i(t,y,b){return y&&s(t.prototype,y),b&&s(t,b),t}function o(t,y){t.prototype=Object.create(y.prototype),t.prototype.constructor=t,n(t,y)}function n(t,y){return n=Object.setPrototypeOf||function(E,T){return E.__proto__=T,E},n(t,y)}var a=500,r=function(t){o(y,t);function y(E,T){var C;return C=t.call(this,E,T,"[subtitle-stream-controller]")||this,C.levels=[],C.currentTrackId=-1,C.tracksBuffered=[],C.mainDetails=null,C._registerListeners(),C}var b=y.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var T=this.hls;T.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),T.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),T.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),T.on(V.Events.LEVEL_LOADED,this.onLevelLoaded,this),T.on(V.Events.ERROR,this.onError,this),T.on(V.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),T.on(V.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),T.on(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),T.on(V.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),T.on(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b._unregisterListeners=function(){var T=this.hls;T.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),T.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),T.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),T.off(V.Events.LEVEL_LOADED,this.onLevelLoaded,this),T.off(V.Events.ERROR,this.onError,this),T.off(V.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),T.off(V.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),T.off(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),T.off(V.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),T.off(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b.startLoad=function(){this.stopLoad(),this.state=d.State.IDLE,this.setInterval(a),this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},b.onLevelLoaded=function(T,C){this.mainDetails=C.details},b.onSubtitleFragProcessed=function(T,C){var h=C.frag,c=C.success;if(this.fragPrevious=h,this.state=d.State.IDLE,!c)return;var l=this.tracksBuffered[this.currentTrackId];if(!l)return;for(var u,_=h.start,g=0;g<l.length;g++)if(_>=l[g].start&&_<=l[g].end){u=l[g];break}var m=h.start+h.duration;u?u.end=m:(u={start:_,end:m},l.push(u)),this.fragmentTracker.fragBuffered(h)},b.onBufferFlushing=function(T,C){var h=C.startOffset,c=C.endOffset;if(h===0&&c!==Number.POSITIVE_INFINITY){var l=this.currentTrackId,u=this.levels;if(!u.length||!u[l]||!u[l].details)return;var _=u[l].details,g=_.targetduration,m=c-g;if(m<=0)return;C.endOffsetSubtitles=Math.max(0,m),this.tracksBuffered.forEach(function(F){for(var H=0;H<F.length;){if(F[H].end<=m){F.shift();continue}else if(F[H].start<m)F[H].start=m;else break;H++}}),this.fragmentTracker.removeFragmentsInRange(h,m,p.PlaylistLevelType.SUBTITLE)}},b.onError=function(T,C){var h,c=C.frag;if(!c||c.type!==p.PlaylistLevelType.SUBTITLE)return;(h=this.fragCurrent)!==null&&h!==void 0&&h.loader&&this.fragCurrent.loader.abort(),this.state=d.State.IDLE},b.onSubtitleTracksUpdated=function(T,C){var h=this,c=C.subtitleTracks;this.tracksBuffered=[],this.levels=c.map(function(l){return new A.Level(l)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(l){h.tracksBuffered[l.id]=[]}),this.mediaBuffer=null},b.onSubtitleTrackSwitch=function(T,C){if(this.currentTrackId=C.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var h=this.levels[this.currentTrackId];h!=null&&h.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,h&&this.setInterval(a)},b.onSubtitleTrackLoaded=function(T,C){var h,c=C.details,l=C.id,u=this.currentTrackId,_=this.levels;if(!_.length)return;var g=_[u];if(l>=_.length||l!==u||!g)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,c.live||(h=g.details)!==null&&h!==void 0&&h.live){var m=this.mainDetails;if(c.deltaUpdateFailed||!m)return;var F=m.fragments[0];if(!g.details)c.hasProgramDateTime&&m.hasProgramDateTime?Object(k.alignMediaPlaylistByPDT)(c,m):F&&Object(e.addSliding)(c,F.start);else{var H=this.alignPlaylists(c,g.details);H===0&&F&&Object(e.addSliding)(c,F.start)}}if(g.details=c,this.levelLastLoaded=l,this.tick(),c.live&&!this.fragCurrent&&this.media&&this.state===d.State.IDLE){var B=Object(q.findFragmentByPTS)(null,c.fragments,this.media.currentTime,0);B||(this.warn("Subtitle playlist not aligned with playback"),g.details=void 0)}},b._handleFragmentLoadComplete=function(T){var C=T.frag,h=T.payload,c=C.decryptdata,l=this.hls;if(this.fragContextChanged(C))return;if(h&&h.byteLength>0&&c&&c.key&&c.iv&&c.method==="AES-128"){var u=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(h),c.key.buffer,c.iv.buffer).then(function(_){var g=performance.now();l.trigger(V.Events.FRAG_DECRYPTED,{frag:C,payload:_,stats:{tstart:u,tdecrypt:g}})})}},b.doTick=function(){if(!this.media){this.state=d.State.IDLE;return}if(this.state===d.State.IDLE){var T,C=this.currentTrackId,h=this.levels;if(!h.length||!h[C]||!h[C].details)return;var c=h[C].details,l=c.targetduration,u=this.config,_=this.media,g=O.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,_.currentTime-l,u.maxBufferHole),m=g.end,F=g.len,H=this.getMaxBufferLength()+l;if(F>H)return;console.assert(c,"Subtitle track details are defined on idle subtitle stream controller tick");var B=c.fragments,Q=B.length,z=c.edge,N,ee=this.fragPrevious;if(m<z){var le=u.maxFragLookUpTolerance;ee&&c.hasProgramDateTime&&(N=Object(q.findFragmentByPDT)(B,ee.endProgramDateTime,le)),N||(N=Object(q.findFragmentByPTS)(ee,B,m,le),!N&&ee&&ee.start<B[0].start&&(N=B[0]))}else N=B[Q-1];(T=N)!==null&&T!==void 0&&T.encrypted?(U.logger.log("Loading key for "+N.sn),this.state=d.State.KEY_LOADING,this.hls.trigger(V.Events.KEY_LOADING,{frag:N})):N&&this.fragmentTracker.getState(N)===I.FragmentState.NOT_LOADED&&this.loadFragment(N,c,m)}},b.loadFragment=function(T,C,h){this.fragCurrent=T,t.prototype.loadFragment.call(this,T,C,h)},i(y,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),y}(d.default)},"./src/controller/subtitle-track-controller.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/events.ts"),U=L("./src/utils/texttrack-utils.ts"),O=L("./src/controller/base-playlist-controller.ts"),q=L("./src/types/loader.ts");function k(s,i){for(var o=0;o<i.length;o++){var n=i[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(s,n.key,n)}}function e(s,i,o){return i&&k(s.prototype,i),o&&k(s,o),s}function I(s,i){s.prototype=Object.create(i.prototype),s.prototype.constructor=s,d(s,i)}function d(s,i){return d=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},d(s,i)}var p=function(s){I(i,s);function i(n){var a;return a=s.call(this,n,"[subtitle-track-controller]")||this,a.media=null,a.tracks=[],a.groupId=null,a.tracksInGroup=[],a.trackId=-1,a.selectDefaultTrack=!0,a.queuedDefaultTrack=-1,a.trackChangeListener=function(){return a.onTextTracksChanged()},a.asyncPollTrackChange=function(){return a.pollTrackChange(0)},a.useTextTrackPolling=!1,a.subtitlePollingInterval=-1,a.subtitleDisplay=!0,a.registerListeners(),a}var o=i.prototype;return o.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,s.prototype.destroy.call(this)},o.registerListeners=function(){var a=this.hls;a.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(V.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.on(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.on(V.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var a=this.hls;a.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(V.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.off(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.off(V.Events.ERROR,this.onError,this)},o.onMediaAttached=function(a,r){if(this.media=r.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},o.pollTrackChange=function(a){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,a)},o.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var a=A(this.media.textTracks);a.forEach(function(r){Object(U.clearCurrentCues)(r)}),this.subtitleTrack=-1,this.media=null},o.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},o.onManifestParsed=function(a,r){this.tracks=r.subtitleTracks},o.onSubtitleTrackLoaded=function(a,r){var t=r.id,y=r.details,b=this.trackId,E=this.tracksInGroup[b];if(!E){this.warn("Invalid subtitle track id "+t);return}var T=E.details;E.details=r.details,this.log("subtitle track "+t+" loaded ["+y.startSN+"-"+y.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,r,T))},o.onLevelLoading=function(a,r){this.switchLevel(r.level)},o.onLevelSwitching=function(a,r){this.switchLevel(r.level)},o.switchLevel=function(a){var r=this.hls.levels[a];if(!(r!=null&&r.textGroupIds))return;var t=r.textGroupIds[r.urlId];if(this.groupId!==t){var y=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,b=this.tracks.filter(function(C){return!t||C.groupId===t});this.tracksInGroup=b;var E=this.findTrackId(y==null?void 0:y.name)||this.findTrackId();this.groupId=t;var T={subtitleTracks:b};this.log("Updating subtitle tracks, "+b.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(V.Events.SUBTITLE_TRACKS_UPDATED,T),E!==-1&&this.setSubtitleTrack(E,y)}},o.findTrackId=function(a){for(var r=this.tracksInGroup,t=0;t<r.length;t++){var y=r[t];if((!this.selectDefaultTrack||y.default)&&(!a||a===y.name))return y.id}return-1},o.onError=function(a,r){if(s.prototype.onError.call(this,a,r),r.fatal||!r.context)return;r.context.type===q.PlaylistContextType.SUBTITLE_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&this.retryLoadingOrFail(r)},o.loadPlaylist=function(a){var r=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(r)){var t=r.id,y=r.groupId,b=r.url;if(a)try{b=a.addDirectives(b)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(V.Events.SUBTITLE_TRACK_LOADING,{url:b,id:t,groupId:y,deliveryDirectives:a||null})}},o.toggleTrackModes=function(a){var r=this,t=this.media,y=this.subtitleDisplay,b=this.trackId;if(!t)return;var E=A(t.textTracks),T=E.filter(function(c){return c.groupId===r.groupId});if(a===-1)[].slice.call(E).forEach(function(c){c.mode="disabled"});else{var C=T[b];C&&(C.mode="disabled")}var h=T[a];h&&(h.mode=y?"showing":"hidden")},o.setSubtitleTrack=function(a,r){var t,y=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=a;return}if(this.trackId!==a&&this.toggleTrackModes(a),this.trackId===a&&(a===-1||(t=y[a])!==null&&t!==void 0&&t.details)||a<-1||a>=y.length)return;this.clearTimer();var b=y[a];if(this.log("Switching to subtitle track "+a),this.trackId=a,b){var E=b.id,T=b.groupId,C=T===void 0?"":T,h=b.name,c=b.type,l=b.url;this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:E,groupId:C,name:h,type:c,url:l});var u=this.switchParams(b.url,r==null?void 0:r.details);this.loadPlaylist(u)}else this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:a})},o.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var a=-1,r=A(this.media.textTracks),t=0;t<r.length;t++)if(r[t].mode==="hidden")a=t;else if(r[t].mode==="showing"){a=t;break}this.subtitleTrack!==a&&(this.subtitleTrack=a)},e(i,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(a){this.selectDefaultTrack=!1;var r=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(a,r)}}]),i}(O.default);function A(s){for(var i=[],o=0;o<s.length;o++){var n=s[o];n.kind==="subtitles"&&n.label&&i.push(s[o])}return i}W.default=p},"./src/controller/timeline-controller.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"TimelineController",function(){return A});var V=L("./src/polyfills/number.ts"),U=L("./src/events.ts"),O=L("./src/utils/cea-608-parser.ts"),q=L("./src/utils/output-filter.ts"),k=L("./src/utils/webvtt-parser.ts"),e=L("./src/utils/texttrack-utils.ts"),I=L("./src/utils/imsc1-ttml-parser.ts"),d=L("./src/types/loader.ts"),p=L("./src/utils/logger.ts"),A=function(){function n(r){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=o(),this.captionsProperties=void 0,this.hls=r,this.config=r.config,this.Cues=r.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var t=new q.default(this,"textTrack1"),y=new q.default(this,"textTrack2"),b=new q.default(this,"textTrack3"),E=new q.default(this,"textTrack4");this.cea608Parser1=new O.default(1,t,y),this.cea608Parser2=new O.default(3,b,E)}r.on(U.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(U.Events.MANIFEST_LOADED,this.onManifestLoaded,this),r.on(U.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),r.on(U.Events.FRAG_LOADING,this.onFragLoading,this),r.on(U.Events.FRAG_LOADED,this.onFragLoaded,this),r.on(U.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),r.on(U.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),r.on(U.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.on(U.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),r.on(U.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var a=n.prototype;return a.destroy=function(){var t=this.hls;t.off(U.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(U.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(U.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(U.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(U.Events.FRAG_LOADING,this.onFragLoading,this),t.off(U.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(U.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(U.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(U.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(U.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(U.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},a.addCues=function(t,y,b,E,T){for(var C=!1,h=T.length;h--;){var c=T[h],l=i(c[0],c[1],y,b);if(l>=0&&(c[0]=Math.min(c[0],y),c[1]=Math.max(c[1],b),C=!0,l/(b-y)>.5))return}if(C||T.push([y,b]),this.config.renderTextTracksNatively){var u=this.captionsTracks[t];this.Cues.newCue(u,y,b,E)}else{var _=this.Cues.newCue(null,y,b,E);this.hls.trigger(U.Events.CUES_PARSED,{type:"captions",cues:_,track:t})}},a.onInitPtsFound=function(t,y){var b=this,E=y.frag,T=y.id,C=y.initPTS,h=y.timescale,c=this.unparsedVttFrags;T==="main"&&(this.initPTS[E.cc]=C,this.timescale[E.cc]=h),c.length&&(this.unparsedVttFrags=[],c.forEach(function(l){b.onFragLoaded(U.Events.FRAG_LOADED,l)}))},a.getExistingTrack=function(t){var y=this.media;if(y)for(var b=0;b<y.textTracks.length;b++){var E=y.textTracks[b];if(E[t])return E}return null},a.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},a.createNativeTrack=function(t){if(this.captionsTracks[t])return;var y=this.captionsProperties,b=this.captionsTracks,E=this.media,T=y[t],C=T.label,h=T.languageCode,c=this.getExistingTrack(t);if(c)b[t]=c,Object(e.clearCurrentCues)(b[t]),Object(e.sendAddTrackEvent)(b[t],E);else{var l=this.createTextTrack("captions",C,h);l&&(l[t]=!0,b[t]=l)}},a.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var y=this.captionsProperties[t];if(!y)return;var b=y.label,E={_id:t,label:b,kind:"captions",default:y.media?!!y.media.default:!1,closedCaptions:y.media};this.nonNativeCaptionsTracks[t]=E,this.hls.trigger(U.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[E]})},a.createTextTrack=function(t,y,b){var E=this.media;return E?E.addTextTrack(t,y,b):void 0},a.onMediaAttaching=function(t,y){this.media=y.media,this._cleanTracks()},a.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(y){Object(e.clearCurrentCues)(t[y]),delete t[y]}),this.nonNativeCaptionsTracks={}},a.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=o(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},a._cleanTracks=function(){var t=this.media;if(!t)return;var y=t.textTracks;if(y)for(var b=0;b<y.length;b++)Object(e.clearCurrentCues)(y[b])},a.onSubtitleTracksUpdated=function(t,y){var b=this;this.textTracks=[];var E=y.subtitleTracks||[],T=E.some(function(l){return l.textCodec===I.IMSC1_CODEC});if(this.config.enableWebVTT||T&&this.config.enableIMSC1){var C=this.tracks&&E&&this.tracks.length===E.length;if(this.tracks=E||[],this.config.renderTextTracksNatively){var h=this.media?this.media.textTracks:[];this.tracks.forEach(function(l,u){var _;if(u<h.length){for(var g=null,m=0;m<h.length;m++)if(s(h[m],l)){g=h[m];break}g&&(_=g)}_?Object(e.clearCurrentCues)(_):(_=b.createTextTrack("subtitles",l.name,l.lang),_&&(_.mode="disabled")),_&&(_.groupId=l.groupId,b.textTracks.push(_))})}else if(!C&&this.tracks&&this.tracks.length){var c=this.tracks.map(function(l){return{label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}});this.hls.trigger(U.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:c})}}},a.onManifestLoaded=function(t,y){var b=this;this.config.enableCEA708Captions&&y.captions&&y.captions.forEach(function(E){var T=/(?:CC|SERVICE)([1-4])/.exec(E.instreamId);if(!T)return;var C="textTrack"+T[1],h=b.captionsProperties[C];if(!h)return;h.label=E.name,E.lang&&(h.languageCode=E.lang),h.media=E})},a.onFragLoading=function(t,y){var b=this.cea608Parser1,E=this.cea608Parser2,T=this.lastSn,C=this.lastPartIndex;if(!this.enabled||!(b&&E))return;if(y.frag.type===d.PlaylistLevelType.MAIN){var h,c,l=y.frag.sn,u=(h=y==null||((c=y.part)===null||c===void 0)?void 0:c.index)!=null?h:-1;l===T+1||l===T&&u===C+1||(b.reset(),E.reset()),this.lastSn=l,this.lastPartIndex=u}},a.onFragLoaded=function(t,y){var b=y.frag,E=y.payload,T=this.initPTS,C=this.unparsedVttFrags;if(b.type===d.PlaylistLevelType.SUBTITLE)if(E.byteLength){if(!Object(V.isFiniteNumber)(T[b.cc])){C.push(y),T.length&&this.hls.trigger(U.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Missing initial subtitle PTS")});return}var h=b.decryptdata;if(h==null||h.key==null||h.method!=="AES-128"){var c=this.tracks[b.level],l=this.vttCCs;l[b.cc]||(l[b.cc]={start:b.start,prevCC:this.prevCC,new:!0},this.prevCC=b.cc),c&&c.textCodec===I.IMSC1_CODEC?this._parseIMSC1(b,E):this._parseVTTs(b,E,l)}}else this.hls.trigger(U.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Empty subtitle payload")})},a._parseIMSC1=function(t,y){var b=this,E=this.hls;Object(I.parseIMSC1)(y,this.initPTS[t.cc],this.timescale[t.cc],function(T){b._appendCues(T,t.level),E.trigger(U.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(T){p.logger.log("Failed to parse IMSC1: "+T),E.trigger(U.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:T})})},a._parseVTTs=function(t,y,b){var E=this,T=this.hls;Object(k.parseWebVTT)(y,this.initPTS[t.cc],this.timescale[t.cc],b,t.cc,t.start,function(C){E._appendCues(C,t.level),T.trigger(U.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(C){E._fallbackToIMSC1(t,y),p.logger.log("Failed to parse VTT cue: "+C),T.trigger(U.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:C})})},a._fallbackToIMSC1=function(t,y){var b=this,E=this.tracks[t.level];E.textCodec||Object(I.parseIMSC1)(y,this.initPTS[t.cc],this.timescale[t.cc],function(){E.textCodec=I.IMSC1_CODEC,b._parseIMSC1(t,y)},function(){E.textCodec="wvtt"})},a._appendCues=function(t,y){var b=this.hls;if(this.config.renderTextTracksNatively){var E=this.textTracks[y];if(E.mode==="disabled")return;t.forEach(function(h){return Object(e.addCueToTrack)(E,h)})}else{var T=this.tracks[y],C=T.default?"default":"subtitles"+y;b.trigger(U.Events.CUES_PARSED,{type:"subtitles",cues:t,track:C})}},a.onFragDecrypted=function(t,y){var b=y.frag;if(b.type===d.PlaylistLevelType.SUBTITLE){if(!Object(V.isFiniteNumber)(this.initPTS[b.cc])){this.unparsedVttFrags.push(y);return}this.onFragLoaded(U.Events.FRAG_LOADED,y)}},a.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},a.onFragParsingUserdata=function(t,y){var b=this.cea608Parser1,E=this.cea608Parser2;if(!this.enabled||!(b&&E))return;for(var T=0;T<y.samples.length;T++){var C=y.samples[T].bytes;if(C){var h=this.extractCea608Data(C);b.addData(y.samples[T].pts,h[0]),E.addData(y.samples[T].pts,h[1])}}},a.onBufferFlushing=function(t,y){var b=y.startOffset,E=y.endOffset,T=y.endOffsetSubtitles,C=y.type,h=this.media;if(!h||h.currentTime<E)return;if(!C||C==="video"){var c=this.captionsTracks;Object.keys(c).forEach(function(u){return Object(e.removeCuesInRange)(c[u],b,E)})}if(this.config.renderTextTracksNatively&&(b===0&&T!==void 0)){var l=this.textTracks;Object.keys(l).forEach(function(u){return Object(e.removeCuesInRange)(l[u],b,T)})}},a.extractCea608Data=function(t){for(var y=t[0]&31,b=2,E=[[],[]],T=0;T<y;T++){var C=t[b++],h=127&t[b++],c=127&t[b++],l=(4&C)!==0,u=3&C;if(h===0&&c===0)continue;l&&((u===0||u===1)&&(E[u].push(h),E[u].push(c)))}return E},n}();function s(n,a){return n&&n.label===a.name&&!(n.textTrack1||n.textTrack2)}function i(n,a,r,t){return Math.min(a,t)-Math.max(n,r)}function o(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return V});var V=function(){function U(q,k){this.subtle=void 0,this.aesIV=void 0,this.subtle=q,this.aesIV=k}var O=U.prototype;return O.decrypt=function(k,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,k)},U}()},"./src/crypt/aes-decryptor.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"removePadding",function(){return U}),L.d(W,"default",function(){return O});var V=L("./src/utils/typed-array.ts");function U(q){var k=q.byteLength,e=k&&new DataView(q.buffer).getUint8(k-1);return e?Object(V.sliceUint8)(q,0,k-e):q}var O=function(){function q(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var k=q.prototype;return k.uint8ArrayToUint32Array_=function(I){for(var d=new DataView(I),p=new Uint32Array(4),A=0;A<4;A++)p[A]=d.getUint32(A*4);return p},k.initTable=function(){var I=this.sBox,d=this.invSBox,p=this.subMix,A=p[0],s=p[1],i=p[2],o=p[3],n=this.invSubMix,a=n[0],r=n[1],t=n[2],y=n[3],b=new Uint32Array(256),E=0,T=0,C=0;for(C=0;C<256;C++)C<128?b[C]=C<<1:b[C]=C<<1^283;for(C=0;C<256;C++){var h=T^T<<1^T<<2^T<<3^T<<4;h=h>>>8^h&255^99,I[E]=h,d[h]=E;var c=b[E],l=b[c],u=b[l],_=b[h]*257^h*16843008;A[E]=_<<24|_>>>8,s[E]=_<<16|_>>>16,i[E]=_<<8|_>>>24,o[E]=_,_=u*16843009^l*65537^c*257^E*16843008,a[h]=_<<24|_>>>8,r[h]=_<<16|_>>>16,t[h]=_<<8|_>>>24,y[h]=_,E?(E=c^b[b[b[u^c]]],T^=b[b[T]]):E=T=1}},k.expandKey=function(I){for(var d=this.uint8ArrayToUint32Array_(I),p=!0,A=0;A<d.length&&p;)p=d[A]===this.key[A],A++;if(p)return;this.key=d;var s=this.keySize=d.length;if(s!==4&&s!==6&&s!==8)throw new Error("Invalid aes key size="+s);var i=this.ksRows=(s+6+1)*4,o,n,a=this.keySchedule=new Uint32Array(i),r=this.invKeySchedule=new Uint32Array(i),t=this.sBox,y=this.rcon,b=this.invSubMix,E=b[0],T=b[1],C=b[2],h=b[3],c,l;for(o=0;o<i;o++){if(o<s){c=a[o]=d[o];continue}l=c,o%s===0?(l=l<<8|l>>>24,l=t[l>>>24]<<24|t[l>>>16&255]<<16|t[l>>>8&255]<<8|t[l&255],l^=y[o/s|0]<<24):s>6&&o%s===4&&(l=t[l>>>24]<<24|t[l>>>16&255]<<16|t[l>>>8&255]<<8|t[l&255]),a[o]=c=(a[o-s]^l)>>>0}for(n=0;n<i;n++)o=i-n,n&3?l=a[o]:l=a[o-4],n<4||o<=4?r[n]=l:r[n]=E[t[l>>>24]]^T[t[l>>>16&255]]^C[t[l>>>8&255]]^h[t[l&255]],r[n]=r[n]>>>0},k.networkToHostOrderSwap=function(I){return I<<24|(I&65280)<<8|(I&16711680)>>8|I>>>24},k.decrypt=function(I,d,p){for(var A=this.keySize+6,s=this.invKeySchedule,i=this.invSBox,o=this.invSubMix,n=o[0],a=o[1],r=o[2],t=o[3],y=this.uint8ArrayToUint32Array_(p),b=y[0],E=y[1],T=y[2],C=y[3],h=new Int32Array(I),c=new Int32Array(h.length),l,u,_,g,m,F,H,B,Q,z,N,ee,le,Be,Ce=this.networkToHostOrderSwap;d<h.length;){for(Q=Ce(h[d]),z=Ce(h[d+1]),N=Ce(h[d+2]),ee=Ce(h[d+3]),m=Q^s[0],F=ee^s[1],H=N^s[2],B=z^s[3],le=4,Be=1;Be<A;Be++)l=n[m>>>24]^a[F>>16&255]^r[H>>8&255]^t[B&255]^s[le],u=n[F>>>24]^a[H>>16&255]^r[B>>8&255]^t[m&255]^s[le+1],_=n[H>>>24]^a[B>>16&255]^r[m>>8&255]^t[F&255]^s[le+2],g=n[B>>>24]^a[m>>16&255]^r[F>>8&255]^t[H&255]^s[le+3],m=l,F=u,H=_,B=g,le=le+4;l=i[m>>>24]<<24^i[F>>16&255]<<16^i[H>>8&255]<<8^i[B&255]^s[le],u=i[F>>>24]<<24^i[H>>16&255]<<16^i[B>>8&255]<<8^i[m&255]^s[le+1],_=i[H>>>24]<<24^i[B>>16&255]<<16^i[m>>8&255]<<8^i[F&255]^s[le+2],g=i[B>>>24]<<24^i[m>>16&255]<<16^i[F>>8&255]<<8^i[H&255]^s[le+3],c[d]=Ce(l^b),c[d+1]=Ce(g^E),c[d+2]=Ce(_^T),c[d+3]=Ce(u^C),b=Q,E=z,T=N,C=ee,d=d+4}return c.buffer},q}()},"./src/crypt/decrypter.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return d});var V=L("./src/crypt/aes-crypto.ts"),U=L("./src/crypt/fast-aes-key.ts"),O=L("./src/crypt/aes-decryptor.ts"),q=L("./src/utils/logger.ts"),k=L("./src/utils/mp4-tools.ts"),e=L("./src/utils/typed-array.ts"),I=16,d=function(){function p(s,i,o){var n=o===void 0?{}:o,a=n.removePKCS7Padding,r=a===void 0?!0:a;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=s,this.config=i,this.removePKCS7Padding=r,r)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(y){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var A=p.prototype;return A.destroy=function(){this.observer=null},A.isSync=function(){return this.config.enableSoftwareAES},A.flush=function(){var i=this.currentResult;if(!i){this.reset();return}var o=new Uint8Array(i);return this.reset(),this.removePKCS7Padding?Object(O.removePadding)(o):o},A.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},A.decrypt=function(i,o,n,a){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(i),o,n);var r=this.flush();r&&a(r.buffer)}else this.webCryptoDecrypt(new Uint8Array(i),o,n).then(a)},A.softwareDecrypt=function(i,o,n){var a=this.currentIV,r=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(i=Object(k.appendUint8Array)(t,i),this.remainderData=null);var y=this.getValidChunk(i);if(!y.length)return null;a&&(n=a);var b=this.softwareDecrypter;b||(b=this.softwareDecrypter=new O.default),b.expandKey(o);var E=r;return this.currentResult=b.decrypt(y.buffer,0,n),this.currentIV=Object(e.sliceUint8)(y,-16).buffer,E||null},A.webCryptoDecrypt=function(i,o,n){var a=this,r=this.subtle;return(this.key!==o||!this.fastAesKey)&&(this.key=o,this.fastAesKey=new U.default(r,o)),this.fastAesKey.expandKey().then(function(t){if(!r)return Promise.reject(new Error("web crypto not initialized"));var y=new V.default(r,n);return y.decrypt(i.buffer,t)}).catch(function(t){return a.onWebCryptoError(t,i,o,n)})},A.onWebCryptoError=function(i,o,n,a){return q.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",i),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(o,n,a)},A.getValidChunk=function(i){var o=i,n=i.length-i.length%I;return n!==i.length&&(o=Object(e.sliceUint8)(i,0,n),this.remainderData=Object(e.sliceUint8)(i,n)),o},A.logOnce=function(i){if(!this.logEnabled)return;q.logger.log("[decrypter.ts]: "+i),this.logEnabled=!1},p}()},"./src/crypt/fast-aes-key.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return V});var V=function(){function U(q,k){this.subtle=void 0,this.key=void 0,this.subtle=q,this.key=k}var O=U.prototype;return O.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},U}()},"./src/demux/aacdemuxer.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/demux/base-audio-demuxer.ts"),U=L("./src/demux/adts.ts"),O=L("./src/utils/logger.ts"),q=L("./src/demux/id3.ts");function k(d,p){d.prototype=Object.create(p.prototype),d.prototype.constructor=d,e(d,p)}function e(d,p){return e=Object.setPrototypeOf||function(s,i){return s.__proto__=i,s},e(d,p)}var I=function(d){k(p,d);function p(s,i){var o;return o=d.call(this)||this,o.observer=void 0,o.config=void 0,o.observer=s,o.config=i,o}var A=p.prototype;return A.resetInitSegment=function(i,o,n){d.prototype.resetInitSegment.call(this,i,o,n),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:i,duration:n,inputTimeScale:9e4,dropped:0}},p.probe=function(i){if(!i)return!1;for(var o=q.getID3Data(i,0)||[],n=o.length,a=i.length;n<a;n++)if(U.probe(i,n))return O.logger.log("ADTS sync word found !"),!0;return!1},A.canParse=function(i,o){return U.canParse(i,o)},A.appendFrame=function(i,o,n){U.initTrackConfig(i,this.observer,o,n,i.manifestCodec);var a=U.appendFrame(i,o,n,this.initPTS,this.frameIndex);if(a&&a.missing===0)return a},p}(V.default);I.minProbeByteLength=9,W.default=I},"./src/demux/adts.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"getAudioConfig",function(){return q}),L.d(W,"isHeaderPattern",function(){return k}),L.d(W,"getHeaderLength",function(){return e}),L.d(W,"getFullFrameLength",function(){return I}),L.d(W,"canGetFrameLength",function(){return d}),L.d(W,"isHeader",function(){return p}),L.d(W,"canParse",function(){return A}),L.d(W,"probe",function(){return s}),L.d(W,"initTrackConfig",function(){return i}),L.d(W,"getFrameDuration",function(){return o}),L.d(W,"parseFrameHeader",function(){return n}),L.d(W,"appendFrame",function(){return a});var V=L("./src/utils/logger.ts"),U=L("./src/errors.ts"),O=L("./src/events.ts");function q(r,t,y,b){var E,T,C,h,c=navigator.userAgent.toLowerCase(),l=b,u=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];E=((t[y+2]&192)>>>6)+1;var _=(t[y+2]&60)>>>2;if(_>u.length-1){r.trigger(O.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+_});return}return C=(t[y+2]&1)<<2,C|=(t[y+3]&192)>>>6,V.logger.log("manifest codec:"+b+", ADTS type:"+E+", samplingIndex:"+_),/firefox/i.test(c)?_>=6?(E=5,h=new Array(4),T=_-3):(E=2,h=new Array(2),T=_):c.indexOf("android")!==-1?(E=2,h=new Array(2),T=_):(E=5,h=new Array(4),b&&(b.indexOf("mp4a.40.29")!==-1||b.indexOf("mp4a.40.5")!==-1)||!b&&_>=6?T=_-3:((b&&b.indexOf("mp4a.40.2")!==-1&&(_>=6&&C===1||/vivaldi/i.test(c))||!b&&C===1)&&(E=2,h=new Array(2)),T=_)),h[0]=E<<3,h[0]|=(_&14)>>1,h[1]|=(_&1)<<7,h[1]|=C<<3,E===5&&(h[1]|=(T&14)>>1,h[2]=(T&1)<<7,h[2]|=2<<2,h[3]=0),{config:h,samplerate:u[_],channelCount:C,codec:"mp4a.40."+E,manifestCodec:l}}function k(r,t){return r[t]===255&&(r[t+1]&246)===240}function e(r,t){return r[t+1]&1?7:9}function I(r,t){return(r[t+3]&3)<<11|r[t+4]<<3|(r[t+5]&224)>>>5}function d(r,t){return t+5<r.length}function p(r,t){return t+1<r.length&&k(r,t)}function A(r,t){return d(r,t)&&k(r,t)&&I(r,t)<=r.length-t}function s(r,t){if(p(r,t)){var y=e(r,t);if(t+y>=r.length)return!1;var b=I(r,t);if(b<=y)return!1;var E=t+b;return E===r.length||p(r,E)}return!1}function i(r,t,y,b,E){if(!r.samplerate){var T=q(t,y,b,E);if(!T)return;r.config=T.config,r.samplerate=T.samplerate,r.channelCount=T.channelCount,r.codec=T.codec,r.manifestCodec=T.manifestCodec,V.logger.log("parsed codec:"+r.codec+", rate:"+T.samplerate+", channels:"+T.channelCount)}}function o(r){return 1024*9e4/r}function n(r,t,y,b,E){var T=e(r,t),C=I(r,t);if(C-=T,C>0){var h=y+b*E;return{headerLength:T,frameLength:C,stamp:h}}}function a(r,t,y,b,E){var T=o(r.samplerate),C=n(t,y,b,E,T);if(C){var h=C.frameLength,c=C.headerLength,l=C.stamp,u=c+h,_=Math.max(0,y+u-t.length),g;_?(g=new Uint8Array(u-c),g.set(t.subarray(y+c,t.length),0)):g=t.subarray(y+c,y+u);var m={unit:g,pts:l};return _||r.samples.push(m),{sample:m,length:u,missing:_}}}},"./src/demux/base-audio-demuxer.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"initPTSFn",function(){return I});var V=L("./src/polyfills/number.ts"),U=L("./src/demux/id3.ts"),O=L("./src/demux/dummy-demuxed-track.ts"),q=L("./src/utils/mp4-tools.ts"),k=L("./src/utils/typed-array.ts"),e=function(){function d(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var p=d.prototype;return p.resetInitSegment=function(s,i,o){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},p.resetTimeStamp=function(){},p.resetContiguity=function(){},p.canParse=function(s,i){return!1},p.appendFrame=function(s,i,o){},p.demux=function(s,i){this.cachedData&&(s=Object(q.appendUint8Array)(this.cachedData,s),this.cachedData=null);var o=U.getID3Data(s,0),n=o?o.length:0,a,r,t=this._audioTrack,y=this._id3Track,b=o?U.getTimeStamp(o):void 0,E=s.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=I(b,i)),o&&o.length>0&&y.samples.push({pts:this.initPTS,dts:this.initPTS,data:o}),r=this.initPTS;n<E;){if(this.canParse(s,n)){var T=this.appendFrame(t,s,n);T?(this.frameIndex++,r=T.sample.pts,n+=T.length,a=n):n=E}else U.canParse(s,n)?(o=U.getID3Data(s,n),y.samples.push({pts:r,dts:r,data:o}),n+=o.length,a=n):n++;if(n===E&&a!==E){var C=Object(k.sliceUint8)(s,a);this.cachedData?this.cachedData=Object(q.appendUint8Array)(this.cachedData,C):this.cachedData=C}}return{audioTrack:t,avcTrack:Object(O.dummyTrack)(),id3Track:y,textTrack:Object(O.dummyTrack)()}},p.demuxSampleAes=function(s,i,o){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},p.flush=function(s){var i=this.cachedData;return i&&(this.cachedData=null,this.demux(i,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(O.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(O.dummyTrack)()}},p.destroy=function(){},d}(),I=function(p,A){return Object(V.isFiniteNumber)(p)?p*90:A*9e4};W.default=e},"./src/demux/chunk-cache.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return V});var V=function(){function O(){this.chunks=[],this.dataLength=0}var q=O.prototype;return q.push=function(e){this.chunks.push(e),this.dataLength+=e.length},q.flush=function(){var e=this.chunks,I=this.dataLength,d;if(e.length)e.length===1?d=e[0]:d=U(e,I);else return new Uint8Array(0);return this.reset(),d},q.reset=function(){this.chunks.length=0,this.dataLength=0},O}();function U(O,q){for(var k=new Uint8Array(q),e=0,I=0;I<O.length;I++){var d=O[I];k.set(d,e),e+=d.length}return k}},"./src/demux/dummy-demuxed-track.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"dummyTrack",function(){return V});function V(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/utils/logger.ts"),U=function(){function O(k){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=k,this.bytesAvailable=k.byteLength,this.word=0,this.bitsAvailable=0}var q=O.prototype;return q.loadWord=function(){var e=this.data,I=this.bytesAvailable,d=e.byteLength-I,p=new Uint8Array(4),A=Math.min(4,I);if(A===0)throw new Error("no bytes available");p.set(e.subarray(d,d+A)),this.word=new DataView(p.buffer).getUint32(0),this.bitsAvailable=A*8,this.bytesAvailable-=A},q.skipBits=function(e){var I;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,I=e>>3,e-=I>>3,this.bytesAvailable-=I,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},q.readBits=function(e){var I=Math.min(this.bitsAvailable,e),d=this.word>>>32-I;return e>32&&V.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=I,this.bitsAvailable>0?this.word<<=I:this.bytesAvailable>0&&this.loadWord(),I=e-I,I>0&&this.bitsAvailable?d<<I|this.readBits(I):d},q.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if((this.word&2147483648>>>e)!==0)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},q.skipUEG=function(){this.skipBits(1+this.skipLZ())},q.skipEG=function(){this.skipBits(1+this.skipLZ())},q.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},q.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},q.readBoolean=function(){return this.readBits(1)===1},q.readUByte=function(){return this.readBits(8)},q.readUShort=function(){return this.readBits(16)},q.readUInt=function(){return this.readBits(32)},q.skipScalingList=function(e){for(var I=8,d=8,p,A=0;A<e;A++)d!==0&&(p=this.readEG(),d=(I+p+256)%256),I=d===0?I:d},q.readSPS=function(){var e=0,I=0,d=0,p=0,A,s,i,o=this.readUByte.bind(this),n=this.readBits.bind(this),a=this.readUEG.bind(this),r=this.readBoolean.bind(this),t=this.skipBits.bind(this),y=this.skipEG.bind(this),b=this.skipUEG.bind(this),E=this.skipScalingList.bind(this);o();var T=o();if(n(5),t(3),o(),b(),T===100||T===110||T===122||T===244||T===44||T===83||T===86||T===118||T===128){var C=a();if(C===3&&t(1),b(),b(),t(1),r())for(s=C!==3?8:12,i=0;i<s;i++)r()&&(i<6?E(16):E(64))}b();var h=a();if(h===0)a();else if(h===1)for(t(1),y(),y(),A=a(),i=0;i<A;i++)y();b(),t(1);var c=a(),l=a(),u=n(1);u===0&&t(1),t(1),r()&&(e=a(),I=a(),d=a(),p=a());var _=[1,1];if(r()&&r()){var g=o();switch(g){case 1:_=[1,1];break;case 2:_=[12,11];break;case 3:_=[10,11];break;case 4:_=[16,11];break;case 5:_=[40,33];break;case 6:_=[24,11];break;case 7:_=[20,11];break;case 8:_=[32,11];break;case 9:_=[80,33];break;case 10:_=[18,11];break;case 11:_=[15,11];break;case 12:_=[64,33];break;case 13:_=[160,99];break;case 14:_=[4,3];break;case 15:_=[3,2];break;case 16:_=[2,1];break;case 255:{_=[o()<<8|o(),o()<<8|o()];break}}}return{width:Math.ceil((c+1)*16-e*2-I*2),height:(2-u)*(l+1)*16-(u?2:4)*(d+p),pixelRatio:_}},q.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},O}();W.default=U},"./src/demux/id3.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"isHeader",function(){return V}),L.d(W,"isFooter",function(){return U}),L.d(W,"getID3Data",function(){return O}),L.d(W,"canParse",function(){return k}),L.d(W,"getTimeStamp",function(){return e}),L.d(W,"isTimeStampFrame",function(){return I}),L.d(W,"getID3Frames",function(){return p}),L.d(W,"decodeFrame",function(){return A}),L.d(W,"utf8ArrayToStr",function(){return a}),L.d(W,"testables",function(){return r});var V=function(E,T){return T+10<=E.length&&(E[T]===73&&E[T+1]===68&&E[T+2]===51&&(E[T+3]<255&&E[T+4]<255&&(E[T+6]<128&&E[T+7]<128&&E[T+8]<128&&E[T+9]<128)))},U=function(E,T){return T+10<=E.length&&(E[T]===51&&E[T+1]===68&&E[T+2]===73&&(E[T+3]<255&&E[T+4]<255&&(E[T+6]<128&&E[T+7]<128&&E[T+8]<128&&E[T+9]<128)))},O=function(E,T){for(var C=T,h=0;V(E,T);){h+=10;var c=q(E,T+6);h+=c,U(E,T+10)&&(h+=10),T+=h}return h>0?E.subarray(C,C+h):void 0},q=function(E,T){var C=0;return C=(E[T]&127)<<21,C|=(E[T+1]&127)<<14,C|=(E[T+2]&127)<<7,C|=E[T+3]&127,C},k=function(E,T){return V(E,T)&&q(E,T+6)+10<=E.length-T},e=function(E){for(var T=p(E),C=0;C<T.length;C++){var h=T[C];if(I(h))return n(h)}return},I=function(E){return E&&E.key==="PRIV"&&E.info==="com.apple.streaming.transportStreamTimestamp"},d=function(E){var T=String.fromCharCode(E[0],E[1],E[2],E[3]),C=q(E,4),h=10;return{type:T,size:C,data:E.subarray(h,h+C)}},p=function(E){for(var T=0,C=[];V(E,T);){var h=q(E,T+6);T+=10;for(var c=T+h;T+8<c;){var l=d(E.subarray(T)),u=A(l);u&&C.push(u),T+=l.size+10}U(E,T)&&(T+=10)}return C},A=function(E){return E.type==="PRIV"?s(E):E.type[0]==="W"?o(E):i(E)},s=function(E){if(E.size<2)return;var T=a(E.data,!0),C=new Uint8Array(E.data.subarray(T.length+1));return{key:E.type,info:T,data:C.buffer}},i=function(E){if(E.size<2)return;if(E.type==="TXXX"){var T=1,C=a(E.data.subarray(T),!0);T+=C.length+1;var h=a(E.data.subarray(T));return{key:E.type,info:C,data:h}}var c=a(E.data.subarray(1));return{key:E.type,data:c}},o=function(E){if(E.type==="WXXX"){if(E.size<2)return;var T=1,C=a(E.data.subarray(T),!0);T+=C.length+1;var h=a(E.data.subarray(T));return{key:E.type,info:C,data:h}}var c=a(E.data);return{key:E.type,data:c}},n=function(E){if(E.data.byteLength===8){var T=new Uint8Array(E.data),C=T[3]&1,h=(T[4]<<23)+(T[5]<<15)+(T[6]<<7)+T[7];return h/=45,C&&(h+=4772185884e-2),Math.round(h)}return},a=function(E,T){T===void 0&&(T=!1);var C=y();if(C){var h=C.decode(E);if(T){var c=h.indexOf("\0");return c!==-1?h.substring(0,c):h}return h.replace(/\0/g,"")}for(var l=E.length,u,_,g,m="",F=0;F<l;){if(u=E[F++],u===0&&T)return m;if(u===0||u===3)continue;switch(u>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:m+=String.fromCharCode(u);break;case 12:case 13:_=E[F++],m+=String.fromCharCode((u&31)<<6|_&63);break;case 14:_=E[F++],g=E[F++],m+=String.fromCharCode((u&15)<<12|(_&63)<<6|(g&63)<<0);break;default:}}return m},r={decodeTextFrame:i},t;function y(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/demux/base-audio-demuxer.ts"),U=L("./src/demux/id3.ts"),O=L("./src/utils/logger.ts"),q=L("./src/demux/mpegaudio.ts");function k(d,p){d.prototype=Object.create(p.prototype),d.prototype.constructor=d,e(d,p)}function e(d,p){return e=Object.setPrototypeOf||function(s,i){return s.__proto__=i,s},e(d,p)}var I=function(d){k(p,d);function p(){return d.apply(this,arguments)||this}var A=p.prototype;return A.resetInitSegment=function(i,o,n){d.prototype.resetInitSegment.call(this,i,o,n),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:i,duration:n,inputTimeScale:9e4,dropped:0}},p.probe=function(i){if(!i)return!1;for(var o=U.getID3Data(i,0)||[],n=o.length,a=i.length;n<a;n++)if(q.probe(i,n))return O.logger.log("MPEG Audio sync word found !"),!0;return!1},A.canParse=function(i,o){return q.canParse(i,o)},A.appendFrame=function(i,o,n){return this.initPTS===null?void 0:q.appendFrame(i,o,n,this.initPTS,this.frameIndex)},p}(V.default);I.minProbeByteLength=4,W.default=I},"./src/demux/mp4demuxer.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/utils/mp4-tools.ts"),U=L("./src/demux/dummy-demuxed-track.ts"),O=function(){function q(e,I){this.remainderData=null,this.config=void 0,this.config=I}var k=q.prototype;return k.resetTimeStamp=function(){},k.resetInitSegment=function(){},k.resetContiguity=function(){},q.probe=function(I){return Object(V.findBox)({data:I,start:0,end:Math.min(I.length,16384)},["moof"]).length>0},k.demux=function(I){var d=I,p=Object(U.dummyTrack)();if(this.config.progressive){this.remainderData&&(d=Object(V.appendUint8Array)(this.remainderData,I));var A=Object(V.segmentValidRange)(d);this.remainderData=A.remainder,p.samples=A.valid||new Uint8Array}else p.samples=d;return{audioTrack:Object(U.dummyTrack)(),avcTrack:p,id3Track:Object(U.dummyTrack)(),textTrack:Object(U.dummyTrack)()}},k.flush=function(){var I=Object(U.dummyTrack)();return I.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(U.dummyTrack)(),avcTrack:I,id3Track:Object(U.dummyTrack)(),textTrack:Object(U.dummyTrack)()}},k.demuxSampleAes=function(I,d,p){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},k.destroy=function(){},q}();O.minProbeByteLength=1024,W.default=O},"./src/demux/mpegaudio.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"appendFrame",function(){return e}),L.d(W,"parseHeader",function(){return I}),L.d(W,"isHeaderPattern",function(){return d}),L.d(W,"isHeader",function(){return p}),L.d(W,"canParse",function(){return A}),L.d(W,"probe",function(){return s});var V=null,U=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],O=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],q=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],k=[0,1,1,4];function e(i,o,n,a,r){if(n+24>o.length)return;var t=I(o,n);if(t&&n+t.frameLength<=o.length){var y=t.samplesPerFrame*9e4/t.sampleRate,b=a+r*y,E={unit:o.subarray(n,n+t.frameLength),pts:b,dts:b};return i.config=[],i.channelCount=t.channelCount,i.samplerate=t.sampleRate,i.samples.push(E),{sample:E,length:t.frameLength,missing:0}}}function I(i,o){var n=i[o+1]>>3&3,a=i[o+1]>>1&3,r=i[o+2]>>4&15,t=i[o+2]>>2&3;if(n!==1&&r!==0&&r!==15&&t!==3){var y=i[o+2]>>1&1,b=i[o+3]>>6,E=n===3?3-a:a===3?3:4,T=U[E*14+r-1]*1e3,C=n===3?0:n===2?1:2,h=O[C*3+t],c=b===3?1:2,l=q[n][a],u=k[a],_=l*8*u,g=Math.floor(l*T/h+y)*u;if(V===null){var m=navigator.userAgent||"",F=m.match(/Chrome\/(\d+)/i);V=F?parseInt(F[1]):0}var H=!!V&&V<=87;return H&&a===2&&T>=224e3&&b===0&&(i[o+3]=i[o+3]|128),{sampleRate:h,channelCount:c,frameLength:g,samplesPerFrame:_}}}function d(i,o){return i[o]===255&&(i[o+1]&224)===224&&(i[o+1]&6)!==0}function p(i,o){return o+1<i.length&&d(i,o)}function A(i,o){var n=4;return d(i,o)&&n<=i.length-o}function s(i,o){if(o+1<i.length&&d(i,o)){var n=4,a=I(i,o),r=n;a!=null&&a.frameLength&&(r=a.frameLength);var t=o+r;return t===i.length||p(i,t)}return!1}},"./src/demux/sample-aes.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/crypt/decrypter.ts"),U=L("./src/demux/tsdemuxer.ts"),O=function(){function q(e,I,d){this.keyData=void 0,this.decrypter=void 0,this.keyData=d,this.decrypter=new V.default(e,I,{removePKCS7Padding:!1})}var k=q.prototype;return k.decryptBuffer=function(I,d){this.decrypter.decrypt(I,this.keyData.key.buffer,this.keyData.iv.buffer,d)},k.decryptAacSample=function(I,d,p,A){var s=I[d].unit,i=s.subarray(16,s.length-s.length%16),o=i.buffer.slice(i.byteOffset,i.byteOffset+i.length),n=this;this.decryptBuffer(o,function(a){var r=new Uint8Array(a);s.set(r,16),A||n.decryptAacSamples(I,d+1,p)})},k.decryptAacSamples=function(I,d,p){for(;;d++){if(d>=I.length){p();return}if(I[d].unit.length<32)continue;var A=this.decrypter.isSync();if(this.decryptAacSample(I,d,p,A),!A)return}},k.getAvcEncryptedData=function(I){for(var d=Math.floor((I.length-48)/160)*16+16,p=new Int8Array(d),A=0,s=32;s<=I.length-16;s+=160,A+=16)p.set(I.subarray(s,s+16),A);return p},k.getAvcDecryptedUnit=function(I,d){for(var p=new Uint8Array(d),A=0,s=32;s<=I.length-16;s+=160,A+=16)I.set(p.subarray(A,A+16),s);return I},k.decryptAvcSample=function(I,d,p,A,s,i){var o=Object(U.discardEPB)(s.data),n=this.getAvcEncryptedData(o),a=this;this.decryptBuffer(n.buffer,function(r){s.data=a.getAvcDecryptedUnit(o,r),i||a.decryptAvcSamples(I,d,p+1,A)})},k.decryptAvcSamples=function(I,d,p,A){if(I instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;d++,p=0){if(d>=I.length){A();return}for(var s=I[d].units;!(p>=s.length);p++){var i=s[p];if(i.data.length<=48||i.type!==1&&i.type!==5)continue;var o=this.decrypter.isSync();if(this.decryptAvcSample(I,d,p,A,i,o),!o)return}}},q}();W.default=O},"./src/demux/transmuxer-interface.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return s});var V=L("./node_modules/webworkify-webpack/index.js"),U=L.n(V),O=L("./src/events.ts"),q=L("./src/demux/transmuxer.ts"),k=L("./src/utils/logger.ts"),e=L("./src/errors.ts"),I=L("./src/utils/mediasource-helper.ts"),d=L("./node_modules/eventemitter3/index.js"),p=L.n(d),A=Object(I.getMediaSource)()||{isTypeSupported:function(){return!1}},s=function(){function i(n,a,r,t){var y=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=n,this.id=a,this.onTransmuxComplete=r,this.onFlush=t;var b=n.config,E=function(l,u){u=u||{},u.frag=y.frag,u.id=y.id,n.trigger(l,u)};this.observer=new d.EventEmitter,this.observer.on(O.Events.FRAG_DECRYPTED,E),this.observer.on(O.Events.ERROR,E);var T={mp4:A.isTypeSupported("video/mp4"),mpeg:A.isTypeSupported("audio/mpeg"),mp3:A.isTypeSupported('audio/mp4; codecs="mp3"')},C=navigator.vendor;if(b.enableWorker&&typeof Worker!="undefined"){k.logger.log("demuxing in webworker");var h;try{h=this.worker=V("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),h.addEventListener("message",this.onwmsg),h.onerror=function(c){n.trigger(O.Events.ERROR,{type:e.ErrorTypes.OTHER_ERROR,details:e.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(c.message+" ("+c.filename+":"+c.lineno+")")})},h.postMessage({cmd:"init",typeSupported:T,vendor:C,id:a,config:JSON.stringify(b)})}catch(c){k.logger.warn("Error in worker:",c),k.logger.error("Error while initializing DemuxerWorker, fallback to inline"),h&&self.URL.revokeObjectURL(h.objectURL),this.transmuxer=new q.default(this.observer,T,b,C,a),this.worker=null}}else this.transmuxer=new q.default(this.observer,T,b,C,a)}var o=i.prototype;return o.destroy=function(){var a=this.worker;if(a)a.removeEventListener("message",this.onwmsg),a.terminate(),this.worker=null;else{var r=this.transmuxer;r&&(r.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},o.push=function(a,r,t,y,b,E,T,C,h,c){var l=this;h.transmuxing.start=self.performance.now();var u=this.transmuxer,_=this.worker,g=E?E.start:b.start,m=b.decryptdata,F=this.frag,H=!(F&&b.cc===F.cc),B=!(F&&h.level===F.level),Q=F?h.sn-F.sn:-1,z=this.part?h.part-this.part.index:1,N=!B&&(Q===1||Q===0&&z===1),ee=self.performance.now();(B||Q||b.stats.parsing.start===0)&&(b.stats.parsing.start=ee),E&&(z||!N)&&(E.stats.parsing.start=ee);var le=new q.TransmuxState(H,N,C,B,g);if(!N||H){k.logger.log("[transmuxer-interface, "+b.type+"]: Starting new transmux session for sn: "+h.sn+" p: "+h.part+" level: "+h.level+" id: "+h.id+`
|
|
discontinuity: `+H+`
|
|
trackSwitch: `+B+`
|
|
contiguous: `+N+`
|
|
accurateTimeOffset: `+C+`
|
|
timeOffset: `+g);var Be=new q.TransmuxConfig(t,y,r,T,c);this.configureTransmuxer(Be)}if(this.frag=b,this.part=E,_)_.postMessage({cmd:"demux",data:a,decryptdata:m,chunkMeta:h,state:le},a instanceof ArrayBuffer?[a]:[]);else if(u){var Ce=u.push(a,m,h,le);Object(q.isPromise)(Ce)?Ce.then(function(Me){l.handleTransmuxComplete(Me)}):this.handleTransmuxComplete(Ce)}},o.flush=function(a){var r=this;a.transmuxing.start=self.performance.now();var t=this.transmuxer,y=this.worker;if(y)y.postMessage({cmd:"flush",chunkMeta:a});else if(t){var b=t.flush(a);Object(q.isPromise)(b)?b.then(function(E){r.handleFlushResult(E,a)}):this.handleFlushResult(b,a)}},o.handleFlushResult=function(a,r){var t=this;a.forEach(function(y){t.handleTransmuxComplete(y)}),this.onFlush(r)},o.onWorkerMessage=function(a){var r=a.data,t=this.hls;switch(r.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(r.data);break}case"flush":{this.onFlush(r.data);break}default:{r.data=r.data||{},r.data.frag=this.frag,r.data.id=this.id,t.trigger(r.event,r.data);break}}},o.configureTransmuxer=function(a){var r=this.worker,t=this.transmuxer;r?r.postMessage({cmd:"configure",config:a}):t&&t.configure(a)},o.handleTransmuxComplete=function(a){a.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(a)},i}()},"./src/demux/transmuxer-worker.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return e});var V=L("./src/demux/transmuxer.ts"),U=L("./src/events.ts"),O=L("./src/utils/logger.ts"),q=L("./node_modules/eventemitter3/index.js"),k=L.n(q);function e(s){var i=new q.EventEmitter,o=function(a,r){s.postMessage({event:a,data:r})};i.on(U.Events.FRAG_DECRYPTED,o),i.on(U.Events.ERROR,o),s.addEventListener("message",function(n){var a=n.data;switch(a.cmd){case"init":{var r=JSON.parse(a.config);s.transmuxer=new V.default(i,a.typeSupported,r,a.vendor,a.id),Object(O.enableLogs)(r.debug),o("init",null);break}case"configure":{s.transmuxer.configure(a.config);break}case"demux":{var t=s.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(V.isPromise)(t)?t.then(function(E){I(s,E)}):I(s,t);break}case"flush":{var y=a.chunkMeta,b=s.transmuxer.flush(y);Object(V.isPromise)(b)?b.then(function(E){p(s,E,y)}):p(s,b,y);break}default:break}})}function I(s,i){if(A(i.remuxResult))return;var o=[],n=i.remuxResult,a=n.audio,r=n.video;a&&d(o,a),r&&d(o,r),s.postMessage({event:"transmuxComplete",data:i},o)}function d(s,i){i.data1&&s.push(i.data1.buffer),i.data2&&s.push(i.data2.buffer)}function p(s,i,o){i.forEach(function(n){I(s,n)}),s.postMessage({event:"flush",data:o})}function A(s){return!s.audio&&!s.video&&!s.text&&!s.id3&&!s.initSegment}},"./src/demux/transmuxer.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return r}),L.d(W,"isPromise",function(){return b}),L.d(W,"TransmuxConfig",function(){return E}),L.d(W,"TransmuxState",function(){return T});var V=L("./src/events.ts"),U=L("./src/errors.ts"),O=L("./src/crypt/decrypter.ts"),q=L("./src/demux/aacdemuxer.ts"),k=L("./src/demux/mp4demuxer.ts"),e=L("./src/demux/tsdemuxer.ts"),I=L("./src/demux/mp3demuxer.ts"),d=L("./src/remux/mp4-remuxer.ts"),p=L("./src/remux/passthrough-remuxer.ts"),A=L("./src/demux/chunk-cache.ts"),s=L("./src/utils/mp4-tools.ts"),i=L("./src/utils/logger.ts"),o;try{o=self.performance.now.bind(self.performance)}catch(C){i.logger.debug("Unable to use Performance API on this environment"),o=self.Date.now}var n=[{demux:e.default,remux:d.default},{demux:k.default,remux:p.default},{demux:q.default,remux:d.default},{demux:I.default,remux:d.default}],a=1024;n.forEach(function(C){var h=C.demux;a=Math.max(a,h.minProbeByteLength)});var r=function(){function C(c,l,u,_,g){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new A.default,this.observer=c,this.typeSupported=l,this.config=u,this.vendor=_,this.id=g}var h=C.prototype;return h.configure=function(l){this.transmuxConfig=l,this.decrypter&&this.decrypter.reset()},h.push=function(l,u,_,g){var m=this,F=_.transmuxing;F.executeStart=o();var H=new Uint8Array(l),B=this.cache,Q=this.config,z=this.currentTransmuxState,N=this.transmuxConfig;g&&(this.currentTransmuxState=g);var ee=t(H,u);if(ee&&ee.method==="AES-128"){var le=this.getDecrypter();if(Q.enableSoftwareAES){var Be=le.softwareDecrypt(H,ee.key.buffer,ee.iv.buffer);if(!Be)return F.executeEnd=o(),y(_);H=new Uint8Array(Be)}else return this.decryptionPromise=le.webCryptoDecrypt(H,ee.key.buffer,ee.iv.buffer).then(function(j){var J=m.push(j,null,_);return m.decryptionPromise=null,J}),this.decryptionPromise}var Ce=g||z,Me=Ce.contiguous,Le=Ce.discontinuity,je=Ce.trackSwitch,He=Ce.accurateTimeOffset,Je=Ce.timeOffset,Se=N.audioCodec,$=N.videoCodec,D=N.defaultInitPts,M=N.duration,te=N.initSegmentData;if((Le||je)&&this.resetInitSegment(te,Se,$,M),Le&&this.resetInitialTimestamp(D),Me||this.resetContiguity(),this.needsProbing(H,Le,je)){if(B.dataLength){var oe=B.flush();H=Object(s.appendUint8Array)(oe,H)}this.configureTransmuxer(H,N)}var G=this.transmux(H,ee,Je,He,_),re=this.currentTransmuxState;return re.contiguous=!0,re.discontinuity=!1,re.trackSwitch=!1,F.executeEnd=o(),G},h.flush=function(l){var u=this,_=l.transmuxing;_.executeStart=o();var g=this.decrypter,m=this.cache,F=this.currentTransmuxState,H=this.decryptionPromise;if(H)return H.then(function(){return u.flush(l)});var B=[],Q=F.timeOffset;if(g){var z=g.flush();z&&B.push(this.push(z,null,l))}var N=m.dataLength;m.reset();var ee=this.demuxer,le=this.remuxer;if(!ee||!le)return N>=a&&this.observer.emit(V.Events.ERROR,V.Events.ERROR,{type:U.ErrorTypes.MEDIA_ERROR,details:U.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),_.executeEnd=o(),[y(l)];var Be=ee.flush(Q);return b(Be)?Be.then(function(Ce){return u.flushRemux(B,Ce,l),B}):(this.flushRemux(B,Be,l),B)},h.flushRemux=function(l,u,_){var g=u.audioTrack,m=u.avcTrack,F=u.id3Track,H=u.textTrack,B=this.currentTransmuxState,Q=B.accurateTimeOffset,z=B.timeOffset;i.logger.log("[transmuxer.ts]: Flushed fragment "+_.sn+(_.part>-1?" p: "+_.part:"")+" of level "+_.level);var N=this.remuxer.remux(g,m,F,H,z,Q,!0,this.id);l.push({remuxResult:N,chunkMeta:_}),_.transmuxing.executeEnd=o()},h.resetInitialTimestamp=function(l){var u=this.demuxer,_=this.remuxer;if(!u||!_)return;u.resetTimeStamp(l),_.resetTimeStamp(l)},h.resetContiguity=function(){var l=this.demuxer,u=this.remuxer;if(!l||!u)return;l.resetContiguity(),u.resetNextTimestamp()},h.resetInitSegment=function(l,u,_,g){var m=this.demuxer,F=this.remuxer;if(!m||!F)return;m.resetInitSegment(u,_,g),F.resetInitSegment(l,u,_)},h.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},h.transmux=function(l,u,_,g,m){var F;return u&&u.method==="SAMPLE-AES"?F=this.transmuxSampleAes(l,u,_,g,m):F=this.transmuxUnencrypted(l,_,g,m),F},h.transmuxUnencrypted=function(l,u,_,g){var m=this.demuxer.demux(l,u,!1,!this.config.progressive),F=m.audioTrack,H=m.avcTrack,B=m.id3Track,Q=m.textTrack,z=this.remuxer.remux(F,H,B,Q,u,_,!1,this.id);return{remuxResult:z,chunkMeta:g}},h.transmuxSampleAes=function(l,u,_,g,m){var F=this;return this.demuxer.demuxSampleAes(l,u,_).then(function(H){var B=F.remuxer.remux(H.audioTrack,H.avcTrack,H.id3Track,H.textTrack,_,g,!1,F.id);return{remuxResult:B,chunkMeta:m}})},h.configureTransmuxer=function(l,u){for(var _=this.config,g=this.observer,m=this.typeSupported,F=this.vendor,H=u.audioCodec,B=u.defaultInitPts,Q=u.duration,z=u.initSegmentData,N=u.videoCodec,ee,le=0,Be=n.length;le<Be;le++)if(n[le].demux.probe(l)){ee=n[le];break}ee||(i.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),ee={demux:k.default,remux:p.default});var Ce=this.demuxer,Me=this.remuxer,Le=ee.remux,je=ee.demux;(!Me||!(Me instanceof Le))&&(this.remuxer=new Le(g,_,m,F)),(!Ce||!(Ce instanceof je))&&(this.demuxer=new je(g,_,m),this.probe=je.probe),this.resetInitSegment(z,H,N,Q),this.resetInitialTimestamp(B)},h.needsProbing=function(l,u,_){return!this.demuxer||!this.remuxer||u||_},h.getDecrypter=function(){var l=this.decrypter;return l||(l=this.decrypter=new O.default(this.observer,this.config)),l},C}();function t(C,h){var c=null;return C.byteLength>0&&h!=null&&h.key!=null&&h.iv!==null&&h.method!=null&&(c=h),c}var y=function(h){return{remuxResult:{},chunkMeta:h}};function b(C){return"then"in C&&C.then instanceof Function}var E=function(h,c,l,u,_){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=h,this.videoCodec=c,this.initSegmentData=l,this.duration=u,this.defaultInitPts=_},T=function(h,c,l,u,_){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=h,this.contiguous=c,this.accurateTimeOffset=l,this.trackSwitch=u,this.timeOffset=_}},"./src/demux/tsdemuxer.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"discardEPB",function(){return y});var V=L("./src/demux/adts.ts"),U=L("./src/demux/mpegaudio.ts"),O=L("./src/demux/exp-golomb.ts"),q=L("./src/demux/id3.ts"),k=L("./src/demux/sample-aes.ts"),e=L("./src/events.ts"),I=L("./src/utils/mp4-tools.ts"),d=L("./src/utils/logger.ts"),p=L("./src/errors.ts"),A={video:1,audio:2,id3:3,text:4},s=function(){function b(T,C,h){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=T,this.config=C,this.typeSupported=h}b.probe=function(C){var h=b.syncOffset(C);return h<0?!1:(h&&d.logger.warn("MPEG2-TS detected but first sync word found @ offset "+h+", junk ahead ?"),!0)},b.syncOffset=function(C){for(var h=Math.min(1e3,C.length-3*188),c=0;c<h;){if(C[c]===71&&C[c+188]===71&&C[c+2*188]===71)return c;c++}return-1},b.createTrack=function(C,h){return{container:C==="video"||C==="audio"?"video/mp2t":void 0,type:C,id:A[C],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:C==="audio"?h:void 0}};var E=b.prototype;return E.resetInitSegment=function(C,h,c){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=b.createTrack("video",c),this._audioTrack=b.createTrack("audio",c),this._id3Track=b.createTrack("id3",c),this._txtTrack=b.createTrack("text",c),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=C,this.videoCodec=h,this._duration=c},E.resetTimeStamp=function(){},E.resetContiguity=function(){var C=this._audioTrack,h=this._avcTrack,c=this._id3Track;C&&(C.pesData=null),h&&(h.pesData=null),c&&(c.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},E.demux=function(C,h,c,l){c===void 0&&(c=!1),l===void 0&&(l=!1),c||(this.sampleAes=null);var u,_=this._avcTrack,g=this._audioTrack,m=this._id3Track,F=_.pid,H=_.pesData,B=g.pid,Q=m.pid,z=g.pesData,N=m.pesData,ee=!1,le=this.pmtParsed,Be=this._pmtId,Ce=C.length;if(this.remainderData&&(C=Object(I.appendUint8Array)(this.remainderData,C),Ce=C.length,this.remainderData=null),Ce<188&&!l)return this.remainderData=C,{audioTrack:g,avcTrack:_,id3Track:m,textTrack:this._txtTrack};var Me=Math.max(0,b.syncOffset(C));Ce-=(Ce+Me)%188,Ce<C.byteLength&&!l&&(this.remainderData=new Uint8Array(C.buffer,Ce,C.buffer.byteLength-Ce));for(var Le=Me;Le<Ce;Le+=188)if(C[Le]===71){var je=!!(C[Le+1]&64),He=((C[Le+1]&31)<<8)+C[Le+2],Je=(C[Le+3]&48)>>4,Se=void 0;if(Je>1){if(Se=Le+5+C[Le+4],Se===Le+188)continue}else Se=Le+4;switch(He){case F:je&&(H&&(u=a(H))&&this.parseAVCPES(u,!1),H={data:[],size:0}),H&&(H.data.push(C.subarray(Se,Le+188)),H.size+=Le+188-Se);break;case B:je&&(z&&(u=a(z))&&(g.isAAC?this.parseAACPES(u):this.parseMPEGPES(u)),z={data:[],size:0}),z&&(z.data.push(C.subarray(Se,Le+188)),z.size+=Le+188-Se);break;case Q:je&&(N&&(u=a(N))&&this.parseID3PES(u),N={data:[],size:0}),N&&(N.data.push(C.subarray(Se,Le+188)),N.size+=Le+188-Se);break;case 0:je&&(Se+=C[Se]+1),Be=this._pmtId=o(C,Se);break;case Be:{je&&(Se+=C[Se]+1);var $=n(C,Se,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,c);F=$.avc,F>0&&(_.pid=F),B=$.audio,B>0&&(g.pid=B,g.isAAC=$.isAAC),Q=$.id3,Q>0&&(m.pid=Q),ee&&!le&&(d.logger.log("reparse from beginning"),ee=!1,Le=Me-188),le=this.pmtParsed=!0;break}case 17:case 8191:break;default:ee=!0;break}}else this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});_.pesData=H,g.pesData=z,m.pesData=N;var D={audioTrack:g,avcTrack:_,id3Track:m,textTrack:this._txtTrack};return l&&this.extractRemainingSamples(D),D},E.flush=function(){var C=this.remainderData;this.remainderData=null;var h;return C?h=this.demux(C,-1,!1,!0):h={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(h),this.sampleAes?this.decrypt(h,this.sampleAes):h},E.extractRemainingSamples=function(C){var h=C.audioTrack,c=C.avcTrack,l=C.id3Track,u=c.pesData,_=h.pesData,g=l.pesData,m;u&&(m=a(u))?(this.parseAVCPES(m,!0),c.pesData=null):c.pesData=u,_&&(m=a(_))?(h.isAAC?this.parseAACPES(m):this.parseMPEGPES(m),h.pesData=null):(_!=null&&_.size&&d.logger.log("last AAC PES packet truncated,might overlap between fragments"),h.pesData=_),g&&(m=a(g))?(this.parseID3PES(m),l.pesData=null):l.pesData=g},E.demuxSampleAes=function(C,h,c){var l=this.demux(C,c,!0,!this.config.progressive),u=this.sampleAes=new k.default(this.observer,this.config,h);return this.decrypt(l,u)},E.decrypt=function(C,h){return new Promise(function(c){var l=C.audioTrack,u=C.avcTrack;l.samples&&l.isAAC?h.decryptAacSamples(l.samples,0,function(){u.samples?h.decryptAvcSamples(u.samples,0,0,function(){c(C)}):c(C)}):u.samples&&h.decryptAvcSamples(u.samples,0,0,function(){c(C)})})},E.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},E.parseAVCPES=function(C,h){var c=this,l=this._avcTrack,u=this.parseAVCNALu(C.data),_=!1,g=this.avcSample,m,F=!1;C.data=null,g&&u.length&&!l.audFound&&(r(g,l),g=this.avcSample=i(!1,C.pts,C.dts,"")),u.forEach(function(H){switch(H.type){case 1:{m=!0,g||(g=c.avcSample=i(!0,C.pts,C.dts,"")),_&&(g.debug+="NDR "),g.frame=!0;var B=H.data;if(F&&B.length>4){var Q=new O.default(B).readSliceType();(Q===2||Q===4||Q===7||Q===9)&&(g.key=!0)}break}case 5:m=!0,g||(g=c.avcSample=i(!0,C.pts,C.dts,"")),_&&(g.debug+="IDR "),g.key=!0,g.frame=!0;break;case 6:{m=!0,_&&g&&(g.debug+="SEI ");var z=new O.default(y(H.data));z.readUByte();for(var N=0,ee=0,le=!1,Be=0;!le&&z.bytesAvailable>1;){N=0;do Be=z.readUByte(),N+=Be;while(Be===255);ee=0;do Be=z.readUByte(),ee+=Be;while(Be===255);if(N===4&&z.bytesAvailable!==0){le=!0;var Ce=z.readUByte();if(Ce===181){var Me=z.readUShort();if(Me===49){var Le=z.readUInt();if(Le===1195456820){var je=z.readUByte();if(je===3){for(var He=z.readUByte(),Je=z.readUByte(),Se=31&He,$=[He,Je],D=0;D<Se;D++)$.push(z.readUByte()),$.push(z.readUByte()),$.push(z.readUByte());t(c._txtTrack.samples,{type:3,pts:C.pts,bytes:$})}}}}}else if(N===5&&z.bytesAvailable!==0){if(le=!0,ee>16){for(var M=[],te=0;te<16;te++)M.push(z.readUByte().toString(16)),(te===3||te===5||te===7||te===9)&&M.push("-");for(var oe=ee-16,G=new Uint8Array(oe),re=0;re<oe;re++)G[re]=z.readUByte();t(c._txtTrack.samples,{pts:C.pts,payloadType:N,uuid:M.join(""),userData:Object(q.utf8ArrayToStr)(G),userDataBytes:G})}}else if(ee<z.bytesAvailable)for(var j=0;j<ee;j++)z.readUByte()}break}case 7:if(m=!0,F=!0,_&&g&&(g.debug+="SPS "),!l.sps){var J=new O.default(H.data),Y=J.readSPS();l.width=Y.width,l.height=Y.height,l.pixelRatio=Y.pixelRatio,l.sps=[H.data],l.duration=c._duration;for(var he=H.data.subarray(1,4),we="avc1.",Te=0;Te<3;Te++){var Xe=he[Te].toString(16);Xe.length<2&&(Xe="0"+Xe),we+=Xe}l.codec=we}break;case 8:m=!0,_&&g&&(g.debug+="PPS "),l.pps||(l.pps=[H.data]);break;case 9:m=!1,l.audFound=!0,g&&r(g,l),g=c.avcSample=i(!1,C.pts,C.dts,_?"AUD ":"");break;case 12:m=!1;break;default:m=!1,g&&(g.debug+="unknown NAL "+H.type+" ");break}if(g&&m){var Ze=g.units;Ze.push(H)}}),h&&g&&(r(g,l),this.avcSample=null)},E.getLastNalUnit=function(){var C,h=this.avcSample,c;if(!h||h.units.length===0){var l=this._avcTrack.samples;h=l[l.length-1]}if((C=h)!==null&&C!==void 0&&C.units){var u=h.units;c=u[u.length-1]}return c},E.parseAVCNALu=function(C){var h=C.byteLength,c=this._avcTrack,l=c.naluState||0,u=l,_=[],g=0,m,F,H,B=-1,Q=0;for(l===-1&&(B=0,Q=C[0]&31,l=0,g=1);g<h;){if(m=C[g++],!l){l=m?0:1;continue}if(l===1){l=m?0:2;continue}if(!m)l=3;else if(m===1){if(B>=0){var z={data:C.subarray(B,g-l-1),type:Q};_.push(z)}else{var N=this.getLastNalUnit();if(N&&(u&&g<=4-u&&(N.state&&(N.data=N.data.subarray(0,N.data.byteLength-u))),F=g-l-1,F>0)){var ee=new Uint8Array(N.data.byteLength+F);ee.set(N.data,0),ee.set(C.subarray(0,F),N.data.byteLength),N.data=ee,N.state=0}}g<h?(H=C[g]&31,B=g,Q=H,l=0):l=-1}else l=0}if(B>=0&&l>=0){var le={data:C.subarray(B,h),type:Q,state:l};_.push(le)}if(_.length===0){var Be=this.getLastNalUnit();if(Be){var Ce=new Uint8Array(Be.data.byteLength+C.byteLength);Ce.set(Be.data,0),Ce.set(C,Be.data.byteLength),Be.data=Ce}}return c.naluState=l,_},E.parseAACPES=function(C){var h=0,c=this._audioTrack,l=this.aacOverFlow,u=C.data;if(l){this.aacOverFlow=null;var _=l.sample.unit.byteLength,g=Math.min(l.missing,_),m=_-g;l.sample.unit.set(u.subarray(0,g),m),c.samples.push(l.sample),h=l.missing}var F,H;for(F=h,H=u.length;F<H-1&&!V.isHeader(u,F);F++);if(F!==h){var B,Q;if(F<H-1?(B="AAC PES did not start with ADTS header,offset:"+F,Q=!1):(B="no ADTS header found in AAC PES",Q=!0),d.logger.warn("parsing error:"+B),this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:p.ErrorTypes.MEDIA_ERROR,details:p.ErrorDetails.FRAG_PARSING_ERROR,fatal:Q,reason:B}),Q)return}V.initTrackConfig(c,this.observer,u,F,this.audioCodec);var z;if(C.pts!==void 0)z=C.pts;else if(l){var N=V.getFrameDuration(c.samplerate);z=l.sample.pts+N}else{d.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var ee=0;F<H;)if(V.isHeader(u,F)){if(F+5<H){var le=V.appendFrame(c,u,F,z,ee);if(le)if(le.missing)this.aacOverFlow=le;else{F+=le.length,ee++;continue}}break}else F++},E.parseMPEGPES=function(C){var h=C.data,c=h.length,l=0,u=0,_=C.pts;if(_===void 0){d.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;u<c;)if(U.isHeader(h,u)){var g=U.appendFrame(this._audioTrack,h,u,_,l);if(g)u+=g.length,l++;else break}else u++},E.parseID3PES=function(C){if(C.pts===void 0){d.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(C)},b}();s.minProbeByteLength=188;function i(b,E,T,C){return{key:b,frame:!1,pts:E,dts:T,units:[],debug:C,length:0}}function o(b,E){return(b[E+10]&31)<<8|b[E+11]}function n(b,E,T,C){var h={audio:-1,avc:-1,id3:-1,isAAC:!0},c=(b[E+1]&15)<<8|b[E+2],l=E+3+c-4,u=(b[E+10]&15)<<8|b[E+11];for(E+=12+u;E<l;){var _=(b[E+1]&31)<<8|b[E+2];switch(b[E]){case 207:if(!C){d.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:h.audio===-1&&(h.audio=_);break;case 21:h.id3===-1&&(h.id3=_);break;case 219:if(!C){d.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:h.avc===-1&&(h.avc=_);break;case 3:case 4:T?h.audio===-1&&(h.audio=_,h.isAAC=!1):d.logger.log("MPEG audio found, not supported in this browser");break;case 36:d.logger.warn("Unsupported HEVC stream type found");break;default:break}E+=((b[E+3]&15)<<8|b[E+4])+5}return h}function a(b){var E=0,T,C,h,c,l,u=b.data;if(!b||b.size===0)return null;for(;u[0].length<19&&u.length>1;){var _=new Uint8Array(u[0].length+u[1].length);_.set(u[0]),_.set(u[1],u[0].length),u[0]=_,u.splice(1,1)}T=u[0];var g=(T[0]<<16)+(T[1]<<8)+T[2];if(g===1){if(C=(T[4]<<8)+T[5],C&&C>b.size-6)return null;var m=T[7];m&192&&(c=(T[9]&14)*536870912+(T[10]&255)*4194304+(T[11]&254)*16384+(T[12]&255)*128+(T[13]&254)/2,m&64?(l=(T[14]&14)*536870912+(T[15]&255)*4194304+(T[16]&254)*16384+(T[17]&255)*128+(T[18]&254)/2,c-l>60*9e4&&(d.logger.warn(Math.round((c-l)/9e4)+"s delta between PTS and DTS, align them"),c=l)):l=c),h=T[8];var F=h+9;if(b.size<=F)return null;b.size-=F;for(var H=new Uint8Array(b.size),B=0,Q=u.length;B<Q;B++){T=u[B];var z=T.byteLength;if(F)if(F>z){F-=z;continue}else T=T.subarray(F),z-=F,F=0;H.set(T,E),E+=z}return C&&(C-=h+3),{data:H,pts:c,dts:l,len:C}}return null}function r(b,E){if(b.units.length&&b.frame){if(b.pts===void 0){var T=E.samples,C=T.length;if(C){var h=T[C-1];b.pts=h.pts,b.dts=h.dts}else{E.dropped++;return}}E.samples.push(b)}b.debug.length&&d.logger.log(b.pts+"/"+b.dts+":"+b.debug)}function t(b,E){var T=b.length;if(T>0){if(E.pts>=b[T-1].pts)b.push(E);else for(var C=T-1;C>=0;C--)if(E.pts<b[C].pts){b.splice(C,0,E);break}}else b.push(E)}function y(b){for(var E=b.byteLength,T=[],C=1;C<E-2;)b[C]===0&&b[C+1]===0&&b[C+2]===3?(T.push(C+2),C+=2):C++;if(T.length===0)return b;var h=E-T.length,c=new Uint8Array(h),l=0;for(C=0;C<h;l++,C++)l===T[0]&&(l++,T.shift()),c[C]=b[l];return c}W.default=s},"./src/errors.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"ErrorTypes",function(){return V}),L.d(W,"ErrorDetails",function(){return U});var V;(function(O){O.NETWORK_ERROR="networkError",O.MEDIA_ERROR="mediaError",O.KEY_SYSTEM_ERROR="keySystemError",O.MUX_ERROR="muxError",O.OTHER_ERROR="otherError"})(V||(V={}));var U;(function(O){O.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",O.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",O.KEY_SYSTEM_NO_SESSION="keySystemNoSession",O.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",O.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",O.MANIFEST_LOAD_ERROR="manifestLoadError",O.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",O.MANIFEST_PARSING_ERROR="manifestParsingError",O.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",O.LEVEL_EMPTY_ERROR="levelEmptyError",O.LEVEL_LOAD_ERROR="levelLoadError",O.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",O.LEVEL_SWITCH_ERROR="levelSwitchError",O.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",O.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",O.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",O.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",O.FRAG_LOAD_ERROR="fragLoadError",O.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",O.FRAG_DECRYPT_ERROR="fragDecryptError",O.FRAG_PARSING_ERROR="fragParsingError",O.REMUX_ALLOC_ERROR="remuxAllocError",O.KEY_LOAD_ERROR="keyLoadError",O.KEY_LOAD_TIMEOUT="keyLoadTimeOut",O.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",O.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",O.BUFFER_APPEND_ERROR="bufferAppendError",O.BUFFER_APPENDING_ERROR="bufferAppendingError",O.BUFFER_STALLED_ERROR="bufferStalledError",O.BUFFER_FULL_ERROR="bufferFullError",O.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",O.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",O.INTERNAL_EXCEPTION="internalException",O.INTERNAL_ABORTED="aborted",O.UNKNOWN="unknown"})(U||(U={}))},"./src/events.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"Events",function(){return V});var V;(function(U){U.MEDIA_ATTACHING="hlsMediaAttaching",U.MEDIA_ATTACHED="hlsMediaAttached",U.MEDIA_DETACHING="hlsMediaDetaching",U.MEDIA_DETACHED="hlsMediaDetached",U.BUFFER_RESET="hlsBufferReset",U.BUFFER_CODECS="hlsBufferCodecs",U.BUFFER_CREATED="hlsBufferCreated",U.BUFFER_APPENDING="hlsBufferAppending",U.BUFFER_APPENDED="hlsBufferAppended",U.BUFFER_EOS="hlsBufferEos",U.BUFFER_FLUSHING="hlsBufferFlushing",U.BUFFER_FLUSHED="hlsBufferFlushed",U.MANIFEST_LOADING="hlsManifestLoading",U.MANIFEST_LOADED="hlsManifestLoaded",U.MANIFEST_PARSED="hlsManifestParsed",U.LEVEL_SWITCHING="hlsLevelSwitching",U.LEVEL_SWITCHED="hlsLevelSwitched",U.LEVEL_LOADING="hlsLevelLoading",U.LEVEL_LOADED="hlsLevelLoaded",U.LEVEL_UPDATED="hlsLevelUpdated",U.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",U.LEVELS_UPDATED="hlsLevelsUpdated",U.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",U.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",U.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",U.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",U.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",U.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",U.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",U.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",U.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",U.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",U.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",U.CUES_PARSED="hlsCuesParsed",U.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",U.INIT_PTS_FOUND="hlsInitPtsFound",U.FRAG_LOADING="hlsFragLoading",U.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",U.FRAG_LOADED="hlsFragLoaded",U.FRAG_DECRYPTED="hlsFragDecrypted",U.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",U.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",U.FRAG_PARSING_METADATA="hlsFragParsingMetadata",U.FRAG_PARSED="hlsFragParsed",U.FRAG_BUFFERED="hlsFragBuffered",U.FRAG_CHANGED="hlsFragChanged",U.FPS_DROP="hlsFpsDrop",U.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",U.ERROR="hlsError",U.DESTROYING="hlsDestroying",U.KEY_LOADING="hlsKeyLoading",U.KEY_LOADED="hlsKeyLoaded",U.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",U.BACK_BUFFER_REACHED="hlsBackBufferReached"})(V||(V={}))},"./src/hls.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return b});var V=L("./node_modules/url-toolkit/src/url-toolkit.js"),U=L.n(V),O=L("./src/loader/playlist-loader.ts"),q=L("./src/loader/key-loader.ts"),k=L("./src/controller/id3-track-controller.ts"),e=L("./src/controller/latency-controller.ts"),I=L("./src/controller/level-controller.ts"),d=L("./src/controller/fragment-tracker.ts"),p=L("./src/controller/stream-controller.ts"),A=L("./src/is-supported.ts"),s=L("./src/utils/logger.ts"),i=L("./src/config.ts"),o=L("./node_modules/eventemitter3/index.js"),n=L.n(o),a=L("./src/events.ts"),r=L("./src/errors.ts");function t(E,T){for(var C=0;C<T.length;C++){var h=T[C];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(E,h.key,h)}}function y(E,T,C){return T&&t(E.prototype,T),C&&t(E,C),E}var b=function(){E.isSupported=function(){return Object(A.isSupported)()};function E(C){C===void 0&&(C={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new o.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var h=this.config=Object(i.mergeConfig)(E.DefaultConfig,C);this.userConfig=C,Object(s.enableLogs)(h.debug),this._autoLevelCapping=-1,h.progressive&&Object(i.enableStreamingMode)(h);var c=h.abrController,l=h.bufferController,u=h.capLevelController,_=h.fpsController,g=this.abrController=new c(this),m=this.bufferController=new l(this),F=this.capLevelController=new u(this),H=new _(this),B=new O.default(this),Q=new q.default(this),z=new k.default(this),N=this.levelController=new I.default(this),ee=new d.FragmentTracker(this),le=this.streamController=new p.default(this,ee);F.setStreamController(le),H.setStreamController(le);var Be=[N,le];this.networkControllers=Be;var Ce=[B,Q,g,m,F,H,z,ee];this.audioTrackController=this.createController(h.audioTrackController,null,Be),this.createController(h.audioStreamController,ee,Be),this.subtitleTrackController=this.createController(h.subtitleTrackController,null,Be),this.createController(h.subtitleStreamController,ee,Be),this.createController(h.timelineController,null,Ce),this.emeController=this.createController(h.emeController,null,Ce),this.cmcdController=this.createController(h.cmcdController,null,Ce),this.latencyController=this.createController(e.default,null,Ce),this.coreComponents=Ce}var T=E.prototype;return T.createController=function(h,c,l){if(h){var u=c?new h(this,c):new h(this);return l&&l.push(u),u}return null},T.on=function(h,c,l){l===void 0&&(l=this),this._emitter.on(h,c,l)},T.once=function(h,c,l){l===void 0&&(l=this),this._emitter.once(h,c,l)},T.removeAllListeners=function(h){this._emitter.removeAllListeners(h)},T.off=function(h,c,l,u){l===void 0&&(l=this),this._emitter.off(h,c,l,u)},T.listeners=function(h){return this._emitter.listeners(h)},T.emit=function(h,c,l){return this._emitter.emit(h,c,l)},T.trigger=function(h,c){if(this.config.debug)return this.emit(h,h,c);try{return this.emit(h,h,c)}catch(l){s.logger.error("An internal error happened while handling event "+h+'. Error message: "'+l.message+'". Here is a stacktrace:',l),this.trigger(a.Events.ERROR,{type:r.ErrorTypes.OTHER_ERROR,details:r.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:h,error:l})}return!1},T.listenerCount=function(h){return this._emitter.listenerCount(h)},T.destroy=function(){s.logger.log("destroy"),this.trigger(a.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(h){return h.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(h){return h.destroy()}),this.coreComponents.length=0},T.attachMedia=function(h){s.logger.log("attachMedia"),this._media=h,this.trigger(a.Events.MEDIA_ATTACHING,{media:h})},T.detachMedia=function(){s.logger.log("detachMedia"),this.trigger(a.Events.MEDIA_DETACHING,void 0),this._media=null},T.loadSource=function(h){this.stopLoad();var c=this.media,l=this.url,u=this.url=V.buildAbsoluteURL(self.location.href,h,{alwaysNormalize:!0});s.logger.log("loadSource:"+u),c&&l&&l!==u&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(c)),this.trigger(a.Events.MANIFEST_LOADING,{url:h})},T.startLoad=function(h){h===void 0&&(h=-1),s.logger.log("startLoad("+h+")"),this.networkControllers.forEach(function(c){c.startLoad(h)})},T.stopLoad=function(){s.logger.log("stopLoad"),this.networkControllers.forEach(function(h){h.stopLoad()})},T.swapAudioCodec=function(){s.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},T.recoverMediaError=function(){s.logger.log("recoverMediaError");var h=this._media;this.detachMedia(),h&&this.attachMedia(h)},T.removeLevel=function(h,c){c===void 0&&(c=0),this.levelController.removeLevel(h,c)},y(E,[{key:"levels",get:function(){var h=this.levelController.levels;return h||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(h){s.logger.log("set currentLevel:"+h),this.loadLevel=h,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(h){s.logger.log("set nextLevel:"+h),this.levelController.manualLevel=h,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(h){s.logger.log("set loadLevel:"+h),this.levelController.manualLevel=h}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(h){this.levelController.nextLoadLevel=h}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(h){s.logger.log("set firstLevel:"+h),this.levelController.firstLevel=h}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(h){s.logger.log("set startLevel:"+h),h!==-1&&(h=Math.max(h,this.minAutoLevel)),this.levelController.startLevel=h}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(h){var c=!!h;c!==this.config.capLevelToPlayerSize&&(c?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=c)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(h){this._autoLevelCapping!==h&&(s.logger.log("set autoLevelCapping:"+h),this._autoLevelCapping=h)}},{key:"bandwidthEstimate",get:function(){var h=this.abrController.bwEstimator;return h?h.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var h=this.levels,c=this.config.minAutoBitrate;if(!h)return 0;for(var l=h.length,u=0;u<l;u++)if(h[u].maxBitrate>c)return u;return 0}},{key:"maxAutoLevel",get:function(){var h=this.levels,c=this.autoLevelCapping,l;return c===-1&&h&&h.length?l=h.length-1:l=c,l}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(h){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,h)}},{key:"audioTracks",get:function(){var h=this.audioTrackController;return h?h.audioTracks:[]}},{key:"audioTrack",get:function(){var h=this.audioTrackController;return h?h.audioTrack:-1},set:function(h){var c=this.audioTrackController;c&&(c.audioTrack=h)}},{key:"subtitleTracks",get:function(){var h=this.subtitleTrackController;return h?h.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var h=this.subtitleTrackController;return h?h.subtitleTrack:-1},set:function(h){var c=this.subtitleTrackController;c&&(c.subtitleTrack=h)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var h=this.subtitleTrackController;return h?h.subtitleDisplay:!1},set:function(h){var c=this.subtitleTrackController;c&&(c.subtitleDisplay=h)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(h){this.config.lowLatencyMode=h}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return a.Events}},{key:"ErrorTypes",get:function(){return r.ErrorTypes}},{key:"ErrorDetails",get:function(){return r.ErrorDetails}},{key:"DefaultConfig",get:function(){return E.defaultConfig?E.defaultConfig:i.hlsDefaultConfig},set:function(h){E.defaultConfig=h}}]),E}();b.defaultConfig=void 0},"./src/is-supported.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"isSupported",function(){return O}),L.d(W,"changeTypeSupported",function(){return q});var V=L("./src/utils/mediasource-helper.ts");function U(){return self.SourceBuffer||self.WebKitSourceBuffer}function O(){var k=Object(V.getMediaSource)();if(!k)return!1;var e=U(),I=k&&typeof k.isTypeSupported=="function"&&k.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),d=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!I&&!!d}function q(){var k,e=U();return typeof(e==null||((k=e.prototype)===null||k===void 0)?void 0:k.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return s}),L.d(W,"LoadError",function(){return o});var V=L("./src/polyfills/number.ts"),U=L("./src/errors.ts");function O(n,a){n.prototype=Object.create(a.prototype),n.prototype.constructor=n,d(n,a)}function q(n){var a=typeof Map=="function"?new Map:void 0;return q=function(t){if(t===null||!I(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a!="undefined"){if(a.has(t))return a.get(t);a.set(t,y)}function y(){return k(t,arguments,p(this).constructor)}return y.prototype=Object.create(t.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),d(y,t)},q(n)}function k(n,a,r){return e()?k=Reflect.construct:k=function(y,b,E){var T=[null];T.push.apply(T,b);var C=Function.bind.apply(y,T),h=new C;return E&&d(h,E.prototype),h},k.apply(null,arguments)}function e(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(n){return!1}}function I(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function d(n,a){return d=Object.setPrototypeOf||function(t,y){return t.__proto__=y,t},d(n,a)}function p(n){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},p(n)}var A=Math.pow(2,17),s=function(){function n(r){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=r}var a=n.prototype;return a.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},a.abort=function(){this.loader&&this.loader.abort()},a.load=function(t,y){var b=this,E=t.url;if(!E)return Promise.reject(new o({type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(E?"part list":"url")));this.abort();var T=this.config,C=T.fLoader,h=T.loader;return new Promise(function(c,l){b.loader&&b.loader.destroy();var u=b.loader=t.loader=C?new C(T):new h(T),_=i(t),g={timeout:T.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:T.fragLoadingMaxRetryTimeout,highWaterMark:A};t.stats=u.stats,u.load(_,g,{onSuccess:function(F,H,B,Q){b.resetLoader(t,u),c({frag:t,part:null,payload:F.data,networkDetails:Q})},onError:function(F,H,B){b.resetLoader(t,u),l(new o({type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:F,networkDetails:B}))},onAbort:function(F,H,B){b.resetLoader(t,u),l(new o({type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:B}))},onTimeout:function(F,H,B){b.resetLoader(t,u),l(new o({type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:B}))},onProgress:function(F,H,B,Q){y&&y({frag:t,part:null,payload:B,networkDetails:Q})}})})},a.loadPart=function(t,y,b){var E=this;this.abort();var T=this.config,C=T.fLoader,h=T.loader;return new Promise(function(c,l){E.loader&&E.loader.destroy();var u=E.loader=t.loader=C?new C(T):new h(T),_=i(t,y),g={timeout:T.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:T.fragLoadingMaxRetryTimeout,highWaterMark:A};y.stats=u.stats,u.load(_,g,{onSuccess:function(F,H,B,Q){E.resetLoader(t,u),E.updateStatsFromPart(t,y);var z={frag:t,part:y,payload:F.data,networkDetails:Q};b(z),c(z)},onError:function(F,H,B){E.resetLoader(t,u),l(new o({type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:y,response:F,networkDetails:B}))},onAbort:function(F,H,B){t.stats.aborted=y.stats.aborted,E.resetLoader(t,u),l(new o({type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:y,networkDetails:B}))},onTimeout:function(F,H,B){E.resetLoader(t,u),l(new o({type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:y,networkDetails:B}))}})})},a.updateStatsFromPart=function(t,y){var b=t.stats,E=y.stats,T=E.total;if(b.loaded+=E.loaded,T){var C=Math.round(t.duration/y.duration),h=Math.min(Math.round(b.loaded/T),C),c=C-h,l=c*Math.round(b.loaded/h);b.total=b.loaded+l}else b.total=Math.max(b.loaded,b.total);var u=b.loading,_=E.loading;u.start?u.first+=_.first-_.start:(u.start=_.start,u.first=_.first),u.end=_.end},a.resetLoader=function(t,y){t.loader=null,this.loader===y&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),y.destroy()},n}();function i(n,a){a===void 0&&(a=null);var r=a||n,t={frag:n,part:a,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},y=r.byteRangeStartOffset,b=r.byteRangeEndOffset;return Object(V.isFiniteNumber)(y)&&Object(V.isFiniteNumber)(b)&&(t.rangeStart=y,t.rangeEnd=b),t}var o=function(n){O(a,n);function a(r){for(var t,y=arguments.length,b=new Array(y>1?y-1:0),E=1;E<y;E++)b[E-1]=arguments[E];return t=n.call.apply(n,[this].concat(b))||this,t.data=void 0,t.data=r,t}return a}(q(Error))},"./src/loader/fragment.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"ElementaryStreamTypes",function(){return s}),L.d(W,"BaseSegment",function(){return i}),L.d(W,"Fragment",function(){return o}),L.d(W,"Part",function(){return n});var V=L("./src/polyfills/number.ts"),U=L("./node_modules/url-toolkit/src/url-toolkit.js"),O=L.n(U),q=L("./src/utils/logger.ts"),k=L("./src/loader/level-key.ts"),e=L("./src/loader/load-stats.ts");function I(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,d(a,r)}function d(a,r){return d=Object.setPrototypeOf||function(y,b){return y.__proto__=b,y},d(a,r)}function p(a,r){for(var t=0;t<r.length;t++){var y=r[t];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(a,y.key,y)}}function A(a,r,t){return r&&p(a.prototype,r),t&&p(a,t),a}var s;(function(a){a.AUDIO="audio",a.VIDEO="video",a.AUDIOVIDEO="audiovideo"})(s||(s={}));var i=function(){function a(t){var y;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(y={},y[s.AUDIO]=null,y[s.VIDEO]=null,y[s.AUDIOVIDEO]=null,y),this.baseurl=t}var r=a.prototype;return r.setByteRange=function(y,b){var E=y.split("@",2),T=[];E.length===1?T[0]=b?b.byteRangeEndOffset:0:T[0]=parseInt(E[1]),T[1]=parseInt(E[0])+T[0],this._byteRange=T},A(a,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(U.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(y){this._url=y}}]),a}(),o=function(a){I(r,a);function r(y,b){var E;return E=a.call(this,b)||this,E._decryptdata=null,E.rawProgramDateTime=null,E.programDateTime=null,E.tagList=[],E.duration=0,E.sn=0,E.levelkey=void 0,E.type=void 0,E.loader=null,E.level=-1,E.cc=0,E.startPTS=void 0,E.endPTS=void 0,E.appendedPTS=void 0,E.startDTS=void 0,E.endDTS=void 0,E.start=0,E.deltaPTS=void 0,E.maxStartPTS=void 0,E.minEndPTS=void 0,E.stats=new e.LoadStats,E.urlId=0,E.data=void 0,E.bitrateTest=!1,E.title=null,E.initSegment=null,E.type=y,E}var t=r.prototype;return t.createInitializationVector=function(b){for(var E=new Uint8Array(16),T=12;T<16;T++)E[T]=b>>8*(15-T)&255;return E},t.setDecryptDataFromLevelKey=function(b,E){var T=b;return(b==null?void 0:b.method)==="AES-128"&&b.uri&&!b.iv&&(T=k.LevelKey.fromURI(b.uri),T.method=b.method,T.iv=this.createInitializationVector(E),T.keyFormat="identity"),T},t.setElementaryStreamInfo=function(b,E,T,C,h,c){c===void 0&&(c=!1);var l=this.elementaryStreams,u=l[b];if(!u){l[b]={startPTS:E,endPTS:T,startDTS:C,endDTS:h,partial:c};return}u.startPTS=Math.min(u.startPTS,E),u.endPTS=Math.max(u.endPTS,T),u.startDTS=Math.min(u.startDTS,C),u.endDTS=Math.max(u.endDTS,h)},t.clearElementaryStreamInfo=function(){var b=this.elementaryStreams;b[s.AUDIO]=null,b[s.VIDEO]=null,b[s.AUDIOVIDEO]=null},A(r,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var b=this.sn;typeof b!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&q.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),b=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,b)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(V.isFiniteNumber)(this.programDateTime))return null;var b=Object(V.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+b*1e3}},{key:"encrypted",get:function(){var b;return!!((b=this.decryptdata)!==null&&b!==void 0&&b.keyFormat&&this.decryptdata.uri)}}]),r}(i),n=function(a){I(r,a);function r(t,y,b,E,T){var C;C=a.call(this,b)||this,C.fragOffset=0,C.duration=0,C.gap=!1,C.independent=!1,C.relurl=void 0,C.fragment=void 0,C.index=void 0,C.stats=new e.LoadStats,C.duration=t.decimalFloatingPoint("DURATION"),C.gap=t.bool("GAP"),C.independent=t.bool("INDEPENDENT"),C.relurl=t.enumeratedString("URI"),C.fragment=y,C.index=E;var h=t.enumeratedString("BYTERANGE");return h&&C.setByteRange(h,T),T&&(C.fragOffset=T.fragOffset+T.duration),C}return A(r,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var y=this.elementaryStreams;return!!(y.audio||y.video||y.audiovideo)}}]),r}(i)},"./src/loader/key-loader.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return q});var V=L("./src/events.ts"),U=L("./src/errors.ts"),O=L("./src/utils/logger.ts"),q=function(){function k(I){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=I,this._registerListeners()}var e=k.prototype;return e._registerListeners=function(){this.hls.on(V.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(V.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){this._unregisterListeners();for(var d in this.loaders){var p=this.loaders[d];p&&p.destroy()}this.loaders={}},e.onKeyLoading=function(d,p){var A=p.frag,s=A.type,i=this.loaders[s];if(!A.decryptdata){O.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var o=A.decryptdata.uri;if(o!==this.decrypturl||this.decryptkey===null){var n=this.hls.config;if(i&&(O.logger.warn("abort previous key loader for type:"+s),i.abort()),!o){O.logger.warn("key uri is falsy");return}var a=n.loader,r=A.loader=this.loaders[s]=new a(n);this.decrypturl=o,this.decryptkey=null;var t={url:o,frag:A,responseType:"arraybuffer"},y={timeout:n.fragLoadingTimeOut,maxRetry:0,retryDelay:n.fragLoadingRetryDelay,maxRetryDelay:n.fragLoadingMaxRetryTimeout,highWaterMark:0},b={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};r.load(t,y,b)}else this.decryptkey&&(A.decryptdata.key=this.decryptkey,this.hls.trigger(V.Events.KEY_LOADED,{frag:A}))},e.loadsuccess=function(d,p,A){var s=A.frag;if(!s.decryptdata){O.logger.error("after key load, decryptdata unset");return}this.decryptkey=s.decryptdata.key=new Uint8Array(d.data),s.loader=null,delete this.loaders[s.type],this.hls.trigger(V.Events.KEY_LOADED,{frag:s})},e.loaderror=function(d,p){var A=p.frag,s=A.loader;s&&s.abort(),delete this.loaders[A.type],this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:A,response:d})},e.loadtimeout=function(d,p){var A=p.frag,s=A.loader;s&&s.abort(),delete this.loaders[A.type],this.hls.trigger(V.Events.ERROR,{type:U.ErrorTypes.NETWORK_ERROR,details:U.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:A})},k}()},"./src/loader/level-details.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"LevelDetails",function(){return k});var V=L("./src/polyfills/number.ts");function U(e,I){for(var d=0;d<I.length;d++){var p=I[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(e,p.key,p)}}function O(e,I,d){return I&&U(e.prototype,I),d&&U(e,d),e}var q=10,k=function(){function e(d){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=d}var I=e.prototype;return I.reloaded=function(p){if(!p){this.advanced=!0,this.updated=!0;return}var A=this.lastPartSn-p.lastPartSn,s=this.lastPartIndex-p.lastPartIndex;this.updated=this.endSN!==p.endSN||!!s||!!A,this.advanced=this.endSN>p.endSN||A>0||A===0&&s>0,this.updated||this.advanced?this.misses=Math.floor(p.misses*.6):this.misses=p.misses+1,this.availabilityDelay=p.availabilityDelay},O(e,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(V.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||q}},{key:"drift",get:function(){var p=this.driftEndTime-this.driftStartTime;if(p>0){var A=this.driftEnd-this.driftStart;return A*1e3/p}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var p;return(p=this.partList)!==null&&p!==void 0&&p.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var p;return(p=this.fragments)!==null&&p!==void 0&&p.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var p;return(p=this.partList)!==null&&p!==void 0&&p.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var p;return(p=this.partList)!==null&&p!==void 0&&p.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}()},"./src/loader/level-key.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"LevelKey",function(){return k});var V=L("./node_modules/url-toolkit/src/url-toolkit.js"),U=L.n(V);function O(e,I){for(var d=0;d<I.length;d++){var p=I[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(e,p.key,p)}}function q(e,I,d){return I&&O(e.prototype,I),d&&O(e,d),e}var k=function(){e.fromURL=function(d,p){return new e(d,p)},e.fromURI=function(d){return new e(d)};function e(I,d){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,d?this._uri=Object(V.buildAbsoluteURL)(I,d,{alwaysNormalize:!0}):this._uri=I}return q(e,[{key:"uri",get:function(){return this._uri}}]),e}()},"./src/loader/load-stats.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"LoadStats",function(){return V});var V=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return r});var V=L("./src/polyfills/number.ts"),U=L("./node_modules/url-toolkit/src/url-toolkit.js"),O=L.n(U),q=L("./src/loader/fragment.ts"),k=L("./src/loader/level-details.ts"),e=L("./src/loader/level-key.ts"),I=L("./src/utils/attr-list.ts"),d=L("./src/utils/logger.ts"),p=L("./src/utils/codecs.ts"),A=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,s=/#EXT-X-MEDIA:(.*)/g,i=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),o=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),n=/\.(mp4|m4s|m4v|m4a)$/i;function a(T){var C,h;return n.test((C=(h=U.parseURL(T))===null||h===void 0?void 0:h.path)!=null?C:"")}var r=function(){function T(){}return T.findGroup=function(h,c){for(var l=0;l<h.length;l++){var u=h[l];if(u.id===c)return u}},T.convertAVC1ToAVCOTI=function(h){var c=h.split(".");if(c.length>2){var l=c.shift()+".";return l+=parseInt(c.shift()).toString(16),l+=("000"+parseInt(c.shift()).toString(16)).substr(-4),l}return h},T.resolve=function(h,c){return U.buildAbsoluteURL(c,h,{alwaysNormalize:!0})},T.parseMasterPlaylist=function(h,c){var l=[],u={},_=!1;A.lastIndex=0;for(var g;(g=A.exec(h))!=null;)if(g[1]){var m=new I.AttrList(g[1]),F={attrs:m,bitrate:m.decimalInteger("AVERAGE-BANDWIDTH")||m.decimalInteger("BANDWIDTH"),name:m.NAME,url:T.resolve(g[2],c)},H=m.decimalResolution("RESOLUTION");H&&(F.width=H.width,F.height=H.height),t((m.CODECS||"").split(/[ ,]+/).filter(function(Q){return Q}),F),F.videoCodec&&F.videoCodec.indexOf("avc1")!==-1&&(F.videoCodec=T.convertAVC1ToAVCOTI(F.videoCodec)),l.push(F)}else if(g[3]){var B=new I.AttrList(g[3]);B["DATA-ID"]&&(_=!0,u[B["DATA-ID"]]=B)}return{levels:l,sessionData:_?u:null}},T.parseMasterPlaylistMedia=function(h,c,l,u){u===void 0&&(u=[]);var _,g=[],m=0;for(s.lastIndex=0;(_=s.exec(h))!==null;){var F=new I.AttrList(_[1]);if(F.TYPE===l){var H={attrs:F,bitrate:0,id:m++,groupId:F["GROUP-ID"],instreamId:F["INSTREAM-ID"],name:F.NAME||F.LANGUAGE||"",type:l,default:F.bool("DEFAULT"),autoselect:F.bool("AUTOSELECT"),forced:F.bool("FORCED"),lang:F.LANGUAGE,url:F.URI?T.resolve(F.URI,c):""};if(u.length){var B=T.findGroup(u,H.groupId)||u[0];y(H,B,"audioCodec"),y(H,B,"textCodec")}g.push(H)}}return g},T.parseLevelPlaylist=function(h,c,l,u,_){var g=new k.LevelDetails(c),m=g.fragments,F=null,H=0,B=0,Q=0,z=0,N=null,ee=new q.Fragment(u,c),le,Be,Ce,Me=-1,Le=!1;for(i.lastIndex=0,g.m3u8=h;(le=i.exec(h))!==null;){Le&&(Le=!1,ee=new q.Fragment(u,c),ee.start=Q,ee.sn=H,ee.cc=z,ee.level=l,F&&(ee.initSegment=F,ee.rawProgramDateTime=F.rawProgramDateTime));var je=le[1];if(je){ee.duration=parseFloat(je);var He=(" "+le[2]).slice(1);ee.title=He||null,ee.tagList.push(He?["INF",je,He]:["INF",je])}else if(le[3])Object(V.isFiniteNumber)(ee.duration)&&(ee.start=Q,Ce&&(ee.levelkey=Ce),ee.sn=H,ee.level=l,ee.cc=z,ee.urlId=_,m.push(ee),ee.relurl=(" "+le[3]).slice(1),E(ee,N),N=ee,Q+=ee.duration,H++,B=0,Le=!0);else if(le[4]){var Je=(" "+le[4]).slice(1);N?ee.setByteRange(Je,N):ee.setByteRange(Je)}else if(le[5])ee.rawProgramDateTime=(" "+le[5]).slice(1),ee.tagList.push(["PROGRAM-DATE-TIME",ee.rawProgramDateTime]),Me===-1&&(Me=m.length);else{if(le=le[0].match(o),!le){d.logger.warn("No matches on slow regex match for level playlist!");continue}for(Be=1;Be<le.length&&!(typeof le[Be]!="undefined");Be++);var Se=(" "+le[Be]).slice(1),$=(" "+le[Be+1]).slice(1),D=le[Be+2]?(" "+le[Be+2]).slice(1):"";switch(Se){case"PLAYLIST-TYPE":g.type=$.toUpperCase();break;case"MEDIA-SEQUENCE":H=g.startSN=parseInt($);break;case"SKIP":{var M=new I.AttrList($),te=M.decimalInteger("SKIPPED-SEGMENTS");if(Object(V.isFiniteNumber)(te)){g.skippedSegments=te;for(var oe=te;oe--;)m.unshift(null);H+=te}var G=M.enumeratedString("RECENTLY-REMOVED-DATERANGES");G&&(g.recentlyRemovedDateranges=G.split(" "));break}case"TARGETDURATION":g.targetduration=parseFloat($);break;case"VERSION":g.version=parseInt($);break;case"EXTM3U":break;case"ENDLIST":g.live=!1;break;case"#":($||D)&&ee.tagList.push(D?[$,D]:[$]);break;case"DIS":z++;case"GAP":ee.tagList.push([Se]);break;case"BITRATE":ee.tagList.push([Se,$]);break;case"DISCONTINUITY-SEQ":z=parseInt($);break;case"KEY":{var re,j=new I.AttrList($),J=j.enumeratedString("METHOD"),Y=j.URI,he=j.hexadecimalInteger("IV"),we=j.enumeratedString("KEYFORMATVERSIONS"),Te=j.enumeratedString("KEYID"),Xe=(re=j.enumeratedString("KEYFORMAT"))!=null?re:"identity",Ze=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(Ze.indexOf(Xe)>-1){d.logger.warn("Keyformat "+Xe+" is not supported from the manifest");continue}else if(Xe!=="identity")continue;J&&(Ce=e.LevelKey.fromURL(c,Y),Y&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(J)>=0&&(Ce.method=J,Ce.keyFormat=Xe,Te&&(Ce.keyID=Te),we&&(Ce.keyFormatVersions=we),Ce.iv=he));break}case"START":{var et=new I.AttrList($),rt=et.decimalFloatingPoint("TIME-OFFSET");Object(V.isFiniteNumber)(rt)&&(g.startTimeOffset=rt);break}case"MAP":{var At=new I.AttrList($);ee.relurl=At.URI,At.BYTERANGE&&ee.setByteRange(At.BYTERANGE),ee.level=l,ee.sn="initSegment",Ce&&(ee.levelkey=Ce),ee.initSegment=null,F=ee,Le=!0;break}case"SERVER-CONTROL":{var pt=new I.AttrList($);g.canBlockReload=pt.bool("CAN-BLOCK-RELOAD"),g.canSkipUntil=pt.optionalFloat("CAN-SKIP-UNTIL",0),g.canSkipDateRanges=g.canSkipUntil>0&&pt.bool("CAN-SKIP-DATERANGES"),g.partHoldBack=pt.optionalFloat("PART-HOLD-BACK",0),g.holdBack=pt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Pe=new I.AttrList($);g.partTarget=Pe.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Ye=g.partList;Ye||(Ye=g.partList=[]);var tt=B>0?Ye[Ye.length-1]:void 0,ot=B++,pe=new q.Part(new I.AttrList($),ee,c,ot,tt);Ye.push(pe),ee.duration+=pe.duration;break}case"PRELOAD-HINT":{var ne=new I.AttrList($);g.preloadHint=ne;break}case"RENDITION-REPORT":{var ie=new I.AttrList($);g.renditionReports=g.renditionReports||[],g.renditionReports.push(ie);break}default:d.logger.warn("line parsed but not handled: "+le);break}}}N&&!N.relurl?(m.pop(),Q-=N.duration,g.partList&&(g.fragmentHint=N)):g.partList&&(E(ee,N),ee.cc=z,g.fragmentHint=ee);var de=m.length,ge=m[0],se=m[de-1];if(Q+=g.skippedSegments*g.targetduration,Q>0&&de&&se){g.averagetargetduration=Q/de;var Ae=se.sn;g.endSN=Ae!=="initSegment"?Ae:0,ge&&(g.startCC=ge.cc,ge.initSegment||g.fragments.every(function(Ee){return Ee.relurl&&a(Ee.relurl)})&&(d.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),ee=new q.Fragment(u,c),ee.relurl=se.relurl,ee.level=l,ee.sn="initSegment",ge.initSegment=ee,g.needSidxRanges=!0))}else g.endSN=0,g.startCC=0;return g.fragmentHint&&(Q+=g.fragmentHint.duration),g.totalduration=Q,g.endCC=z,Me>0&&b(m,Me),g},T}();function t(T,C){["video","audio","text"].forEach(function(h){var c=T.filter(function(u){return Object(p.isCodecType)(u,h)});if(c.length){var l=c.filter(function(u){return u.lastIndexOf("avc1",0)===0||u.lastIndexOf("mp4a",0)===0});C[h+"Codec"]=l.length>0?l[0]:c[0],T=T.filter(function(u){return c.indexOf(u)===-1})}}),C.unknownCodecs=T}function y(T,C,h){var c=C[h];c&&(T[h]=c)}function b(T,C){for(var h=T[C],c=C;c--;){var l=T[c];if(!l)return;l.programDateTime=h.programDateTime-l.duration*1e3,h=l}}function E(T,C){T.rawProgramDateTime?T.programDateTime=Date.parse(T.rawProgramDateTime):C!=null&&C.programDateTime&&(T.programDateTime=C.endProgramDateTime),Object(V.isFiniteNumber)(T.programDateTime)||(T.programDateTime=null,T.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/polyfills/number.ts"),U=L("./src/events.ts"),O=L("./src/errors.ts"),q=L("./src/utils/logger.ts"),k=L("./src/utils/mp4-tools.ts"),e=L("./src/loader/m3u8-parser.ts"),I=L("./src/types/loader.ts"),d=L("./src/utils/attr-list.ts");function p(i){var o=i.type;switch(o){case I.PlaylistContextType.AUDIO_TRACK:return I.PlaylistLevelType.AUDIO;case I.PlaylistContextType.SUBTITLE_TRACK:return I.PlaylistLevelType.SUBTITLE;default:return I.PlaylistLevelType.MAIN}}function A(i,o){var n=i.url;return(n===void 0||n.indexOf("data:")===0)&&(n=o.url),n}var s=function(){function i(n){this.hls=void 0,this.loaders=Object.create(null),this.hls=n,this.registerListeners()}var o=i.prototype;return o.registerListeners=function(){var a=this.hls;a.on(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(U.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(U.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.on(U.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},o.unregisterListeners=function(){var a=this.hls;a.off(U.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(U.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(U.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.off(U.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},o.createInternalLoader=function(a){var r=this.hls.config,t=r.pLoader,y=r.loader,b=t||y,E=new b(r);return a.loader=E,this.loaders[a.type]=E,E},o.getInternalLoader=function(a){return this.loaders[a.type]},o.resetInternalLoader=function(a){this.loaders[a]&&delete this.loaders[a]},o.destroyInternalLoaders=function(){for(var a in this.loaders){var r=this.loaders[a];r&&r.destroy(),this.resetInternalLoader(a)}},o.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},o.onManifestLoading=function(a,r){var t=r.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:I.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},o.onLevelLoading=function(a,r){var t=r.id,y=r.level,b=r.url,E=r.deliveryDirectives;this.load({id:t,groupId:null,level:y,responseType:"text",type:I.PlaylistContextType.LEVEL,url:b,deliveryDirectives:E})},o.onAudioTrackLoading=function(a,r){var t=r.id,y=r.groupId,b=r.url,E=r.deliveryDirectives;this.load({id:t,groupId:y,level:null,responseType:"text",type:I.PlaylistContextType.AUDIO_TRACK,url:b,deliveryDirectives:E})},o.onSubtitleTrackLoading=function(a,r){var t=r.id,y=r.groupId,b=r.url,E=r.deliveryDirectives;this.load({id:t,groupId:y,level:null,responseType:"text",type:I.PlaylistContextType.SUBTITLE_TRACK,url:b,deliveryDirectives:E})},o.load=function(a){var r,t=this.hls.config,y=this.getInternalLoader(a);if(y){var b=y.context;if(b&&b.url===a.url){q.logger.trace("[playlist-loader]: playlist request ongoing");return}q.logger.log("[playlist-loader]: aborting previous loader for type: "+a.type),y.abort()}var E,T,C,h;switch(a.type){case I.PlaylistContextType.MANIFEST:E=t.manifestLoadingMaxRetry,T=t.manifestLoadingTimeOut,C=t.manifestLoadingRetryDelay,h=t.manifestLoadingMaxRetryTimeout;break;case I.PlaylistContextType.LEVEL:case I.PlaylistContextType.AUDIO_TRACK:case I.PlaylistContextType.SUBTITLE_TRACK:E=0,T=t.levelLoadingTimeOut;break;default:E=t.levelLoadingMaxRetry,T=t.levelLoadingTimeOut,C=t.levelLoadingRetryDelay,h=t.levelLoadingMaxRetryTimeout;break}if(y=this.createInternalLoader(a),(r=a.deliveryDirectives)!==null&&r!==void 0&&r.part){var c;if(a.type===I.PlaylistContextType.LEVEL&&a.level!==null?c=this.hls.levels[a.level].details:a.type===I.PlaylistContextType.AUDIO_TRACK&&a.id!==null?c=this.hls.audioTracks[a.id].details:a.type===I.PlaylistContextType.SUBTITLE_TRACK&&a.id!==null&&(c=this.hls.subtitleTracks[a.id].details),c){var l=c.partTarget,u=c.targetduration;l&&u&&(T=Math.min(Math.max(l*3,u*.8)*1e3,T))}}var _={timeout:T,maxRetry:E,retryDelay:C,maxRetryDelay:h,highWaterMark:0},g={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};y.load(a,_,g)},o.loadsuccess=function(a,r,t,y){if(y===void 0&&(y=null),t.isSidxRequest){this.handleSidxRequest(a,t),this.handlePlaylistLoaded(a,r,t,y);return}this.resetInternalLoader(t.type);var b=a.data;if(b.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(a,t,"no EXTM3U delimiter",y);return}r.parsing.start=performance.now(),b.indexOf("#EXTINF:")>0||b.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(a,r,t,y):this.handleMasterPlaylist(a,r,t,y)},o.loaderror=function(a,r,t){t===void 0&&(t=null),this.handleNetworkError(r,t,!1,a)},o.loadtimeout=function(a,r,t){t===void 0&&(t=null),this.handleNetworkError(r,t,!0)},o.handleMasterPlaylist=function(a,r,t,y){var b=this.hls,E=a.data,T=A(a,t),C=e.default.parseMasterPlaylist(E,T),h=C.levels,c=C.sessionData;if(!h.length){this.handleManifestParsingError(a,t,"no level found in manifest",y);return}var l=h.map(function(H){return{id:H.attrs.AUDIO,audioCodec:H.audioCodec}}),u=h.map(function(H){return{id:H.attrs.SUBTITLES,textCodec:H.textCodec}}),_=e.default.parseMasterPlaylistMedia(E,T,"AUDIO",l),g=e.default.parseMasterPlaylistMedia(E,T,"SUBTITLES",u),m=e.default.parseMasterPlaylistMedia(E,T,"CLOSED-CAPTIONS");if(_.length){var F=_.some(function(H){return!H.url});!F&&h[0].audioCodec&&!h[0].attrs.AUDIO&&(q.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),_.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new d.AttrList({}),bitrate:0,url:""}))}b.trigger(U.Events.MANIFEST_LOADED,{levels:h,audioTracks:_,subtitles:g,captions:m,url:T,stats:r,networkDetails:y,sessionData:c})},o.handleTrackOrLevelPlaylist=function(a,r,t,y){var b=this.hls,E=t.id,T=t.level,C=t.type,h=A(a,t),c=Object(V.isFiniteNumber)(E)?E:0,l=Object(V.isFiniteNumber)(T)?T:c,u=p(t),_=e.default.parseLevelPlaylist(a.data,h,l,u,c);if(!_.fragments.length){b.trigger(U.Events.ERROR,{type:O.ErrorTypes.NETWORK_ERROR,details:O.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:h,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(C===I.PlaylistContextType.MANIFEST){var g={attrs:new d.AttrList({}),bitrate:0,details:_,name:"",url:h};b.trigger(U.Events.MANIFEST_LOADED,{levels:[g],audioTracks:[],url:h,stats:r,networkDetails:y,sessionData:null})}if(r.parsing.end=performance.now(),_.needSidxRanges){var m,F=(m=_.fragments[0].initSegment)===null||m===void 0?void 0:m.url;this.load({url:F,isSidxRequest:!0,type:C,level:T,levelDetails:_,id:E,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=_,this.handlePlaylistLoaded(a,r,t,y)},o.handleSidxRequest=function(a,r){var t=Object(k.parseSegmentIndex)(new Uint8Array(a.data));if(!t)return;var y=t.references,b=r.levelDetails;y.forEach(function(E,T){var C=E.info,h=b.fragments[T];h.byteRange.length===0&&h.setByteRange(String(1+C.end-C.start)+"@"+String(C.start)),h.initSegment&&h.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},o.handleManifestParsingError=function(a,r,t,y){this.hls.trigger(U.Events.ERROR,{type:O.ErrorTypes.NETWORK_ERROR,details:O.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:r.type===I.PlaylistContextType.MANIFEST,url:a.url,reason:t,response:a,context:r,networkDetails:y})},o.handleNetworkError=function(a,r,t,y){t===void 0&&(t=!1),q.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+a.type+" level: "+a.level+" id: "+a.id+' group-id: "'+a.groupId+'"');var b=O.ErrorDetails.UNKNOWN,E=!1,T=this.getInternalLoader(a);switch(a.type){case I.PlaylistContextType.MANIFEST:b=t?O.ErrorDetails.MANIFEST_LOAD_TIMEOUT:O.ErrorDetails.MANIFEST_LOAD_ERROR,E=!0;break;case I.PlaylistContextType.LEVEL:b=t?O.ErrorDetails.LEVEL_LOAD_TIMEOUT:O.ErrorDetails.LEVEL_LOAD_ERROR,E=!1;break;case I.PlaylistContextType.AUDIO_TRACK:b=t?O.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:O.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,E=!1;break;case I.PlaylistContextType.SUBTITLE_TRACK:b=t?O.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:O.ErrorDetails.SUBTITLE_LOAD_ERROR,E=!1;break}T&&this.resetInternalLoader(a.type);var C={type:O.ErrorTypes.NETWORK_ERROR,details:b,fatal:E,url:a.url,loader:T,context:a,networkDetails:r};y&&(C.response=y),this.hls.trigger(U.Events.ERROR,C)},o.handlePlaylistLoaded=function(a,r,t,y){var b=t.type,E=t.level,T=t.id,C=t.groupId,h=t.loader,c=t.levelDetails,l=t.deliveryDirectives;if(!(c!=null&&c.targetduration)){this.handleManifestParsingError(a,t,"invalid target duration",y);return}if(!h)return;c.live&&(h.getCacheAge&&(c.ageHeader=h.getCacheAge()||0),(!h.getCacheAge||isNaN(c.ageHeader))&&(c.ageHeader=0));switch(b){case I.PlaylistContextType.MANIFEST:case I.PlaylistContextType.LEVEL:this.hls.trigger(U.Events.LEVEL_LOADED,{details:c,level:E||0,id:T||0,stats:r,networkDetails:y,deliveryDirectives:l});break;case I.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(U.Events.AUDIO_TRACK_LOADED,{details:c,id:T||0,groupId:C||"",stats:r,networkDetails:y,deliveryDirectives:l});break;case I.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(U.Events.SUBTITLE_TRACK_LOADED,{details:c,id:T||0,groupId:C||"",stats:r,networkDetails:y,deliveryDirectives:l});break}},i}();W.default=s},"./src/polyfills/number.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"isFiniteNumber",function(){return V}),L.d(W,"MAX_SAFE_INTEGER",function(){return U});var V=Number.isFinite||function(O){return typeof O=="number"&&isFinite(O)},U=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(fe,W,L){"use strict";L.r(W);var V=function(){function U(){}return U.getSilentFrame=function(q,k){switch(q){case"mp4a.40.2":if(k===1)return new Uint8Array([0,200,0,128,35,128]);if(k===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(k===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(k===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(k===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(k===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(k===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(k===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(k===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},U}();W.default=V},"./src/remux/mp4-generator.ts":function(fe,W,L){"use strict";L.r(W);var V=Math.pow(2,32)-1,U=function(){function O(){}return O.init=function(){O.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var k;for(k in O.types)O.types.hasOwnProperty(k)&&(O.types[k]=[k.charCodeAt(0),k.charCodeAt(1),k.charCodeAt(2),k.charCodeAt(3)]);var e=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),I=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);O.HDLR_TYPES={video:e,audio:I};var d=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),p=new Uint8Array([0,0,0,0,0,0,0,0]);O.STTS=O.STSC=O.STCO=p,O.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),O.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),O.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),O.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var A=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),i=new Uint8Array([0,0,0,1]);O.FTYP=O.box(O.types.ftyp,A,i,A,s),O.DINF=O.box(O.types.dinf,O.box(O.types.dref,d))},O.box=function(k){for(var e=8,I=arguments.length,d=new Array(I>1?I-1:0),p=1;p<I;p++)d[p-1]=arguments[p];for(var A=d.length,s=A;A--;)e+=d[A].byteLength;var i=new Uint8Array(e);for(i[0]=e>>24&255,i[1]=e>>16&255,i[2]=e>>8&255,i[3]=e&255,i.set(k,4),A=0,e=8;A<s;A++)i.set(d[A],e),e+=d[A].byteLength;return i},O.hdlr=function(k){return O.box(O.types.hdlr,O.HDLR_TYPES[k])},O.mdat=function(k){return O.box(O.types.mdat,k)},O.mdhd=function(k,e){e*=k;var I=Math.floor(e/(V+1)),d=Math.floor(e%(V+1));return O.box(O.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,k>>24&255,k>>16&255,k>>8&255,k&255,I>>24,I>>16&255,I>>8&255,I&255,d>>24,d>>16&255,d>>8&255,d&255,85,196,0,0]))},O.mdia=function(k){return O.box(O.types.mdia,O.mdhd(k.timescale,k.duration),O.hdlr(k.type),O.minf(k))},O.mfhd=function(k){return O.box(O.types.mfhd,new Uint8Array([0,0,0,0,k>>24,k>>16&255,k>>8&255,k&255]))},O.minf=function(k){return k.type==="audio"?O.box(O.types.minf,O.box(O.types.smhd,O.SMHD),O.DINF,O.stbl(k)):O.box(O.types.minf,O.box(O.types.vmhd,O.VMHD),O.DINF,O.stbl(k))},O.moof=function(k,e,I){return O.box(O.types.moof,O.mfhd(k),O.traf(I,e))},O.moov=function(k){for(var e=k.length,I=[];e--;)I[e]=O.trak(k[e]);return O.box.apply(null,[O.types.moov,O.mvhd(k[0].timescale,k[0].duration)].concat(I).concat(O.mvex(k)))},O.mvex=function(k){for(var e=k.length,I=[];e--;)I[e]=O.trex(k[e]);return O.box.apply(null,[O.types.mvex].concat(I))},O.mvhd=function(k,e){e*=k;var I=Math.floor(e/(V+1)),d=Math.floor(e%(V+1)),p=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,k>>24&255,k>>16&255,k>>8&255,k&255,I>>24,I>>16&255,I>>8&255,I&255,d>>24,d>>16&255,d>>8&255,d&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return O.box(O.types.mvhd,p)},O.sdtp=function(k){var e=k.samples||[],I=new Uint8Array(4+e.length),d,p;for(d=0;d<e.length;d++)p=e[d].flags,I[d+4]=p.dependsOn<<4|p.isDependedOn<<2|p.hasRedundancy;return O.box(O.types.sdtp,I)},O.stbl=function(k){return O.box(O.types.stbl,O.stsd(k),O.box(O.types.stts,O.STTS),O.box(O.types.stsc,O.STSC),O.box(O.types.stsz,O.STSZ),O.box(O.types.stco,O.STCO))},O.avc1=function(k){var e=[],I=[],d,p,A;for(d=0;d<k.sps.length;d++)p=k.sps[d],A=p.byteLength,e.push(A>>>8&255),e.push(A&255),e=e.concat(Array.prototype.slice.call(p));for(d=0;d<k.pps.length;d++)p=k.pps[d],A=p.byteLength,I.push(A>>>8&255),I.push(A&255),I=I.concat(Array.prototype.slice.call(p));var s=O.box(O.types.avcC,new Uint8Array([1,e[3],e[4],e[5],252|3,224|k.sps.length].concat(e).concat([k.pps.length]).concat(I))),i=k.width,o=k.height,n=k.pixelRatio[0],a=k.pixelRatio[1];return O.box(O.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>8&255,i&255,o>>8&255,o&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,O.box(O.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),O.box(O.types.pasp,new Uint8Array([n>>24,n>>16&255,n>>8&255,n&255,a>>24,a>>16&255,a>>8&255,a&255])))},O.esds=function(k){var e=k.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(k.config).concat([6,1,2]))},O.mp4a=function(k){var e=k.samplerate;return O.box(O.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,k.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]),O.box(O.types.esds,O.esds(k)))},O.mp3=function(k){var e=k.samplerate;return O.box(O.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,k.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]))},O.stsd=function(k){return k.type==="audio"?!k.isAAC&&k.codec==="mp3"?O.box(O.types.stsd,O.STSD,O.mp3(k)):O.box(O.types.stsd,O.STSD,O.mp4a(k)):O.box(O.types.stsd,O.STSD,O.avc1(k))},O.tkhd=function(k){var e=k.id,I=k.duration*k.timescale,d=k.width,p=k.height,A=Math.floor(I/(V+1)),s=Math.floor(I%(V+1));return O.box(O.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,0,0,0,0,A>>24,A>>16&255,A>>8&255,A&255,s>>24,s>>16&255,s>>8&255,s&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,d>>8&255,d&255,0,0,p>>8&255,p&255,0,0]))},O.traf=function(k,e){var I=O.sdtp(k),d=k.id,p=Math.floor(e/(V+1)),A=Math.floor(e%(V+1));return O.box(O.types.traf,O.box(O.types.tfhd,new Uint8Array([0,0,0,0,d>>24,d>>16&255,d>>8&255,d&255])),O.box(O.types.tfdt,new Uint8Array([1,0,0,0,p>>24,p>>16&255,p>>8&255,p&255,A>>24,A>>16&255,A>>8&255,A&255])),O.trun(k,I.length+16+20+8+16+8+8),I)},O.trak=function(k){return k.duration=k.duration||4294967295,O.box(O.types.trak,O.tkhd(k),O.mdia(k))},O.trex=function(k){var e=k.id;return O.box(O.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},O.trun=function(k,e){var I=k.samples||[],d=I.length,p=12+16*d,A=new Uint8Array(p),s,i,o,n,a,r;for(e+=8+p,A.set([0,0,15,1,d>>>24&255,d>>>16&255,d>>>8&255,d&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),s=0;s<d;s++)i=I[s],o=i.duration,n=i.size,a=i.flags,r=i.cts,A.set([o>>>24&255,o>>>16&255,o>>>8&255,o&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,a.degradPrio&240<<8,a.degradPrio&15,r>>>24&255,r>>>16&255,r>>>8&255,r&255],12+16*s);return O.box(O.types.trun,A)},O.initSegment=function(k){O.types||O.init();var e=O.moov(k),I=new Uint8Array(O.FTYP.byteLength+e.byteLength);return I.set(O.FTYP),I.set(e,O.FTYP.byteLength),I},O}();U.types=void 0,U.HDLR_TYPES=void 0,U.STTS=void 0,U.STSC=void 0,U.STCO=void 0,U.STSZ=void 0,U.VMHD=void 0,U.SMHD=void 0,U.STSD=void 0,U.FTYP=void 0,U.DINF=void 0,W.default=U},"./src/remux/mp4-remuxer.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return r}),L.d(W,"normalizePts",function(){return t});var V=L("./src/polyfills/number.ts"),U=L("./src/remux/aac-helper.ts"),O=L("./src/remux/mp4-generator.ts"),q=L("./src/events.ts"),k=L("./src/errors.ts"),e=L("./src/utils/logger.ts"),I=L("./src/types/loader.ts"),d=L("./src/utils/timescale-conversion.ts");function p(){return p=Object.assign||function(T){for(var C=1;C<arguments.length;C++){var h=arguments[C];for(var c in h)Object.prototype.hasOwnProperty.call(h,c)&&(T[c]=h[c])}return T},p.apply(this,arguments)}var A=10*1e3,s=1024,i=1152,o=null,n=null,a=!1,r=function(){function T(h,c,l,u){if(u===void 0&&(u=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=h,this.config=c,this.typeSupported=l,this.ISGenerated=!1,o===null){var _=navigator.userAgent||"",g=_.match(/Chrome\/(\d+)/i);o=g?parseInt(g[1]):0}if(n===null){var m=navigator.userAgent.match(/Safari\/(\d+)/i);n=m?parseInt(m[1]):0}a=!!o&&o<75||!!n&&n<600}var C=T.prototype;return C.destroy=function(){},C.resetTimeStamp=function(c){e.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=c},C.resetNextTimestamp=function(){e.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},C.resetInitSegment=function(){e.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},C.getVideoStartPts=function(c){var l=!1,u=c.reduce(function(_,g){var m=g.pts-_;return m<-4294967296?(l=!0,t(_,g.pts)):m>0?_:g.pts},c[0].pts);return l&&e.logger.debug("PTS rollover detected"),u},C.remux=function(c,l,u,_,g,m,F,H){var B,Q,z,N,ee,le,Be=g,Ce=g,Me=c.pid>-1,Le=l.pid>-1,je=l.samples.length,He=c.samples.length>0,Je=je>1,Se=(!Me||He)&&(!Le||Je)||this.ISGenerated||F;if(Se){this.ISGenerated||(z=this.generateIS(c,l,g));var $=this.isVideoContiguous,D=-1;if(Je&&(D=y(l.samples),!$&&this.config.forceKeyFrameOnDiscontinuity))if(le=!0,D>0){e.logger.warn("[mp4-remuxer]: Dropped "+D+" out of "+je+" video samples due to a missing keyframe");var M=this.getVideoStartPts(l.samples);l.samples=l.samples.slice(D),l.dropped+=D,Ce+=(l.samples[0].pts-M)/(l.timescale||9e4)}else D===-1&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+je+" video samples"),le=!1);if(this.ISGenerated){if(He&&Je){var te=this.getVideoStartPts(l.samples),oe=t(c.samples[0].pts,te)-te,G=oe/l.inputTimeScale;Be+=Math.max(0,G),Ce+=Math.max(0,-G)}if(He){if(c.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),z=this.generateIS(c,l,g)),Q=this.remuxAudio(c,Be,this.isAudioContiguous,m,Le||Je||H===I.PlaylistLevelType.AUDIO?Ce:void 0),Je){var re=Q?Q.endPTS-Q.startPTS:0;l.inputTimeScale||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),z=this.generateIS(c,l,g)),B=this.remuxVideo(l,Ce,$,re)}}else Je&&(B=this.remuxVideo(l,Ce,$,0));B&&(B.firstKeyFrame=D,B.independent=D!==-1)}}return this.ISGenerated&&(u.samples.length&&(ee=this.remuxID3(u,g)),_.samples.length&&(N=this.remuxText(_,g))),{audio:Q,video:B,initSegment:z,independent:le,text:N,id3:ee}},C.generateIS=function(c,l,u){var _=c.samples,g=l.samples,m=this.typeSupported,F={},H=!Object(V.isFiniteNumber)(this._initPTS),B="audio/mp4",Q,z,N;if(H&&(Q=z=Infinity),c.config&&_.length&&(c.timescale=c.samplerate,c.isAAC||(m.mpeg?(B="audio/mpeg",c.codec=""):m.mp3&&(c.codec="mp3")),F.audio={id:"audio",container:B,codec:c.codec,initSegment:!c.isAAC&&m.mpeg?new Uint8Array(0):O.default.initSegment([c]),metadata:{channelCount:c.channelCount}},H&&(N=c.inputTimeScale,Q=z=_[0].pts-Math.round(N*u))),l.sps&&l.pps&&g.length&&(l.timescale=l.inputTimeScale,F.video={id:"main",container:"video/mp4",codec:l.codec,initSegment:O.default.initSegment([l]),metadata:{width:l.width,height:l.height}},H)){N=l.inputTimeScale;var ee=this.getVideoStartPts(g),le=Math.round(N*u);z=Math.min(z,t(g[0].dts,ee)-le),Q=Math.min(Q,ee-le)}if(Object.keys(F).length)return this.ISGenerated=!0,H&&(this._initPTS=Q,this._initDTS=z),{tracks:F,initPTS:Q,timescale:N}},C.remuxVideo=function(c,l,u,_){var g=c.inputTimeScale,m=c.samples,F=[],H=m.length,B=this._initPTS,Q=this.nextAvcDts,z=8,N,ee,le,Be=Number.POSITIVE_INFINITY,Ce=Number.NEGATIVE_INFINITY,Me=0,Le=!1;if(!u||Q===null){var je=l*g,He=m[0].pts-t(m[0].dts,m[0].pts);Q=je-He}for(var Je=0;Je<H;Je++){var Se=m[Je];if(Se.pts=t(Se.pts-B,Q),Se.dts=t(Se.dts-B,Q),Se.dts>Se.pts){var $=9e4*.2;Me=Math.max(Math.min(Me,Se.pts-Se.dts),-1*$)}Se.dts<m[Je>0?Je-1:Je].dts&&(Le=!0)}Le&&m.sort(function($t,xt){var ut=$t.dts-xt.dts,Ot=$t.pts-xt.pts;return ut||Ot}),ee=m[0].dts,le=m[m.length-1].dts;var D=Math.round((le-ee)/(H-1));if(Me<0){if(Me<D*-2){e.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(d.toMsFromMpegTsClock)(-D,!0)+" ms");for(var M=Me,te=0;te<H;te++)m[te].dts=M=Math.max(M,m[te].pts-D),m[te].pts=Math.max(M,m[te].pts)}else{e.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(d.toMsFromMpegTsClock)(Me,!0)+" ms to overcome this issue");for(var oe=0;oe<H;oe++)m[oe].dts=m[oe].dts+Me}ee=m[0].dts}if(u){var G=ee-Q,re=G>D,j=G<-1;if(re||j){re?e.logger.warn("AVC: "+Object(d.toMsFromMpegTsClock)(G,!0)+" ms ("+G+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(d.toMsFromMpegTsClock)(-G,!0)+" ms ("+G+"dts) overlapping between fragments detected"),ee=Q;var J=m[0].pts-G;m[0].dts=ee,m[0].pts=J,e.logger.log("Video: First PTS/DTS adjusted: "+Object(d.toMsFromMpegTsClock)(J,!0)+"/"+Object(d.toMsFromMpegTsClock)(ee,!0)+", delta: "+Object(d.toMsFromMpegTsClock)(G,!0)+" ms")}}a&&(ee=Math.max(0,ee));for(var Y=0,he=0,we=0;we<H;we++){for(var Te=m[we],Xe=Te.units,Ze=Xe.length,et=0,rt=0;rt<Ze;rt++)et+=Xe[rt].data.length;he+=et,Y+=Ze,Te.length=et,Te.dts=Math.max(Te.dts,ee),Te.pts=Math.max(Te.pts,Te.dts,0),Be=Math.min(Te.pts,Be),Ce=Math.max(Te.pts,Ce)}le=m[H-1].dts;var At=he+4*Y+8,pt;try{pt=new Uint8Array(At)}catch($t){this.observer.emit(q.Events.ERROR,q.Events.ERROR,{type:k.ErrorTypes.MUX_ERROR,details:k.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:At,reason:"fail allocating video mdat "+At});return}var Pe=new DataView(pt.buffer);Pe.setUint32(0,At),pt.set(O.default.types.mdat,4);for(var Ye=0;Ye<H;Ye++){for(var tt=m[Ye],ot=tt.units,pe=0,ne=0,ie=ot.length;ne<ie;ne++){var de=ot[ne],ge=de.data,se=de.data.byteLength;Pe.setUint32(z,se),z+=4,pt.set(ge,z),z+=se,pe+=4+se}if(Ye<H-1)N=m[Ye+1].dts-tt.dts;else{var Ae=this.config,Ee=tt.dts-m[Ye>0?Ye-1:Ye].dts;if(Ae.stretchShortVideoTrack&&this.nextAudioPts!==null){var xe=Math.floor(Ae.maxBufferHole*g),ke=(_?Be+_*g:this.nextAudioPts)-tt.pts;ke>xe?(N=ke-Ee,N<0&&(N=Ee),e.logger.log("[mp4-remuxer]: It is approximately "+ke/90+" ms to the next segment; using duration "+N/90+" ms for the last video frame.")):N=Ee}else N=Ee}var Qe=Math.round(tt.pts-tt.dts);F.push(new b(tt.key,N,pe,Qe))}if(F.length&&o&&o<70){var nt=F[0].flags;nt.dependsOn=2,nt.isNonSync=0}console.assert(N!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=Q=le+N,this.isVideoContiguous=!0;var dt=O.default.moof(c.sequenceNumber++,ee,p({},c,{samples:F})),wt="video",gt={data1:dt,data2:pt,startPTS:Be/g,endPTS:(Ce+N)/g,startDTS:ee/g,endDTS:Q/g,type:wt,hasAudio:!1,hasVideo:!0,nb:F.length,dropped:c.dropped};return c.samples=[],c.dropped=0,console.assert(pt.length,"MDAT length must not be zero"),gt},C.remuxAudio=function(c,l,u,_,g){var m=c.inputTimeScale,F=c.samplerate?c.samplerate:m,H=m/F,B=c.isAAC?s:i,Q=B*H,z=this._initPTS,N=!c.isAAC&&this.typeSupported.mpeg,ee=[],le=c.samples,Be=N?0:8,Ce=this.nextAudioPts||-1,Me=l*m;if(this.isAudioContiguous=u=u||le.length&&Ce>0&&(_&&Math.abs(Me-Ce)<9e3||Math.abs(t(le[0].pts-z,Me)-Ce)<20*Q),le.forEach(function(ge){ge.pts=t(ge.pts-z,Me)}),!u||Ce<0){if(le=le.filter(function(ge){return ge.pts>=0}),!le.length)return;g===0?Ce=0:_?Ce=Math.max(0,Me):Ce=le[0].pts}if(c.isAAC)for(var Le=g!==void 0,je=this.config.maxAudioFramesDrift,He=0,Je=Ce;He<le.length;He++){var Se=le[He],$=Se.pts,D=$-Je,M=Math.abs(1e3*D/m);if(D<=-je*Q&&Le)He===0&&(e.logger.warn("Audio frame @ "+($/m).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*D/m)+" ms."),this.nextAudioPts=Ce=Je=$);else if(D>=je*Q&&M<A&&Le){var te=Math.round(D/Q);Je=$-te*Q,Je<0&&(te--,Je+=Q),He===0&&(this.nextAudioPts=Ce=Je),e.logger.warn("[mp4-remuxer]: Injecting "+te+" audio frame @ "+(Je/m).toFixed(3)+"s due to "+Math.round(1e3*D/m)+" ms gap.");for(var oe=0;oe<te;oe++){var G=Math.max(Je,0),re=U.default.getSilentFrame(c.manifestCodec||c.codec,c.channelCount);re||(e.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),re=Se.unit.subarray()),le.splice(He,0,{unit:re,pts:G}),Je+=Q,He++}}Se.pts=Je,Je+=Q}for(var j=null,J=null,Y,he=0,we=le.length;we--;)he+=le[we].unit.byteLength;for(var Te=0,Xe=le.length;Te<Xe;Te++){var Ze=le[Te],et=Ze.unit,rt=Ze.pts;if(J!==null){var At=ee[Te-1];At.duration=Math.round((rt-J)/H)}else if(u&&c.isAAC&&(rt=Ce),j=rt,he>0){he+=Be;try{Y=new Uint8Array(he)}catch(ge){this.observer.emit(q.Events.ERROR,q.Events.ERROR,{type:k.ErrorTypes.MUX_ERROR,details:k.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:he,reason:"fail allocating audio mdat "+he});return}if(!N){var pt=new DataView(Y.buffer);pt.setUint32(0,he),Y.set(O.default.types.mdat,4)}}else return;Y.set(et,Be);var Pe=et.byteLength;Be+=Pe,ee.push(new b(!0,B,Pe,0)),J=rt}var Ye=ee.length;if(!Ye)return;var tt=ee[ee.length-1];this.nextAudioPts=Ce=J+H*tt.duration;var ot=N?new Uint8Array(0):O.default.moof(c.sequenceNumber++,j/H,p({},c,{samples:ee}));c.samples=[];var pe=j/m,ne=Ce/m,ie="audio",de={data1:ot,data2:Y,startPTS:pe,endPTS:ne,startDTS:pe,endDTS:ne,type:ie,hasAudio:!0,hasVideo:!1,nb:Ye};return this.isAudioContiguous=!0,console.assert(Y.length,"MDAT length must not be zero"),de},C.remuxEmptyAudio=function(c,l,u,_){var g=c.inputTimeScale,m=c.samplerate?c.samplerate:g,F=g/m,H=this.nextAudioPts,B=(H!==null?H:_.startDTS*g)+this._initDTS,Q=_.endDTS*g+this._initDTS,z=F*s,N=Math.ceil((Q-B)/z),ee=U.default.getSilentFrame(c.manifestCodec||c.codec,c.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!ee){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var le=[],Be=0;Be<N;Be++){var Ce=B+Be*z;le.push({unit:ee,pts:Ce,dts:Ce})}return c.samples=le,this.remuxAudio(c,l,u,!1)},C.remuxID3=function(c,l){var u=c.samples.length;if(!u)return;for(var _=c.inputTimeScale,g=this._initPTS,m=this._initDTS,F=0;F<u;F++){var H=c.samples[F];H.pts=t(H.pts-g,l*_)/_,H.dts=t(H.dts-m,l*_)/_}var B=c.samples;return c.samples=[],{samples:B}},C.remuxText=function(c,l){var u=c.samples.length;if(!u)return;for(var _=c.inputTimeScale,g=this._initPTS,m=0;m<u;m++){var F=c.samples[m];F.pts=t(F.pts-g,l*_)/_}c.samples.sort(function(B,Q){return B.pts-Q.pts});var H=c.samples;return c.samples=[],{samples:H}},T}();function t(T,C){var h;if(C===null)return T;for(C<T?h=-8589934592:h=8589934592;Math.abs(T-C)>4294967296;)T+=h;return T}function y(T){for(var C=0;C<T.length;C++)if(T[C].key)return C;return-1}var b=function(C,h,c,l){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=h,this.size=c,this.cts=l,this.flags=new E(C)},E=function(C){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=C?2:1,this.isNonSync=C?0:1}},"./src/remux/passthrough-remuxer.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/polyfills/number.ts"),U=L("./src/utils/mp4-tools.ts"),O=L("./src/loader/fragment.ts"),q=L("./src/utils/logger.ts"),k=function(){function d(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var p=d.prototype;return p.destroy=function(){},p.resetTimeStamp=function(s){this.initPTS=s,this.lastEndDTS=null},p.resetNextTimestamp=function(){this.lastEndDTS=null},p.resetInitSegment=function(s,i,o){this.audioCodec=i,this.videoCodec=o,this.generateInitSegment(s),this.emitInitSegment=!0},p.generateInitSegment=function(s){var i=this.audioCodec,o=this.videoCodec;if(!s||!s.byteLength){this.initTracks=void 0,this.initData=void 0;return}var n=this.initData=Object(U.parseInitSegment)(s);i||(i=I(n.audio,O.ElementaryStreamTypes.AUDIO)),o||(o=I(n.video,O.ElementaryStreamTypes.VIDEO));var a={};n.audio&&n.video?a.audiovideo={container:"video/mp4",codec:i+","+o,initSegment:s,id:"main"}:n.audio?a.audio={container:"audio/mp4",codec:i,initSegment:s,id:"audio"}:n.video?a.video={container:"video/mp4",codec:o,initSegment:s,id:"main"}:q.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a},p.remux=function(s,i,o,n,a){var r=this.initPTS,t=this.lastEndDTS,y={audio:void 0,video:void 0,text:n,id3:o,initSegment:void 0};Object(V.isFiniteNumber)(t)||(t=this.lastEndDTS=a||0);var b=i.samples;if(!b||!b.length)return y;var E={initPTS:void 0,timescale:1},T=this.initData;if((!T||!T.length)&&(this.generateInitSegment(b),T=this.initData),!T||!T.length)return q.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),y;this.emitInitSegment&&(E.tracks=this.initTracks,this.emitInitSegment=!1),Object(V.isFiniteNumber)(r)||(this.initPTS=E.initPTS=r=e(T,b,t));var C=Object(U.getDuration)(b,T),h=t,c=C+h;Object(U.offsetStartDTS)(T,b,r),C>0?this.lastEndDTS=c:(q.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var l=!!T.audio,u=!!T.video,_="";l&&(_+="audio"),u&&(_+="video");var g={data1:b,startPTS:h,startDTS:h,endPTS:c,endDTS:c,type:_,hasAudio:l,hasVideo:u,nb:1,dropped:0};return y.audio=g.type==="audio"?g:void 0,y.video=g.type!=="audio"?g:void 0,y.text=n,y.id3=o,y.initSegment=E,y},d}(),e=function(p,A,s){return Object(U.getStartDTS)(p,A)-s};function I(d,p){var A=d==null?void 0:d.codec;return A&&A.length>4?A:A==="hvc1"?"hvc1.1.c.L120.90":A==="av01"?"av01.0.04M.08":A==="avc1"||p===O.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}W.default=k},"./src/task-loop.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return V});var V=function(){function U(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var O=U.prototype;return O.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},O.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},O.onHandlerDestroyed=function(){},O.hasInterval=function(){return!!this._tickInterval},O.hasNextTick=function(){return!!this._tickTimer},O.setInterval=function(k){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,k),!0)},O.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},O.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},O.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},O.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},O.doTick=function(){},U}()},"./src/types/cmcd.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"CMCDVersion",function(){return V}),L.d(W,"CMCDObjectType",function(){return U}),L.d(W,"CMCDStreamingFormat",function(){return O}),L.d(W,"CMCDStreamType",function(){return q});var V=1,U;(function(k){k.MANIFEST="m",k.AUDIO="a",k.VIDEO="v",k.MUXED="av",k.INIT="i",k.CAPTION="c",k.TIMED_TEXT="tt",k.KEY="k",k.OTHER="o"})(U||(U={}));var O;(function(k){k.DASH="d",k.HLS="h",k.SMOOTH="s",k.OTHER="o"})(O||(O={}));var q;(function(k){k.VOD="v",k.LIVE="l"})(q||(q={}))},"./src/types/level.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"HlsSkip",function(){return O}),L.d(W,"getSkipValue",function(){return q}),L.d(W,"HlsUrlParameters",function(){return k}),L.d(W,"Level",function(){return e});function V(I,d){for(var p=0;p<d.length;p++){var A=d[p];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(I,A.key,A)}}function U(I,d,p){return d&&V(I.prototype,d),p&&V(I,p),I}var O;(function(I){I.No="",I.Yes="YES",I.v2="v2"})(O||(O={}));function q(I,d){var p=I.canSkipUntil,A=I.canSkipDateRanges,s=I.endSN,i=d!==void 0?d-s:0;return p&&i<p?A?O.v2:O.Yes:O.No}var k=function(){function I(p,A,s){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=p,this.part=A,this.skip=s}var d=I.prototype;return d.addDirectives=function(A){var s=new self.URL(A);return this.msn!==void 0&&s.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&s.searchParams.set("_HLS_part",this.part.toString()),this.skip&&s.searchParams.set("_HLS_skip",this.skip),s.toString()},I}(),e=function(){function I(d){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[d.url],this.attrs=d.attrs,this.bitrate=d.bitrate,d.details&&(this.details=d.details),this.id=d.id||0,this.name=d.name,this.width=d.width||0,this.height=d.height||0,this.audioCodec=d.audioCodec,this.videoCodec=d.videoCodec,this.unknownCodecs=d.unknownCodecs,this.codecSet=[d.videoCodec,d.audioCodec].filter(function(p){return p}).join(",").replace(/\.[^.,]+/g,"")}return U(I,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(p){var A=p%this.url.length;this._urlId!==A&&(this.details=void 0,this._urlId=A)}}]),I}()},"./src/types/loader.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"PlaylistContextType",function(){return V}),L.d(W,"PlaylistLevelType",function(){return U});var V;(function(O){O.MANIFEST="manifest",O.LEVEL="level",O.AUDIO_TRACK="audioTrack",O.SUBTITLE_TRACK="subtitleTrack"})(V||(V={}));var U;(function(O){O.MAIN="main",O.AUDIO="audio",O.SUBTITLE="subtitle"})(U||(U={}))},"./src/types/transmuxer.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"ChunkMetadata",function(){return V});var V=function(q,k,e,I,d,p){I===void 0&&(I=0),d===void 0&&(d=-1),p===void 0&&(p=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=U(),this.buffering={audio:U(),video:U(),audiovideo:U()},this.level=q,this.sn=k,this.id=e,this.size=I,this.part=d,this.partial=p};function U(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"AttrList",function(){return O});var V=/^(\d+)x(\d+)$/,U=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,O=function(){function q(e){typeof e=="string"&&(e=q.parseAttrList(e));for(var I in e)e.hasOwnProperty(I)&&(this[I]=e[I])}var k=q.prototype;return k.decimalInteger=function(I){var d=parseInt(this[I],10);return d>Number.MAX_SAFE_INTEGER?Infinity:d},k.hexadecimalInteger=function(I){if(this[I]){var d=(this[I]||"0x").slice(2);d=(d.length&1?"0":"")+d;for(var p=new Uint8Array(d.length/2),A=0;A<d.length/2;A++)p[A]=parseInt(d.slice(A*2,A*2+2),16);return p}else return null},k.hexadecimalIntegerAsNumber=function(I){var d=parseInt(this[I],16);return d>Number.MAX_SAFE_INTEGER?Infinity:d},k.decimalFloatingPoint=function(I){return parseFloat(this[I])},k.optionalFloat=function(I,d){var p=this[I];return p?parseFloat(p):d},k.enumeratedString=function(I){return this[I]},k.bool=function(I){return this[I]==="YES"},k.decimalResolution=function(I){var d=V.exec(this[I]);return d===null?void 0:{width:parseInt(d[1],10),height:parseInt(d[2],10)}},q.parseAttrList=function(I){var d,p={},A='"';for(U.lastIndex=0;(d=U.exec(I))!==null;){var s=d[2];s.indexOf(A)===0&&s.lastIndexOf(A)===s.length-1&&(s=s.slice(1,-1)),p[d[1]]=s}return p},q}()},"./src/utils/binary-search.ts":function(fe,W,L){"use strict";L.r(W);var V={search:function(O,q){for(var k=0,e=O.length-1,I=null,d=null;k<=e;){I=(k+e)/2|0,d=O[I];var p=q(d);if(p>0)k=I+1;else if(p<0)e=I-1;else return d}return null}};W.default=V},"./src/utils/buffer-helper.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"BufferHelper",function(){return O});var V=L("./src/utils/logger.ts"),U={length:0,start:function(){return 0},end:function(){return 0}},O=function(){function q(){}return q.isBuffered=function(e,I){try{if(e){for(var d=q.getBuffered(e),p=0;p<d.length;p++)if(I>=d.start(p)&&I<=d.end(p))return!0}}catch(A){}return!1},q.bufferInfo=function(e,I,d){try{if(e){var p=q.getBuffered(e),A=[],s;for(s=0;s<p.length;s++)A.push({start:p.start(s),end:p.end(s)});return this.bufferedInfo(A,I,d)}}catch(i){}return{len:0,start:I,end:I,nextStart:void 0}},q.bufferedInfo=function(e,I,d){I=Math.max(0,I),e.sort(function(E,T){var C=E.start-T.start;return C||T.end-E.end});var p=[];if(d)for(var A=0;A<e.length;A++){var s=p.length;if(s){var i=p[s-1].end;e[A].start-i<d?e[A].end>i&&(p[s-1].end=e[A].end):p.push(e[A])}else p.push(e[A])}else p=e;for(var o=0,n,a=I,r=I,t=0;t<p.length;t++){var y=p[t].start,b=p[t].end;if(I+d>=y&&I<b)a=y,r=b,o=r-I;else if(I+d<y){n=y;break}}return{len:o,start:a||0,end:r||0,nextStart:n}},q.getBuffered=function(e){try{return e.buffered}catch(I){return V.logger.log("failed to get media.buffered",I),U}},q}()},"./src/utils/cea-608-parser.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"Row",function(){return r}),L.d(W,"CaptionScreen",function(){return t});var V=L("./src/utils/logger.ts"),U={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},O=function(c){var l=c;return U.hasOwnProperty(c)&&(l=U[c]),String.fromCharCode(l)},q=15,k=100,e={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},I={17:2,18:4,21:6,22:8,23:10,19:13,20:15},d={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},p={25:2,26:4,29:6,30:8,31:10,27:13,28:15},A=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],s;(function(h){h[h.ERROR=0]="ERROR",h[h.TEXT=1]="TEXT",h[h.WARNING=2]="WARNING",h[h.INFO=2]="INFO",h[h.DEBUG=3]="DEBUG",h[h.DATA=3]="DATA"})(s||(s={}));var i=function(){function h(){this.time=null,this.verboseLevel=s.ERROR}var c=h.prototype;return c.log=function(u,_){this.verboseLevel>=u&&V.logger.log(this.time+" ["+u+"] "+_)},h}(),o=function(c){for(var l=[],u=0;u<c.length;u++)l.push(c[u].toString(16));return l},n=function(){function h(l,u,_,g,m){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=l||"white",this.underline=u||!1,this.italics=_||!1,this.background=g||"black",this.flash=m||!1}var c=h.prototype;return c.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},c.setStyles=function(u){for(var _=["foreground","underline","italics","background","flash"],g=0;g<_.length;g++){var m=_[g];u.hasOwnProperty(m)&&(this[m]=u[m])}},c.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},c.equals=function(u){return this.foreground===u.foreground&&this.underline===u.underline&&this.italics===u.italics&&this.background===u.background&&this.flash===u.flash},c.copy=function(u){this.foreground=u.foreground,this.underline=u.underline,this.italics=u.italics,this.background=u.background,this.flash=u.flash},c.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},h}(),a=function(){function h(l,u,_,g,m,F){this.uchar=void 0,this.penState=void 0,this.uchar=l||" ",this.penState=new n(u,_,g,m,F)}var c=h.prototype;return c.reset=function(){this.uchar=" ",this.penState.reset()},c.setChar=function(u,_){this.uchar=u,this.penState.copy(_)},c.setPenState=function(u){this.penState.copy(u)},c.equals=function(u){return this.uchar===u.uchar&&this.penState.equals(u.penState)},c.copy=function(u){this.uchar=u.uchar,this.penState.copy(u.penState)},c.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},h}(),r=function(){function h(l){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var u=0;u<k;u++)this.chars.push(new a);this.logger=l,this.pos=0,this.currPenState=new n}var c=h.prototype;return c.equals=function(u){for(var _=!0,g=0;g<k;g++)if(!this.chars[g].equals(u.chars[g])){_=!1;break}return _},c.copy=function(u){for(var _=0;_<k;_++)this.chars[_].copy(u.chars[_])},c.isEmpty=function(){for(var u=!0,_=0;_<k;_++)if(!this.chars[_].isEmpty()){u=!1;break}return u},c.setCursor=function(u){this.pos!==u&&(this.pos=u),this.pos<0?(this.logger.log(s.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>k&&(this.logger.log(s.DEBUG,"Too large cursor position "+this.pos),this.pos=k)},c.moveCursor=function(u){var _=this.pos+u;if(u>1)for(var g=this.pos+1;g<_+1;g++)this.chars[g].setPenState(this.currPenState);this.setCursor(_)},c.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},c.insertChar=function(u){u>=144&&this.backSpace();var _=O(u);if(this.pos>=k){this.logger.log(s.ERROR,"Cannot insert "+u.toString(16)+" ("+_+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(_,this.currPenState),this.moveCursor(1)},c.clearFromPos=function(u){var _;for(_=u;_<k;_++)this.chars[_].reset()},c.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},c.clearToEndOfRow=function(){this.clearFromPos(this.pos)},c.getTextString=function(){for(var u=[],_=!0,g=0;g<k;g++){var m=this.chars[g].uchar;m!==" "&&(_=!1),u.push(m)}return _?"":u.join("")},c.setPenStyles=function(u){this.currPenState.setStyles(u);var _=this.chars[this.pos];_.setPenState(this.currPenState)},h}(),t=function(){function h(l){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var u=0;u<q;u++)this.rows.push(new r(l));this.logger=l,this.currRow=q-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var c=h.prototype;return c.reset=function(){for(var u=0;u<q;u++)this.rows[u].clear();this.currRow=q-1},c.equals=function(u){for(var _=!0,g=0;g<q;g++)if(!this.rows[g].equals(u.rows[g])){_=!1;break}return _},c.copy=function(u){for(var _=0;_<q;_++)this.rows[_].copy(u.rows[_])},c.isEmpty=function(){for(var u=!0,_=0;_<q;_++)if(!this.rows[_].isEmpty()){u=!1;break}return u},c.backSpace=function(){var u=this.rows[this.currRow];u.backSpace()},c.clearToEndOfRow=function(){var u=this.rows[this.currRow];u.clearToEndOfRow()},c.insertChar=function(u){var _=this.rows[this.currRow];_.insertChar(u)},c.setPen=function(u){var _=this.rows[this.currRow];_.setPenStyles(u)},c.moveCursor=function(u){var _=this.rows[this.currRow];_.moveCursor(u)},c.setCursor=function(u){this.logger.log(s.INFO,"setCursor: "+u);var _=this.rows[this.currRow];_.setCursor(u)},c.setPAC=function(u){this.logger.log(s.INFO,"pacData = "+JSON.stringify(u));var _=u.row-1;if(this.nrRollUpRows&&_<this.nrRollUpRows-1&&(_=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==_){for(var g=0;g<q;g++)this.rows[g].clear();var m=this.currRow+1-this.nrRollUpRows,F=this.lastOutputScreen;if(F){var H=F.rows[m].cueStartTime,B=this.logger.time;if(H&&B!==null&&H<B)for(var Q=0;Q<this.nrRollUpRows;Q++)this.rows[_-this.nrRollUpRows+Q+1].copy(F.rows[m+Q])}}this.currRow=_;var z=this.rows[this.currRow];if(u.indent!==null){var N=u.indent,ee=Math.max(N-1,0);z.setCursor(u.indent),u.color=z.chars[ee].penState.foreground}var le={foreground:u.color,underline:u.underline,italics:u.italics,background:"black",flash:!1};this.setPen(le)},c.setBkgData=function(u){this.logger.log(s.INFO,"bkgData = "+JSON.stringify(u)),this.backSpace(),this.setPen(u),this.insertChar(32)},c.setRollUpRows=function(u){this.nrRollUpRows=u},c.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(s.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(s.TEXT,this.getDisplayText());var u=this.currRow+1-this.nrRollUpRows,_=this.rows.splice(u,1)[0];_.clear(),this.rows.splice(this.currRow,0,_),this.logger.log(s.INFO,"Rolling up")},c.getDisplayText=function(u){u=u||!1;for(var _=[],g="",m=-1,F=0;F<q;F++){var H=this.rows[F].getTextString();H&&(m=F+1,u?_.push("Row "+m+": '"+H+"'"):_.push(H.trim()))}return _.length>0&&(u?g="["+_.join(" | ")+"]":g=_.join(`
|
|
`)),g},c.getTextAndFormat=function(){return this.rows},h}(),y=function(){function h(l,u,_){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=l,this.outputFilter=u,this.mode=null,this.verbose=0,this.displayedMemory=new t(_),this.nonDisplayedMemory=new t(_),this.lastOutputScreen=new t(_),this.currRollUpRow=this.displayedMemory.rows[q-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=_}var c=h.prototype;return c.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[q-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},c.getHandler=function(){return this.outputFilter},c.setHandler=function(u){this.outputFilter=u},c.setPAC=function(u){this.writeScreen.setPAC(u)},c.setBkgData=function(u){this.writeScreen.setBkgData(u)},c.setMode=function(u){if(u===this.mode)return;this.mode=u,this.logger.log(s.INFO,"MODE="+u),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=u},c.insertChars=function(u){for(var _=0;_<u.length;_++)this.writeScreen.insertChar(u[_]);var g=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(s.INFO,g+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(s.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},c.ccRCL=function(){this.logger.log(s.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},c.ccBS=function(){if(this.logger.log(s.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},c.ccAOF=function(){},c.ccAON=function(){},c.ccDER=function(){this.logger.log(s.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},c.ccRU=function(u){this.logger.log(s.INFO,"RU("+u+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(u)},c.ccFON=function(){this.logger.log(s.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},c.ccRDC=function(){this.logger.log(s.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},c.ccTR=function(){this.logger.log(s.INFO,"TR"),this.setMode("MODE_TEXT")},c.ccRTD=function(){this.logger.log(s.INFO,"RTD"),this.setMode("MODE_TEXT")},c.ccEDM=function(){this.logger.log(s.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},c.ccCR=function(){this.logger.log(s.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},c.ccENM=function(){this.logger.log(s.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},c.ccEOC=function(){if(this.logger.log(s.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var u=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=u,this.writeScreen=this.nonDisplayedMemory,this.logger.log(s.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},c.ccTO=function(u){this.logger.log(s.INFO,"TO("+u+") - Tab Offset"),this.writeScreen.moveCursor(u)},c.ccMIDROW=function(u){var _={flash:!1};if(_.underline=u%2===1,_.italics=u>=46,_.italics)_.foreground="white";else{var g=Math.floor(u/2)-16,m=["white","green","blue","cyan","red","yellow","magenta"];_.foreground=m[g]}this.logger.log(s.INFO,"MIDROW: "+JSON.stringify(_)),this.writeScreen.setPen(_)},c.outputDataUpdate=function(u){u===void 0&&(u=!1);var _=this.logger.time;if(_===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=_:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,_,this.lastOutputScreen),u&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:_),this.lastOutputScreen.copy(this.displayedMemory))},c.cueSplitAtTime=function(u){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,u,this.displayedMemory),this.cueStartTime=u))},h}(),b=function(){function h(l,u,_){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var g=new i;this.channels=[null,new y(l,u,g),new y(l+1,_,g)],this.cmdHistory=C(),this.logger=g}var c=h.prototype;return c.getHandler=function(u){return this.channels[u].getHandler()},c.setHandler=function(u,_){this.channels[u].setHandler(_)},c.addData=function(u,_){var g,m,F,H=!1;this.logger.time=u;for(var B=0;B<_.length;B+=2){if(m=_[B]&127,F=_[B+1]&127,m===0&&F===0)continue;if(this.logger.log(s.DATA,"["+o([_[B],_[B+1]])+"] -> ("+o([m,F])+")"),g=this.parseCmd(m,F),g||(g=this.parseMidrow(m,F)),g||(g=this.parsePAC(m,F)),g||(g=this.parseBackgroundAttributes(m,F)),!g&&(H=this.parseChars(m,F),H)){var Q=this.currentChannel;if(Q&&Q>0){var z=this.channels[Q];z.insertChars(H)}else this.logger.log(s.WARNING,"No channel found yet. TEXT-MODE?")}!g&&!H&&this.logger.log(s.WARNING,"Couldn't parse cleaned data "+o([m,F])+" orig: "+o([_[B],_[B+1]]))}},c.parseCmd=function(u,_){var g=this.cmdHistory,m=(u===20||u===28||u===21||u===29)&&_>=32&&_<=47,F=(u===23||u===31)&&_>=33&&_<=35;if(!(m||F))return!1;if(T(u,_,g))return E(null,null,g),this.logger.log(s.DEBUG,"Repeated command ("+o([u,_])+") is dropped"),!0;var H=u===20||u===21||u===23?1:2,B=this.channels[H];return u===20||u===21||u===28||u===29?_===32?B.ccRCL():_===33?B.ccBS():_===34?B.ccAOF():_===35?B.ccAON():_===36?B.ccDER():_===37?B.ccRU(2):_===38?B.ccRU(3):_===39?B.ccRU(4):_===40?B.ccFON():_===41?B.ccRDC():_===42?B.ccTR():_===43?B.ccRTD():_===44?B.ccEDM():_===45?B.ccCR():_===46?B.ccENM():_===47&&B.ccEOC():B.ccTO(_-32),E(u,_,g),this.currentChannel=H,!0},c.parseMidrow=function(u,_){var g=0;if((u===17||u===25)&&_>=32&&_<=47){if(u===17?g=1:g=2,g!==this.currentChannel)return this.logger.log(s.ERROR,"Mismatch channel in midrow parsing"),!1;var m=this.channels[g];return m?(m.ccMIDROW(_),this.logger.log(s.DEBUG,"MIDROW ("+o([u,_])+")"),!0):!1}return!1},c.parsePAC=function(u,_){var g,m=this.cmdHistory,F=(u>=17&&u<=23||u>=25&&u<=31)&&_>=64&&_<=127,H=(u===16||u===24)&&_>=64&&_<=95;if(!(F||H))return!1;if(T(u,_,m))return E(null,null,m),!0;var B=u<=23?1:2;_>=64&&_<=95?g=B===1?e[u]:d[u]:g=B===1?I[u]:p[u];var Q=this.channels[B];return Q?(Q.setPAC(this.interpretPAC(g,_)),E(u,_,m),this.currentChannel=B,!0):!1},c.interpretPAC=function(u,_){var g,m={color:null,italics:!1,indent:null,underline:!1,row:u};return _>95?g=_-96:g=_-64,m.underline=(g&1)===1,g<=13?m.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(g/2)]:g<=15?(m.italics=!0,m.color="white"):m.indent=Math.floor((g-16)/2)*4,m},c.parseChars=function(u,_){var g,m=null,F=null;if(u>=25?(g=2,F=u-8):(g=1,F=u),F>=17&&F<=19){var H;F===17?H=_+80:F===18?H=_+112:H=_+144,this.logger.log(s.INFO,"Special char '"+O(H)+"' in channel "+g),m=[H]}else u>=32&&u<=127&&(m=_===0?[u]:[u,_]);if(m){var B=o(m);this.logger.log(s.DEBUG,"Char codes = "+B.join(",")),E(u,_,this.cmdHistory)}return m},c.parseBackgroundAttributes=function(u,_){var g=(u===16||u===24)&&_>=32&&_<=47,m=(u===23||u===31)&&_>=45&&_<=47;if(!(g||m))return!1;var F,H={};u===16||u===24?(F=Math.floor((_-32)/2),H.background=A[F],_%2===1&&(H.background=H.background+"_semi")):_===45?H.background="transparent":(H.foreground="black",_===47&&(H.underline=!0));var B=u<=23?1:2,Q=this.channels[B];return Q.setBkgData(H),E(u,_,this.cmdHistory),!0},c.reset=function(){for(var u=0;u<Object.keys(this.channels).length;u++){var _=this.channels[u];_&&_.reset()}this.cmdHistory=C()},c.cueSplitAtTime=function(u){for(var _=0;_<this.channels.length;_++){var g=this.channels[_];g&&g.cueSplitAtTime(u)}},h}();function E(h,c,l){l.a=h,l.b=c}function T(h,c,l){return l.a===h&&l.b===c}function C(){return{a:null,b:null}}W.default=b},"./src/utils/codecs.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"isCodecType",function(){return U}),L.d(W,"isCodecSupportedInMp4",function(){return O});var V={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function U(q,k){var e=V[k];return!!e&&e[q.slice(0,4)]===!0}function O(q,k){return MediaSource.isTypeSupported((k||"video")+'/mp4;codecs="'+q+'"')}},"./src/utils/cues.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/utils/vttparser.ts"),U=L("./src/utils/webvtt-parser.ts"),O=L("./src/utils/texttrack-utils.ts"),q=/\s/,k={newCue:function(I,d,p,A){for(var s=[],i,o,n,a,r,t=self.VTTCue||self.TextTrackCue,y=0;y<A.rows.length;y++)if(i=A.rows[y],n=!0,a=0,r="",!i.isEmpty()){for(var b=0;b<i.chars.length;b++)q.test(i.chars[b].uchar)&&n?a++:(r+=i.chars[b].uchar,n=!1);i.cueStartTime=d,d===p&&(p+=1e-4),a>=16?a--:a++;var E=Object(V.fixLineBreaks)(r.trim()),T=Object(U.generateCueId)(d,p,E);(!I||!I.cues||!I.cues.getCueById(T))&&(o=new t(d,p,E),o.id=T,o.line=y+1,o.align="left",o.position=10+Math.min(80,Math.floor(a*8/32)*10),s.push(o))}return I&&s.length&&(s.sort(function(C,h){return C.line==="auto"||h.line==="auto"?0:C.line>8&&h.line>8?h.line-C.line:C.line-h.line}),s.forEach(function(C){return Object(O.addCueToTrack)(I,C)})),s}};W.default=k},"./src/utils/discontinuities.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"findFirstFragWithCC",function(){return q}),L.d(W,"shouldAlignOnDiscontinuities",function(){return k}),L.d(W,"findDiscontinuousReferenceFrag",function(){return e}),L.d(W,"adjustSlidingStart",function(){return d}),L.d(W,"alignStream",function(){return p}),L.d(W,"alignPDT",function(){return s}),L.d(W,"alignFragmentByPDTDelta",function(){return i}),L.d(W,"alignMediaPlaylistByPDT",function(){return o});var V=L("./src/polyfills/number.ts"),U=L("./src/utils/logger.ts"),O=L("./src/controller/level-helper.ts");function q(n,a){for(var r=null,t=0,y=n.length;t<y;t++){var b=n[t];if(b&&b.cc===a){r=b;break}}return r}function k(n,a,r){return!!(a.details&&(r.endCC>r.startCC||n&&n.cc<r.startCC))}function e(n,a){var r=n.fragments,t=a.fragments;if(!t.length||!r.length){U.logger.log("No fragments to align");return}var y=q(r,t[0].cc);if(!y||y&&!y.startPTS){U.logger.log("No frag in previous level to align on");return}return y}function I(n,a){if(n){var r=n.start+a;n.start=n.startPTS=r,n.endPTS=r+n.duration}}function d(n,a){for(var r=a.fragments,t=0,y=r.length;t<y;t++)I(r[t],n);a.fragmentHint&&I(a.fragmentHint,n),a.alignedSliding=!0}function p(n,a,r){if(!a)return;A(n,r,a),!r.alignedSliding&&a.details&&s(r,a.details),!r.alignedSliding&&a.details&&!r.skippedSegments&&Object(O.adjustSliding)(a.details,r)}function A(n,a,r){if(k(n,r,a)){var t=e(r.details,a);t&&Object(V.isFiniteNumber)(t.start)&&(U.logger.log("Adjusting PTS using last level due to CC increase within current level "+a.url),d(t.start,a))}}function s(n,a){if(!a.fragments.length||!n.hasProgramDateTime||!a.hasProgramDateTime)return;var r=a.fragments[0].programDateTime,t=n.fragments[0].programDateTime,y=(t-r)/1e3+a.fragments[0].start;y&&Object(V.isFiniteNumber)(y)&&(U.logger.log("Adjusting PTS using programDateTime delta "+(t-r)+"ms, sliding:"+y.toFixed(3)+" "+n.url+" "),d(y,n))}function i(n,a){var r=n.programDateTime;if(!r)return;var t=(r-a)/1e3;n.start=n.startPTS=t,n.endPTS=t+n.duration}function o(n,a){if(!a.fragments.length||!n.hasProgramDateTime||!a.hasProgramDateTime)return;var r=a.fragments[0].programDateTime,t=a.fragments[0].start,y=r-t*1e3;n.fragments.forEach(function(b){i(b,y)}),n.fragmentHint&&i(n.fragmentHint,y),n.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/utils/ewma.ts"),U=function(){function O(k,e,I){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=I,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new V.default(k),this.fast_=new V.default(e)}var q=O.prototype;return q.update=function(e,I){var d=this.slow_,p=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new V.default(e,d.getEstimate(),d.getTotalWeight())),this.fast_.halfLife!==I&&(this.fast_=new V.default(I,p.getEstimate(),p.getTotalWeight()))},q.sample=function(e,I){e=Math.max(e,this.minDelayMs_);var d=8*I,p=e/1e3,A=d/p;this.fast_.sample(p,A),this.slow_.sample(p,A)},q.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},q.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},q.destroy=function(){},O}();W.default=U},"./src/utils/ewma.ts":function(fe,W,L){"use strict";L.r(W);var V=function(){function U(q,k,e){k===void 0&&(k=0),e===void 0&&(e=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=q,this.alpha_=q?Math.exp(Math.log(.5)/q):0,this.estimate_=k,this.totalWeight_=e}var O=U.prototype;return O.sample=function(k,e){var I=Math.pow(this.alpha_,k);this.estimate_=e*(1-I)+I*this.estimate_,this.totalWeight_+=k},O.getTotalWeight=function(){return this.totalWeight_},O.getEstimate=function(){if(this.alpha_){var k=1-Math.pow(this.alpha_,this.totalWeight_);if(k)return this.estimate_/k}return this.estimate_},U}();W.default=V},"./src/utils/fetch-loader.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"fetchSupported",function(){return i});var V=L("./src/polyfills/number.ts"),U=L("./src/loader/load-stats.ts"),O=L("./src/demux/chunk-cache.ts");function q(t,y){t.prototype=Object.create(y.prototype),t.prototype.constructor=t,p(t,y)}function k(t){var y=typeof Map=="function"?new Map:void 0;return k=function(E){if(E===null||!d(E))return E;if(typeof E!="function")throw new TypeError("Super expression must either be null or a function");if(typeof y!="undefined"){if(y.has(E))return y.get(E);y.set(E,T)}function T(){return e(E,arguments,A(this).constructor)}return T.prototype=Object.create(E.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),p(T,E)},k(t)}function e(t,y,b){return I()?e=Reflect.construct:e=function(T,C,h){var c=[null];c.push.apply(c,C);var l=Function.bind.apply(T,c),u=new l;return h&&p(u,h.prototype),u},e.apply(null,arguments)}function I(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function d(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function p(t,y){return p=Object.setPrototypeOf||function(E,T){return E.__proto__=T,E},p(t,y)}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},A(t)}function s(){return s=Object.assign||function(t){for(var y=1;y<arguments.length;y++){var b=arguments[y];for(var E in b)Object.prototype.hasOwnProperty.call(b,E)&&(t[E]=b[E])}return t},s.apply(this,arguments)}function i(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var o=function(){function t(b){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=b.fetchSetup||a,this.controller=new self.AbortController,this.stats=new U.LoadStats}var y=t.prototype;return y.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},y.abortInternal=function(){var E=this.response;(!E||!E.ok)&&(this.stats.aborted=!0,this.controller.abort())},y.abort=function(){var E;this.abortInternal(),(E=this.callbacks)!==null&&E!==void 0&&E.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},y.load=function(E,T,C){var h=this,c=this.stats;if(c.loading.start)throw new Error("Loader can only be used once.");c.loading.start=self.performance.now();var l=n(E,this.controller.signal),u=C.onProgress,_=E.responseType==="arraybuffer",g=_?"byteLength":"length";this.context=E,this.config=T,this.callbacks=C,this.request=this.fetchSetup(E,l),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){h.abortInternal(),C.onTimeout(c,E,h.response)},T.timeout),self.fetch(this.request).then(function(m){if(h.response=h.loader=m,!m.ok){var F=m.status,H=m.statusText;throw new r(H||"fetch, bad network response",F,m)}return c.loading.first=Math.max(self.performance.now(),c.loading.start),c.total=parseInt(m.headers.get("Content-Length")||"0"),u&&Object(V.isFiniteNumber)(T.highWaterMark)?h.loadProgressively(m,c,E,T.highWaterMark,u):_?m.arrayBuffer():m.text()}).then(function(m){var F=h.response;self.clearTimeout(h.requestTimeout),c.loading.end=Math.max(self.performance.now(),c.loading.first),c.loaded=c.total=m[g];var H={url:F.url,data:m};u&&!Object(V.isFiniteNumber)(T.highWaterMark)&&u(c,E,m,F),C.onSuccess(H,c,E,F)}).catch(function(m){if(self.clearTimeout(h.requestTimeout),c.aborted)return;var F=m.code||0;C.onError({code:F,text:m.message},E,m.details)})},y.getCacheAge=function(){var E=null;if(this.response){var T=this.response.headers.get("age");E=T?parseFloat(T):null}return E},y.loadProgressively=function(E,T,C,h,c){h===void 0&&(h=0);var l=new O.default,u=E.body.getReader(),_=function g(){return u.read().then(function(m){if(m.done)return l.dataLength&&c(T,C,l.flush(),E),Promise.resolve(new ArrayBuffer(0));var F=m.value,H=F.length;return T.loaded+=H,H<h||l.dataLength?(l.push(F),l.dataLength>=h&&c(T,C,l.flush(),E)):c(T,C,F,E),g()}).catch(function(){return Promise.reject()})};return _()},t}();function n(t,y){var b={method:"GET",mode:"cors",credentials:"same-origin",signal:y,headers:new self.Headers(s({},t.headers))};return t.rangeEnd&&b.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),b}function a(t,y){return new self.Request(t.url,y)}var r=function(t){q(y,t);function y(b,E,T){var C;return C=t.call(this,b)||this,C.code=void 0,C.details=void 0,C.code=E,C.details=T,C}return y}(k(Error));W.default=o},"./src/utils/imsc1-ttml-parser.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"IMSC1_CODEC",function(){return d}),L.d(W,"parseIMSC1",function(){return i});var V=L("./src/utils/mp4-tools.ts"),U=L("./src/utils/vttparser.ts"),O=L("./src/utils/vttcue.ts"),q=L("./src/demux/id3.ts"),k=L("./src/utils/timescale-conversion.ts"),e=L("./src/utils/webvtt-parser.ts");function I(){return I=Object.assign||function(h){for(var c=1;c<arguments.length;c++){var l=arguments[c];for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(h[u]=l[u])}return h},I.apply(this,arguments)}var d="stpp.ttml.im1t",p=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,A=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,s={left:"start",center:"center",right:"end",start:"start",end:"end"};function i(h,c,l,u,_){var g=Object(V.findBox)(new Uint8Array(h),["mdat"]);if(g.length===0){_(new Error("Could not parse IMSC1 mdat"));return}var m=g[0],F=Object(q.utf8ArrayToStr)(new Uint8Array(h,m.start,m.end-m.start)),H=Object(k.toTimescaleFromScale)(c,1,l);try{u(o(F,H))}catch(B){_(B)}}function o(h,c){var l=new DOMParser,u=l.parseFromString(h,"text/xml"),_=u.getElementsByTagName("tt")[0];if(!_)throw new Error("Invalid ttml");var g={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},m=Object.keys(g).reduce(function(z,N){return z[N]=_.getAttribute("ttp:"+N)||g[N],z},{}),F=_.getAttribute("xml:space")!=="preserve",H=a(n(_,"styling","style")),B=a(n(_,"layout","region")),Q=n(_,"body","[begin]");return[].map.call(Q,function(z){var N=r(z,F);if(!N||!z.hasAttribute("begin"))return null;var ee=E(z.getAttribute("begin"),m),le=E(z.getAttribute("dur"),m),Be=E(z.getAttribute("end"),m);if(ee===null)throw b(z);if(Be===null){if(le===null)throw b(z);Be=ee+le}var Ce=new O.default(ee-c,Be-c,N);Ce.id=Object(e.generateCueId)(Ce.startTime,Ce.endTime,Ce.text);var Me=B[z.getAttribute("region")],Le=H[z.getAttribute("style")];Ce.position=10,Ce.size=80;var je=t(Me,Le),He=je.textAlign;if(He){var Je=s[He];Je&&(Ce.lineAlign=Je),Ce.align=He}return I(Ce,je),Ce}).filter(function(z){return z!==null})}function n(h,c,l){var u=h.getElementsByTagName(c)[0];return u?[].slice.call(u.querySelectorAll(l)):[]}function a(h){return h.reduce(function(c,l){var u=l.getAttribute("xml:id");return u&&(c[u]=l),c},{})}function r(h,c){return[].slice.call(h.childNodes).reduce(function(l,u,_){var g;return u.nodeName==="br"&&_?l+`
|
|
`:(g=u.childNodes)!==null&&g!==void 0&&g.length?r(u,c):c?l+u.textContent.trim().replace(/\s+/g," "):l+u.textContent},"")}function t(h,c){var l="http://www.w3.org/ns/ttml#styling",u=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return u.reduce(function(_,g){var m=y(c,l,g)||y(h,l,g);return m&&(_[g]=m),_},{})}function y(h,c,l){return h.hasAttributeNS(c,l)?h.getAttributeNS(c,l):null}function b(h){return new Error("Could not parse ttml timestamp "+h)}function E(h,c){if(!h)return null;var l=Object(U.parseTimeStamp)(h);return l===null&&(p.test(h)?l=T(h,c):A.test(h)&&(l=C(h,c))),l}function T(h,c){var l=p.exec(h),u=(l[4]|0)+(l[5]|0)/c.subFrameRate;return(l[1]|0)*3600+(l[2]|0)*60+(l[3]|0)+u/c.frameRate}function C(h,c){var l=A.exec(h),u=Number(l[1]),_=l[2];switch(_){case"h":return u*3600;case"m":return u*60;case"ms":return u*1e3;case"f":return u/c.frameRate;case"t":return u/c.tickRate}return u}},"./src/utils/logger.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"enableLogs",function(){return e}),L.d(W,"logger",function(){return I});var V=function(){},U={trace:V,debug:V,log:V,warn:V,info:V,error:V},O=U;function q(d){var p=self.console[d];return p?p.bind(self.console,"["+d+"] >"):V}function k(d){for(var p=arguments.length,A=new Array(p>1?p-1:0),s=1;s<p;s++)A[s-1]=arguments[s];A.forEach(function(i){O[i]=d[i]?d[i].bind(d):q(i)})}function e(d){if(self.console&&d===!0||typeof d=="object"){k(d,"debug","log","info","warn","error");try{O.log()}catch(p){O=U}}else O=U}var I=O},"./src/utils/mediakeys-helper.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"KeySystems",function(){return V}),L.d(W,"requestMediaKeySystemAccess",function(){return U});var V;(function(O){O.WIDEVINE="com.widevine.alpha",O.PLAYREADY="com.microsoft.playready"})(V||(V={}));var U=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"getMediaSource",function(){return V});function V(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"bin2str",function(){return k}),L.d(W,"readUint16",function(){return e}),L.d(W,"readUint32",function(){return I}),L.d(W,"writeUint32",function(){return d}),L.d(W,"findBox",function(){return p}),L.d(W,"parseSegmentIndex",function(){return A}),L.d(W,"parseInitSegment",function(){return s}),L.d(W,"getStartDTS",function(){return i}),L.d(W,"getDuration",function(){return o}),L.d(W,"computeRawDurationFromSamples",function(){return n}),L.d(W,"offsetStartDTS",function(){return a}),L.d(W,"segmentValidRange",function(){return r}),L.d(W,"appendUint8Array",function(){return t});var V=L("./src/utils/typed-array.ts"),U=L("./src/loader/fragment.ts"),O=Math.pow(2,32)-1,q=[].push;function k(y){return String.fromCharCode.apply(null,y)}function e(y,b){"data"in y&&(b+=y.start,y=y.data);var E=y[b]<<8|y[b+1];return E<0?65536+E:E}function I(y,b){"data"in y&&(b+=y.start,y=y.data);var E=y[b]<<24|y[b+1]<<16|y[b+2]<<8|y[b+3];return E<0?4294967296+E:E}function d(y,b,E){"data"in y&&(b+=y.start,y=y.data),y[b]=E>>24,y[b+1]=E>>16&255,y[b+2]=E>>8&255,y[b+3]=E&255}function p(y,b){var E=[];if(!b.length)return E;var T,C,h;"data"in y?(T=y.data,C=y.start,h=y.end):(T=y,C=0,h=T.byteLength);for(var c=C;c<h;){var l=I(T,c),u=k(T.subarray(c+4,c+8)),_=l>1?c+l:h;if(u===b[0])if(b.length===1)E.push({data:T,start:c+8,end:_});else{var g=p({data:T,start:c+8,end:_},b.slice(1));g.length&&q.apply(E,g)}c=_}return E}function A(y){var b=p(y,["moov"]),E=b[0],T=E?E.end:null,C=p(y,["sidx"]);if(!C||!C[0])return null;var h=[],c=C[0],l=c.data[0],u=l===0?8:16,_=I(c,u);u+=4;var g=0,m=0;l===0?u+=8:u+=16,u+=2;var F=c.end+m,H=e(c,u);u+=2;for(var B=0;B<H;B++){var Q=u,z=I(c,Q);Q+=4;var N=z&2147483647,ee=(z&2147483648)>>>31;if(ee===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var le=I(c,Q);Q+=4,h.push({referenceSize:N,subsegmentDuration:le,info:{duration:le/_,start:F,end:F+N-1}}),F+=N,Q+=4,u=Q}return{earliestPresentationTime:g,timescale:_,version:l,referencesCount:H,references:h,moovEndOffset:T}}function s(y){for(var b=[],E=p(y,["moov","trak"]),T=0;T<E.length;T++){var C=E[T],h=p(C,["tkhd"])[0];if(h){var c=h.data[h.start],l=c===0?12:20,u=I(h,l),_=p(C,["mdia","mdhd"])[0];if(_){c=_.data[_.start],l=c===0?12:20;var g=I(_,l),m=p(C,["mdia","hdlr"])[0];if(m){var F=k(m.data.subarray(m.start+8,m.start+12)),H={soun:U.ElementaryStreamTypes.AUDIO,vide:U.ElementaryStreamTypes.VIDEO}[F];if(H){var B=p(C,["mdia","minf","stbl","stsd"])[0],Q=void 0;B&&(Q=k(B.data.subarray(B.start+12,B.start+16))),b[u]={timescale:g,type:H},b[H]={timescale:g,id:u,codec:Q}}}}}}var z=p(y,["moov","mvex","trex"]);return z.forEach(function(N){var ee=I(N,4),le=b[ee];le&&(le.default={duration:I(N,12),flags:I(N,20)})}),b}function i(y,b){return p(b,["moof","traf"]).reduce(function(E,T){var C=p(T,["tfdt"])[0],h=C.data[C.start],c=p(T,["tfhd"]).reduce(function(l,u){var _=I(u,4),g=y[_];if(g){var m=I(C,4);h===1&&(m*=Math.pow(2,32),m+=I(C,8));var F=g.timescale||9e4,H=m/F;if(isFinite(H)&&(l===null||H<l))return H}return l},null);return c!==null&&isFinite(c)&&(E===null||c<E)?c:E},null)||0}function o(y,b){for(var E=0,T=0,C=0,h=p(y,["moof","traf"]),c=0;c<h.length;c++){var l=h[c],u=p(l,["tfhd"])[0],_=I(u,4),g=b[_];if(!g)continue;var m=g.default,F=I(u,0)|(m==null?void 0:m.flags),H=m==null?void 0:m.duration;F&8&&(F&2?H=I(u,12):H=I(u,8));for(var B=g.timescale||9e4,Q=p(l,["trun"]),z=0;z<Q.length;z++){if(H){var N=I(Q[z],4);E=H*N}else E=n(Q[z]);g.type===U.ElementaryStreamTypes.VIDEO?T+=E/B:g.type===U.ElementaryStreamTypes.AUDIO&&(C+=E/B)}}if(T===0&&C===0){var ee=A(y);if(ee!=null&&ee.references)return ee.references.reduce(function(le,Be){return le+Be.info.duration||0},0)}return T||C}function n(y){var b=I(y,0),E=8;b&1&&(E+=4),b&4&&(E+=4);for(var T=0,C=I(y,4),h=0;h<C;h++){if(b&256){var c=I(y,E);T+=c,E+=4}b&512&&(E+=4),b&1024&&(E+=4),b&2048&&(E+=4)}return T}function a(y,b,E){p(b,["moof","traf"]).forEach(function(T){p(T,["tfhd"]).forEach(function(C){var h=I(C,4),c=y[h];if(!c)return;var l=c.timescale||9e4;p(T,["tfdt"]).forEach(function(u){var _=u.data[u.start],g=I(u,4);if(_===0)d(u,4,g-E*l);else{g*=Math.pow(2,32),g+=I(u,8),g-=E*l,g=Math.max(g,0);var m=Math.floor(g/(O+1)),F=Math.floor(g%(O+1));d(u,4,m),d(u,8,F)}})})})}function r(y){var b={valid:null,remainder:null},E=p(y,["moof"]);if(E){if(E.length<2)return b.remainder=y,b}else return b;var T=E[E.length-1];return b.valid=Object(V.sliceUint8)(y,0,T.start-8),b.remainder=Object(V.sliceUint8)(y,T.start-8),b}function t(y,b){var E=new Uint8Array(y.length+b.length);return E.set(y),E.set(b,y.length),E}},"./src/utils/output-filter.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"default",function(){return V});var V=function(){function U(q,k){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=q,this.trackName=k}var O=U.prototype;return O.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},O.newCue=function(k,e,I){(this.startTime===null||this.startTime>k)&&(this.startTime=k),this.endTime=e,this.screen=I,this.timelineController.createCaptionsTrack(this.trackName)},O.reset=function(){this.cueRanges=[]},U}()},"./src/utils/texttrack-utils.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"sendAddTrackEvent",function(){return U}),L.d(W,"addCueToTrack",function(){return O}),L.d(W,"clearCurrentCues",function(){return q}),L.d(W,"removeCuesInRange",function(){return k}),L.d(W,"getCuesInRange",function(){return I});var V=L("./src/utils/logger.ts");function U(d,p){var A;try{A=new Event("addtrack")}catch(s){A=document.createEvent("Event"),A.initEvent("addtrack",!1,!1)}A.track=d,p.dispatchEvent(A)}function O(d,p){var A=d.mode;if(A==="disabled"&&(d.mode="hidden"),d.cues&&!d.cues.getCueById(p.id))try{if(d.addCue(p),!d.cues.getCueById(p.id))throw new Error("addCue is failed for: "+p)}catch(i){V.logger.debug("[texttrack-utils]: "+i);var s=new self.TextTrackCue(p.startTime,p.endTime,p.text);s.id=p.id,d.addCue(s)}A==="disabled"&&(d.mode=A)}function q(d){var p=d.mode;if(p==="disabled"&&(d.mode="hidden"),d.cues)for(var A=d.cues.length;A--;)d.removeCue(d.cues[A]);p==="disabled"&&(d.mode=p)}function k(d,p,A){var s=d.mode;if(s==="disabled"&&(d.mode="hidden"),d.cues&&d.cues.length>0)for(var i=I(d.cues,p,A),o=0;o<i.length;o++)d.removeCue(i[o]);s==="disabled"&&(d.mode=s)}function e(d,p){if(p<d[0].startTime)return 0;var A=d.length-1;if(p>d[A].endTime)return-1;for(var s=0,i=A;s<=i;){var o=Math.floor((i+s)/2);if(p<d[o].startTime)i=o-1;else if(p>d[o].startTime&&s<A)s=o+1;else return o}return d[s].startTime-p<p-d[i].startTime?s:i}function I(d,p,A){var s=[],i=e(d,p);if(i>-1)for(var o=i,n=d.length;o<n;o++){var a=d[o];if(a.startTime>=p&&a.endTime<=A)s.push(a);else if(a.startTime>A)return s}return s}},"./src/utils/time-ranges.ts":function(fe,W,L){"use strict";L.r(W);var V={toString:function(O){for(var q="",k=O.length,e=0;e<k;e++)q+="["+O.start(e).toFixed(3)+","+O.end(e).toFixed(3)+"]";return q}};W.default=V},"./src/utils/timescale-conversion.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"toTimescaleFromBase",function(){return U}),L.d(W,"toTimescaleFromScale",function(){return O}),L.d(W,"toMsFromMpegTsClock",function(){return q}),L.d(W,"toMpegTsClockFromTimescale",function(){return k});var V=9e4;function U(e,I,d,p){d===void 0&&(d=1),p===void 0&&(p=!1);var A=e*I*d;return p?Math.round(A):A}function O(e,I,d,p){return d===void 0&&(d=1),p===void 0&&(p=!1),U(e,I,1/d,p)}function q(e,I){return I===void 0&&(I=!1),U(e,1e3,1/V,I)}function k(e,I){return I===void 0&&(I=1),U(e,V,1/I)}},"./src/utils/typed-array.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"sliceUint8",function(){return V});function V(U,O,q){return Uint8Array.prototype.slice?U.slice(O,q):new Uint8Array(Array.prototype.slice.call(U,O,q))}},"./src/utils/vttcue.ts":function(fe,W,L){"use strict";L.r(W),W.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var V=["","lr","rl"],U=["start","middle","end","left","right"];function O(d,p){if(typeof p!="string")return!1;if(!Array.isArray(d))return!1;var A=p.toLowerCase();return~d.indexOf(A)?A:!1}function q(d){return O(V,d)}function k(d){return O(U,d)}function e(d){for(var p=arguments.length,A=new Array(p>1?p-1:0),s=1;s<p;s++)A[s-1]=arguments[s];for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var n in o)d[n]=o[n]}return d}function I(d,p,A){var s=this,i={enumerable:!0};s.hasBeenReset=!1;var o="",n=!1,a=d,r=p,t=A,y=null,b="",E=!0,T="auto",C="start",h=50,c="middle",l=50,u="middle";Object.defineProperty(s,"id",e({},i,{get:function(){return o},set:function(g){o=""+g}})),Object.defineProperty(s,"pauseOnExit",e({},i,{get:function(){return n},set:function(g){n=!!g}})),Object.defineProperty(s,"startTime",e({},i,{get:function(){return a},set:function(g){if(typeof g!="number")throw new TypeError("Start time must be set to a number.");a=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",e({},i,{get:function(){return r},set:function(g){if(typeof g!="number")throw new TypeError("End time must be set to a number.");r=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",e({},i,{get:function(){return t},set:function(g){t=""+g,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",e({},i,{get:function(){return y},set:function(g){y=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",e({},i,{get:function(){return b},set:function(g){var m=q(g);if(m===!1)throw new SyntaxError("An invalid or illegal string was specified.");b=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",e({},i,{get:function(){return E},set:function(g){E=!!g,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",e({},i,{get:function(){return T},set:function(g){if(typeof g!="number"&&g!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");T=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",e({},i,{get:function(){return C},set:function(g){var m=k(g);if(!m)throw new SyntaxError("An invalid or illegal string was specified.");C=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",e({},i,{get:function(){return h},set:function(g){if(g<0||g>100)throw new Error("Position must be between 0 and 100.");h=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",e({},i,{get:function(){return c},set:function(g){var m=k(g);if(!m)throw new SyntaxError("An invalid or illegal string was specified.");c=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",e({},i,{get:function(){return l},set:function(g){if(g<0||g>100)throw new Error("Size must be between 0 and 100.");l=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",e({},i,{get:function(){return u},set:function(g){var m=k(g);if(!m)throw new SyntaxError("An invalid or illegal string was specified.");u=m,this.hasBeenReset=!0}})),s.displayState=void 0}return I.prototype.getCueAsHTML=function(){var d=self.WebVTT;return d.convertCueToDOMTree(self,this.text)},I}()},"./src/utils/vttparser.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"parseTimeStamp",function(){return O}),L.d(W,"fixLineBreaks",function(){return p}),L.d(W,"VTTParser",function(){return A});var V=L("./src/utils/vttcue.ts"),U=function(){function s(){}var i=s.prototype;return i.decode=function(n,a){if(!n)return"";if(typeof n!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(n))},s}();function O(s){function i(n,a,r,t){return(n|0)*3600+(a|0)*60+(r|0)+parseFloat(t||0)}var o=s.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return o?parseFloat(o[2])>59?i(o[2],o[3],0,o[4]):i(o[1],o[2],o[3],o[4]):null}var q=function(){function s(){this.values=Object.create(null)}var i=s.prototype;return i.set=function(n,a){!this.get(n)&&a!==""&&(this.values[n]=a)},i.get=function(n,a,r){return r?this.has(n)?this.values[n]:a[r]:this.has(n)?this.values[n]:a},i.has=function(n){return n in this.values},i.alt=function(n,a,r){for(var t=0;t<r.length;++t)if(a===r[t]){this.set(n,a);break}},i.integer=function(n,a){/^-?\d+$/.test(a)&&this.set(n,parseInt(a,10))},i.percent=function(n,a){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(a)){var r=parseFloat(a);if(r>=0&&r<=100)return this.set(n,r),!0}return!1},s}();function k(s,i,o,n){var a=n?s.split(n):[s];for(var r in a){if(typeof a[r]!="string")continue;var t=a[r].split(o);if(t.length!==2)continue;var y=t[0],b=t[1];i(y,b)}}var e=new V.default(0,0,""),I=e.align==="middle"?"middle":"center";function d(s,i,o){var n=s;function a(){var y=O(s);if(y===null)throw new Error("Malformed timestamp: "+n);return s=s.replace(/^[^\sa-zA-Z-]+/,""),y}function r(y,b){var E=new q;k(y,function(h,c){var l;switch(h){case"region":for(var u=o.length-1;u>=0;u--)if(o[u].id===c){E.set(h,o[u].region);break}break;case"vertical":E.alt(h,c,["rl","lr"]);break;case"line":l=c.split(","),E.integer(h,l[0]),E.percent(h,l[0])&&E.set("snapToLines",!1),E.alt(h,l[0],["auto"]),l.length===2&&E.alt("lineAlign",l[1],["start",I,"end"]);break;case"position":l=c.split(","),E.percent(h,l[0]),l.length===2&&E.alt("positionAlign",l[1],["start",I,"end","line-left","line-right","auto"]);break;case"size":E.percent(h,c);break;case"align":E.alt(h,c,["start",I,"end","left","right"]);break}},/:/,/\s/),b.region=E.get("region",null),b.vertical=E.get("vertical","");var T=E.get("line","auto");T==="auto"&&e.line===-1&&(T=-1),b.line=T,b.lineAlign=E.get("lineAlign","start"),b.snapToLines=E.get("snapToLines",!0),b.size=E.get("size",100),b.align=E.get("align",I);var C=E.get("position","auto");C==="auto"&&e.position===50&&(C=b.align==="start"||b.align==="left"?0:b.align==="end"||b.align==="right"?100:50),b.position=C}function t(){s=s.replace(/^\s+/,"")}if(t(),i.startTime=a(),t(),s.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+n);s=s.substr(3),t(),i.endTime=a(),t(),r(s,i)}function p(s){return s.replace(/<br(?: \/)?>/gi,`
|
|
`)}var A=function(){function s(){this.state="INITIAL",this.buffer="",this.decoder=new U,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var i=s.prototype;return i.parse=function(n){var a=this;n&&(a.buffer+=a.decoder.decode(n,{stream:!0}));function r(){var C=a.buffer,h=0;for(C=p(C);h<C.length&&C[h]!=="\r"&&C[h]!==`
|
|
`;)++h;var c=C.substr(0,h);return C[h]==="\r"&&++h,C[h]===`
|
|
`&&++h,a.buffer=C.substr(h),c}function t(C){k(C,function(h,c){},/:/)}try{var y="";if(a.state==="INITIAL"){if(!/\r\n|\n/.test(a.buffer))return this;y=r();var b=y.match(/^()?WEBVTT([ \t].*)?$/);if(!b||!b[0])throw new Error("Malformed WebVTT signature.");a.state="HEADER"}for(var E=!1;a.buffer;){if(!/\r\n|\n/.test(a.buffer))return this;E?E=!1:y=r();switch(a.state){case"HEADER":/:/.test(y)?t(y):y||(a.state="ID");continue;case"NOTE":y||(a.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(y)){a.state="NOTE";break}if(!y)continue;if(a.cue=new V.default(0,0,""),a.state="CUE",y.indexOf("-->")===-1){a.cue.id=y;continue}case"CUE":if(!a.cue){a.state="BADCUE";continue}try{d(y,a.cue,a.regionList)}catch(C){a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":{var T=y.indexOf("-->")!==-1;if(!y||T&&(E=!0)){a.oncue&&a.cue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}if(a.cue===null)continue;a.cue.text&&(a.cue.text+=`
|
|
`),a.cue.text+=y}continue;case"BADCUE":y||(a.state="ID")}}}catch(C){a.state==="CUETEXT"&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state=a.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},i.flush=function(){var n=this;try{if((n.cue||n.state==="HEADER")&&(n.buffer+=`
|
|
|
|
`,n.parse()),n.state==="INITIAL"||n.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(a){n.onparsingerror&&n.onparsingerror(a)}return n.onflush&&n.onflush(),this},s}()},"./src/utils/webvtt-parser.ts":function(fe,W,L){"use strict";L.r(W),L.d(W,"generateCueId",function(){return A}),L.d(W,"parseWebVTT",function(){return i});var V=L("./src/polyfills/number.ts"),U=L("./src/utils/vttparser.ts"),O=L("./src/demux/id3.ts"),q=L("./src/utils/timescale-conversion.ts"),k=L("./src/remux/mp4-remuxer.ts"),e=/\r\n|\n\r|\n|\r/g,I=function(n,a,r){return r===void 0&&(r=0),n.substr(r,a.length)===a},d=function(n){var a=parseInt(n.substr(-3)),r=parseInt(n.substr(-6,2)),t=parseInt(n.substr(-9,2)),y=n.length>9?parseInt(n.substr(0,n.indexOf(":"))):0;if(!Object(V.isFiniteNumber)(a)||!Object(V.isFiniteNumber)(r)||!Object(V.isFiniteNumber)(t)||!Object(V.isFiniteNumber)(y))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+n);return a+=1e3*r,a+=60*1e3*t,a+=60*60*1e3*y,a},p=function(n){for(var a=5381,r=n.length;r;)a=a*33^n.charCodeAt(--r);return(a>>>0).toString()};function A(o,n,a){return p(o.toString())+p(n.toString())+p(a)}var s=function(n,a,r){var t=n[a],y=n[t.prevCC];if(!y||!y.new&&t.new){n.ccOffset=n.presentationOffset=t.start,t.new=!1;return}for(;(b=y)!==null&&b!==void 0&&b.new;){var b;n.ccOffset+=t.start-y.start,t.new=!1,t=y,y=n[t.prevCC]}n.presentationOffset=r};function i(o,n,a,r,t,y,b,E){var T=new U.VTTParser,C=Object(O.utf8ArrayToStr)(new Uint8Array(o)).trim().replace(e,`
|
|
`).split(`
|
|
`),h=[],c=Object(q.toMpegTsClockFromTimescale)(n,a),l="00:00.000",u=0,_=0,g,m=!0,F=!1;T.oncue=function(H){var B=r[t],Q=r.ccOffset,z=(u-c)/9e4;if(B!=null&&B.new&&(_!==void 0?Q=r.ccOffset=B.start:s(r,t,z)),z&&(Q=z-r.presentationOffset),F){var N=H.endTime-H.startTime,ee=Object(k.normalizePts)((H.startTime+Q-_)*9e4,y*9e4)/9e4;H.startTime=ee,H.endTime=ee+N}var le=H.text.trim();H.text=decodeURIComponent(encodeURIComponent(le)),H.id||(H.id=A(H.startTime,H.endTime,le)),H.endTime>0&&h.push(H)},T.onparsingerror=function(H){g=H},T.onflush=function(){if(g){E(g);return}b(h)},C.forEach(function(H){if(m)if(I(H,"X-TIMESTAMP-MAP=")){m=!1,F=!0,H.substr(16).split(",").forEach(function(B){I(B,"LOCAL:")?l=B.substr(6):I(B,"MPEGTS:")&&(u=parseInt(B.substr(7)))});try{_=d(l)/1e3}catch(B){F=!1,g=B}return}else H===""&&(m=!1);T.parse(H+`
|
|
`)}),T.flush()}},"./src/utils/xhr-loader.ts":function(fe,W,L){"use strict";L.r(W);var V=L("./src/utils/logger.ts"),U=L("./src/loader/load-stats.ts"),O=/^age:\s*[\d.]+\s*$/m,q=function(){function k(I){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=I?I.xhrSetup:null,this.stats=new U.LoadStats,this.retryDelay=0}var e=k.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var d=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),d&&(d.onreadystatechange=null,d.onprogress=null,d.readyState!==4&&(this.stats.aborted=!0,d.abort()))},e.abort=function(){var d;this.abortInternal(),(d=this.callbacks)!==null&&d!==void 0&&d.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(d,p,A){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=d,this.config=p,this.callbacks=A,this.retryDelay=p.retryDelay,this.loadInternal()},e.loadInternal=function(){var d=this.config,p=this.context;if(!d)return;var A=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0;var i=this.xhrSetup;try{if(i)try{i(A,p.url)}catch(a){A.open("GET",p.url,!0),i(A,p.url)}A.readyState||A.open("GET",p.url,!0);var o=this.context.headers;if(o)for(var n in o)A.setRequestHeader(n,o[n])}catch(a){this.callbacks.onError({code:A.status,text:a.message},p,A);return}p.rangeEnd&&A.setRequestHeader("Range","bytes="+p.rangeStart+"-"+(p.rangeEnd-1)),A.onreadystatechange=this.readystatechange.bind(this),A.onprogress=this.loadprogress.bind(this),A.responseType=p.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),d.timeout),A.send()},e.readystatechange=function(){var d=this.context,p=this.loader,A=this.stats;if(!d||!p)return;var s=p.readyState,i=this.config;if(A.aborted)return;if(s>=2)if(self.clearTimeout(this.requestTimeout),A.loading.first===0&&(A.loading.first=Math.max(self.performance.now(),A.loading.start)),s===4){p.onreadystatechange=null,p.onprogress=null;var o=p.status;if(o>=200&&o<300){A.loading.end=Math.max(self.performance.now(),A.loading.first);var n,a;if(d.responseType==="arraybuffer"?(n=p.response,a=n.byteLength):(n=p.responseText,a=n.length),A.loaded=A.total=a,!this.callbacks)return;var r=this.callbacks.onProgress;if(r&&r(A,d,n,p),!this.callbacks)return;var t={url:p.responseURL,data:n};this.callbacks.onSuccess(t,A,d,p)}else A.retry>=i.maxRetry||o>=400&&o<499?(V.logger.error(o+" while loading "+d.url),this.callbacks.onError({code:o,text:p.statusText},d,p)):(V.logger.warn(o+" while loading "+d.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,i.maxRetryDelay),A.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout)},e.loadtimeout=function(){V.logger.warn("timeout while loading "+this.context.url);var d=this.callbacks;d&&(this.abortInternal(),d.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(d){var p=this.stats;p.loaded=d.loaded,d.lengthComputable&&(p.total=d.total)},e.getCacheAge=function(){var d=null;if(this.loader&&O.test(this.loader.getAllResponseHeaders())){var p=this.loader.getResponseHeader("age");d=p?parseFloat(p):null}return d},k}();W.default=q}}).default})},vHTk:function(ft,Oe,K){ft.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return et});var fe=K("rePB"),W=K("VTBJ"),L=K("KQm4"),V=K("U8pU"),U=K("ODXe"),O=K("q1tI"),q=K("TSYQ"),k=K.n(q),e=K("Gytx"),I=K.n(e),d=K("Kwbf"),p=K("t23M"),A=K("qx4F"),s=K("6eGT"),i=K("IBYe"),o=K("Ff2n"),n=K("c+Xe"),a=K("fyJ8"),r=K("biw7");function t(Pe,Ye,tt,ot,pe){var ne=tt[Pe]||{},ie=tt[Ye]||{},de,ge;ne.fixed==="left"?de=ot.left[Pe]:ie.fixed==="right"&&(ge=ot.right[Ye]);var se=!1,Ae=!1,Ee=!1,xe=!1,ke=tt[Ye+1],Qe=tt[Pe-1];if(pe==="rtl"){if(de!==void 0){var nt=Qe&&Qe.fixed==="left";xe=!nt}else if(ge!==void 0){var dt=ke&&ke.fixed==="right";Ee=!dt}}else if(de!==void 0){var wt=ke&&ke.fixed==="left";se=!wt}else if(ge!==void 0){var gt=Qe&&Qe.fixed==="right";Ae=!gt}return{fixLeft:de,fixRight:ge,lastFixLeft:se,firstFixRight:Ae,lastFixRight:Ee,firstFixLeft:xe,isSticky:ot.isSticky}}var y=K("sR1s");function b(Pe){var Ye=Pe.cells,tt=Pe.stickyOffsets,ot=Pe.flattenColumns,pe=Pe.rowComponent,ne=Pe.cellComponent,ie=Pe.onHeaderRow,de=Pe.index,ge=O.useContext(r.a),se=ge.prefixCls,Ae=ge.direction,Ee;ie&&(Ee=ie(Ye.map(function(ke){return ke.column}),de));var xe=Object(y.a)(Ye.map(function(ke){return ke.column}));return O.createElement(pe,Object.assign({},Ee),Ye.map(function(ke,Qe){var nt=ke.column,dt=t(ke.colStart,ke.colEnd,ot,tt,Ae),wt;return nt&&nt.onHeaderCell&&(wt=ke.column.onHeaderCell(nt)),O.createElement(a.a,Object.assign({},ke,{ellipsis:nt.ellipsis,align:nt.align,component:ne,prefixCls:se,key:xe[Qe]},dt,{additionalProps:wt,rowType:"header"}))}))}b.displayName="HeaderRow";var E=b;function T(Pe){var Ye=[];function tt(ie,de){var ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Ye[ge]=Ye[ge]||[];var se=de,Ae=ie.filter(Boolean).map(function(Ee){var xe={key:Ee.key,className:Ee.className||"",children:Ee.title,column:Ee,colStart:se},ke=1,Qe=Ee.children;return Qe&&Qe.length>0&&(ke=tt(Qe,se,ge+1).reduce(function(nt,dt){return nt+dt},0),xe.hasSubColumns=!0),"colSpan"in Ee&&(ke=Ee.colSpan),"rowSpan"in Ee&&(xe.rowSpan=Ee.rowSpan),xe.colSpan=ke,xe.colEnd=xe.colStart+ke-1,Ye[ge].push(xe),se+=ke,ke});return Ae}tt(Pe,0);for(var ot=Ye.length,pe=function(de){Ye[de].forEach(function(ge){!("rowSpan"in ge)&&!ge.hasSubColumns&&(ge.rowSpan=ot-de)})},ne=0;ne<ot;ne+=1)pe(ne);return Ye}function C(Pe){var Ye=Pe.stickyOffsets,tt=Pe.columns,ot=Pe.flattenColumns,pe=Pe.onHeaderRow,ne=O.useContext(r.a),ie=ne.prefixCls,de=ne.getComponent,ge=O.useMemo(function(){return T(tt)},[tt]),se=de(["header","wrapper"],"thead"),Ae=de(["header","row"],"tr"),Ee=de(["header","cell"],"th");return O.createElement(se,{className:"".concat(ie,"-thead")},ge.map(function(xe,ke){var Qe=O.createElement(E,{key:ke,flattenColumns:ot,cells:xe,stickyOffsets:Ye,rowComponent:Ae,cellComponent:Ee,onHeaderRow:pe,index:ke});return Qe}))}var h=C,c=K("hW8S");function l(Pe){for(var Ye=Pe.colWidths,tt=Pe.columns,ot=Pe.columCount,pe=[],ne=ot||tt.length,ie=!1,de=ne-1;de>=0;de-=1){var ge=Ye[de],se=tt&&tt[de],Ae=se&&se[c.a];(ge||Ae||ie)&&(pe.unshift(O.createElement("col",Object.assign({key:de,style:{width:ge,minWidth:ge}},Ae))),ie=!0)}return O.createElement("colgroup",null,pe)}var u=l;function _(Pe,Ye){return Object(O.useMemo)(function(){for(var tt=[],ot=0;ot<Ye;ot+=1){var pe=Pe[ot];if(pe!==void 0)tt[ot]=pe;else return null}return tt},[Pe.join("_"),Ye])}var g=O.forwardRef(function(Pe,Ye){var tt=Pe.noData,ot=Pe.columns,pe=Pe.flattenColumns,ne=Pe.colWidths,ie=Pe.columCount,de=Pe.stickyOffsets,ge=Pe.direction,se=Pe.fixHeader,Ae=Pe.offsetHeader,Ee=Pe.stickyClassName,xe=Pe.onScroll,ke=Object(o.a)(Pe,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Qe=O.useContext(r.a),nt=Qe.prefixCls,dt=Qe.scrollbarSize,wt=Qe.isSticky,gt=wt&&!se?0:dt,$t=O.useRef(null),xt=O.useCallback(function(Xt){Object(n.b)(Ye,Xt),Object(n.b)($t,Xt)},[]);O.useEffect(function(){var Xt;function or(It){var br=It.currentTarget,Mt=It.deltaX;Mt&&(xe({currentTarget:br,scrollLeft:br.scrollLeft+Mt}),It.preventDefault())}return(Xt=$t.current)===null||Xt===void 0||Xt.addEventListener("wheel",or),function(){var It;(It=$t.current)===null||It===void 0||It.removeEventListener("wheel",or)}},[]);var ut=pe[pe.length-1],Ot={fixed:ut?ut.fixed:null,onHeaderCell:function(){return{className:"".concat(nt,"-cell-scrollbar")}}},jt=Object(O.useMemo)(function(){return gt?[].concat(Object(L.a)(ot),[Ot]):ot},[gt,ot]),Tt=Object(O.useMemo)(function(){return gt?[].concat(Object(L.a)(pe),[Ot]):pe},[gt,pe]),Yt=Object(O.useMemo)(function(){var Xt=de.right,or=de.left;return Object(W.a)(Object(W.a)({},de),{},{left:ge==="rtl"?[].concat(Object(L.a)(or.map(function(It){return It+gt})),[0]):or,right:ge==="rtl"?Xt:[].concat(Object(L.a)(Xt.map(function(It){return It+gt})),[0]),isSticky:wt})},[gt,de,wt]),Qt=_(ne,ie);return O.createElement("div",{style:Object(W.a)({overflow:"hidden"},wt?{top:Ae}:{}),ref:xt,className:k()("".concat(nt,"-header"),Object(fe.a)({},Ee,!!Ee))},O.createElement("table",{style:{tableLayout:"fixed",visibility:tt||Qt?null:"hidden"}},O.createElement(u,{colWidths:Qt?[].concat(Object(L.a)(Qt),[gt]):[],columCount:ie+1,columns:Tt}),O.createElement(h,Object.assign({},ke,{stickyOffsets:Yt,columns:jt,flattenColumns:Tt}))))});g.displayName="FixedHeader";var m=g,F=O.createContext(null),H=F;function B(Pe){var Ye=Pe.prefixCls,tt=Pe.children,ot=Pe.component,pe=Pe.cellComponent,ne=Pe.fixHeader,ie=Pe.fixColumn,de=Pe.horizonScroll,ge=Pe.className,se=Pe.expanded,Ae=Pe.componentWidth,Ee=Pe.colSpan,xe=O.useContext(r.a),ke=xe.scrollbarSize;return O.useMemo(function(){var Qe=tt;return ie&&(Qe=O.createElement("div",{style:{width:Ae-(ne?ke:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Ye,"-expanded-row-fixed")},Qe)),O.createElement(ot,{className:ge,style:{display:se?null:"none"}},O.createElement(a.a,{component:pe,prefixCls:Ye,colSpan:Ee},Qe))},[tt,ot,ne,de,ge,se,Ae,Ee,ke])}var Q=B;function z(Pe){var Ye=Pe.className,tt=Pe.style,ot=Pe.record,pe=Pe.index,ne=Pe.rowKey,ie=Pe.getRowKey,de=Pe.rowExpandable,ge=Pe.expandedKeys,se=Pe.onRow,Ae=Pe.indent,Ee=Ae===void 0?0:Ae,xe=Pe.rowComponent,ke=Pe.cellComponent,Qe=Pe.childrenColumnName,nt=O.useContext(r.a),dt=nt.prefixCls,wt=nt.fixedInfoList,gt=O.useContext(H),$t=gt.fixHeader,xt=gt.fixColumn,ut=gt.horizonScroll,Ot=gt.componentWidth,jt=gt.flattenColumns,Tt=gt.expandableType,Yt=gt.expandRowByClick,Qt=gt.onTriggerExpand,Xt=gt.rowClassName,or=gt.expandedRowClassName,It=gt.indentSize,br=gt.expandIcon,Mt=gt.expandedRowRender,Pt=gt.expandIconColumnIndex,kt=O.useState(!1),pr=Object(U.a)(kt,2),jr=pr[0],ln=pr[1],cr=ge&&ge.has(Pe.recordKey);O.useEffect(function(){cr&&ln(!0)},[cr]);var Jt=Tt==="row"&&(!de||de(ot)),nr=Tt==="nest",Wt=Qe&&ot&&ot[Qe],Sr=Jt||nr,Zt;se&&(Zt=se(ot,pe));var zr=function(vt){if(Yt&&Sr&&Qt(ot,vt),Zt&&Zt.onClick){for(var ct,yt=arguments.length,bt=new Array(yt>1?yt-1:0),Ht=1;Ht<yt;Ht++)bt[Ht-1]=arguments[Ht];(ct=Zt).onClick.apply(ct,[vt].concat(bt))}},sr;typeof Xt=="string"?sr=Xt:typeof Xt=="function"&&(sr=Xt(ot,pe,Ee));var me=Object(y.a)(jt),ve=O.createElement(xe,Object.assign({},Zt,{"data-row-key":ne,className:k()(Ye,"".concat(dt,"-row"),"".concat(dt,"-row-level-").concat(Ee),sr,Zt&&Zt.className),style:Object(W.a)(Object(W.a)({},tt),Zt?Zt.style:null),onClick:zr}),jt.map(function(ht,vt){var ct=ht.render,yt=ht.dataIndex,bt=ht.className,Ht=me[vt],qt=wt[vt],er;vt===(Pt||0)&&nr&&(er=O.createElement(O.Fragment,null,O.createElement("span",{style:{paddingLeft:"".concat(It*Ee,"px")},className:"".concat(dt,"-row-indent indent-level-").concat(Ee)}),br({prefixCls:dt,expanded:cr,expandable:Wt,record:ot,onExpand:Qt})));var dr;return ht.onCell&&(dr=ht.onCell(ot,pe)),O.createElement(a.a,Object.assign({className:bt,ellipsis:ht.ellipsis,align:ht.align,component:ke,prefixCls:dt,key:Ht,record:ot,index:pe,dataIndex:yt,render:ct,shouldCellUpdate:ht.shouldCellUpdate},qt,{appendNode:er,additionalProps:dr}))})),Ie;if(Jt&&(jr||cr)){var Ke=Mt(ot,pe,Ee+1,cr),it=or&&or(ot,pe,Ee);Ie=O.createElement(Q,{expanded:cr,className:k()("".concat(dt,"-expanded-row"),"".concat(dt,"-expanded-row-level-").concat(Ee+1),it),prefixCls:dt,fixHeader:$t,fixColumn:xt,horizonScroll:ut,component:xe,componentWidth:Ot,cellComponent:ke,colSpan:jt.length},Ke)}var lt;return Wt&&cr&&(lt=(ot[Qe]||[]).map(function(ht,vt){var ct=ie(ht,vt);return O.createElement(z,Object.assign({},Pe,{key:ct,rowKey:ct,record:ht,recordKey:ct,index:vt,indent:Ee+1}))})),O.createElement(O.Fragment,null,ve,Ie,lt)}z.displayName="BodyRow";var N=z,ee=O.createContext(null),le=ee;function Be(Pe){var Ye=Pe.columnKey,tt=Pe.onColumnResize,ot=O.useRef();return O.useEffect(function(){ot.current&&tt(Ye,ot.current.offsetWidth)},[]),O.createElement(p.a,{onResize:function(ne){var ie=ne.offsetWidth;tt(Ye,ie)}},O.createElement("td",{ref:ot,style:{padding:0,border:0,height:0}},O.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Ce(Pe){var Ye=Pe.data,tt=Pe.getRowKey,ot=Pe.measureColumnWidth,pe=Pe.expandedKeys,ne=Pe.onRow,ie=Pe.rowExpandable,de=Pe.emptyNode,ge=Pe.childrenColumnName,se=O.useContext(le),Ae=se.onColumnResize,Ee=O.useContext(r.a),xe=Ee.prefixCls,ke=Ee.getComponent,Qe=O.useContext(H),nt=Qe.fixHeader,dt=Qe.horizonScroll,wt=Qe.flattenColumns,gt=Qe.componentWidth;return O.useMemo(function(){var $t=ke(["body","wrapper"],"tbody"),xt=ke(["body","row"],"tr"),ut=ke(["body","cell"],"td"),Ot;Ye.length?Ot=Ye.map(function(Tt,Yt){var Qt=tt(Tt,Yt);return O.createElement(N,{key:Qt,rowKey:Qt,record:Tt,recordKey:Qt,index:Yt,rowComponent:xt,cellComponent:ut,expandedKeys:pe,onRow:ne,getRowKey:tt,rowExpandable:ie,childrenColumnName:ge})}):Ot=O.createElement(Q,{expanded:!0,className:"".concat(xe,"-placeholder"),prefixCls:xe,fixHeader:nt,fixColumn:dt,horizonScroll:dt,component:xt,componentWidth:gt,cellComponent:ut,colSpan:wt.length},de);var jt=Object(y.a)(wt);return O.createElement($t,{className:"".concat(xe,"-tbody")},ot&&O.createElement("tr",{"aria-hidden":"true",className:"".concat(xe,"-measure-row"),style:{height:0}},jt.map(function(Tt){return O.createElement(Be,{key:Tt,columnKey:Tt,onColumnResize:Ae})})),Ot)},[Ye,xe,ne,ot,pe,tt,ke,gt,de,wt])}var Me=O.memo(Ce);Me.displayName="Body";var Le=Me,je=K("wRmb"),He=K("xEkU"),Je=K.n(He);function Se(Pe){var Ye=Object(O.useRef)(Pe),tt=Object(O.useState)({}),ot=Object(U.a)(tt,2),pe=ot[1],ne=Object(O.useRef)(null),ie=Object(O.useRef)([]);function de(ge){ne.current===null&&(ie.current=[],ne.current=Je()(function(){ie.current.forEach(function(se){Ye.current=se(Ye.current)}),ne.current=null,pe({})})),ie.current.push(ge)}return Object(O.useEffect)(function(){return function(){Je.a.cancel(ne.current)}},[]),[Ye.current,de]}function $(Pe){var Ye=Object(O.useRef)(Pe),tt=Object(O.useRef)(null);function ot(){window.clearTimeout(tt.current)}function pe(ie){Ye.current=ie,ot(),tt.current=window.setTimeout(function(){Ye.current=null,tt.current=null},100)}function ne(){return Ye.current}return Object(O.useEffect)(function(){return ot},[]),[pe,ne]}function D(Pe,Ye,tt){var ot=Object(O.useMemo)(function(){for(var pe=[],ne=[],ie=0,de=0,ge=0;ge<Ye;ge+=1)if(tt==="rtl"){ne[ge]=de,de+=Pe[ge]||0;var se=Ye-ge-1;pe[se]=ie,ie+=Pe[se]||0}else{pe[ge]=ie,ie+=Pe[ge]||0;var Ae=Ye-ge-1;ne[Ae]=de,de+=Pe[Ae]||0}return{left:pe,right:ne}},[Pe,Ye,tt]);return ot}var M=D;function te(Pe){var Ye=Pe.className,tt=Pe.children;return O.createElement("div",{className:Ye},tt)}var oe=te,G=K("n6Qo");function re(Pe){var Ye,tt=Pe.prefixCls,ot=Pe.record,pe=Pe.onExpand,ne=Pe.expanded,ie=Pe.expandable,de="".concat(tt,"-row-expand-icon");if(!ie)return O.createElement("span",{className:k()(de,"".concat(tt,"-row-spaced"))});var ge=function(Ae){pe(ot,Ae),Ae.stopPropagation()};return O.createElement("span",{className:k()(de,(Ye={},Object(fe.a)(Ye,"".concat(tt,"-row-expanded"),ne),Object(fe.a)(Ye,"".concat(tt,"-row-collapsed"),!ne),Ye)),onClick:ge})}function j(Pe,Ye,tt){var ot=[];function pe(ne){(ne||[]).forEach(function(ie,de){ot.push(Ye(ie,de)),pe(ie[tt])})}return pe(Pe),ot}var J=K("zT1h"),Y=K("y0+3"),he=function(Ye,tt){var ot,pe,ne=Ye.scrollBodyRef,ie=Ye.onScroll,de=Ye.offsetScroll,ge=O.useContext(r.a),se=ge.prefixCls,Ae=((ot=ne.current)===null||ot===void 0?void 0:ot.scrollWidth)||0,Ee=((pe=ne.current)===null||pe===void 0?void 0:pe.clientWidth)||0,xe=Ae&&Ee*(Ee/Ae),ke=O.useRef(),Qe=Se({scrollLeft:0,isHiddenScrollBar:!1}),nt=Object(U.a)(Qe,2),dt=nt[0],wt=nt[1],gt=O.useRef({delta:0,x:0}),$t=O.useState(!1),xt=Object(U.a)($t,2),ut=xt[0],Ot=xt[1],jt=function(){Ot(!1)},Tt=function(It){It.persist(),gt.current.delta=It.pageX-dt.scrollLeft,gt.current.x=0,Ot(!0),It.preventDefault()},Yt=function(It){var br,Mt=It||((br=window)===null||br===void 0?void 0:br.event),Pt=Mt.buttons;if(!ut||Pt===0){ut&&Ot(!1);return}var kt=gt.current.x+It.pageX-gt.current.x-gt.current.delta;kt<=0&&(kt=0),kt+xe>=Ee&&(kt=Ee-xe),ie({scrollLeft:kt/Ee*(Ae+2)}),gt.current.x=It.pageX},Qt=function(){var It=Object(Y.b)(ne.current).top,br=It+ne.current.offsetHeight,Mt=document.documentElement.scrollTop+window.innerHeight;br-Object(A.a)()<=Mt||It>=Mt-de?wt(function(Pt){return Object(W.a)(Object(W.a)({},Pt),{},{isHiddenScrollBar:!0})}):wt(function(Pt){return Object(W.a)(Object(W.a)({},Pt),{},{isHiddenScrollBar:!1})})},Xt=function(It){wt(function(br){return Object(W.a)(Object(W.a)({},br),{},{scrollLeft:It/Ae*Ee||0})})};return O.useImperativeHandle(tt,function(){return{setScrollLeft:Xt}}),O.useEffect(function(){var or=Object(J.a)(document.body,"mouseup",jt,!1),It=Object(J.a)(document.body,"mousemove",Yt,!1);return Qt(),function(){or.remove(),It.remove()}},[xe,ut]),O.useEffect(function(){var or=Object(J.a)(window,"scroll",Qt,!1),It=Object(J.a)(window,"resize",Qt,!1);return function(){or.remove(),It.remove()}},[]),O.useEffect(function(){dt.isHiddenScrollBar||wt(function(or){var It,br;return Object(W.a)(Object(W.a)({},or),{},{scrollLeft:ne.current.scrollLeft/((It=ne.current)===null||It===void 0?void 0:It.scrollWidth)*((br=ne.current)===null||br===void 0?void 0:br.clientWidth)})})},[dt.isHiddenScrollBar]),Ae<=Ee||!xe||dt.isHiddenScrollBar?null:O.createElement("div",{style:{height:Object(A.a)(),width:Ee,bottom:de},className:"".concat(se,"-sticky-scroll")},O.createElement("div",{onMouseDown:Tt,ref:ke,className:k()("".concat(se,"-sticky-scroll-bar"),Object(fe.a)({},"".concat(se,"-sticky-scroll-bar-active"),ut)),style:{width:"".concat(xe,"px"),transform:"translate3d(".concat(dt.scrollLeft,"px, 0, 0)")}}))},we=O.forwardRef(he);function Te(Pe,Ye){return O.useMemo(function(){var tt=!!Pe;return{isSticky:tt,stickyClassName:tt?"".concat(Ye,"-sticky-header"):"",offsetHeader:Object(V.a)(Pe)==="object"&&Pe.offsetHeader||0,offsetScroll:Object(V.a)(Pe)==="object"&&Pe.offsetScroll||0}},[Pe,Ye])}var Xe=[],Ze={},et="rc-table-internal-hook",rt=O.memo(function(Pe){var Ye=Pe.children;return Ye},function(Pe,Ye){return I()(Pe.props,Ye.props)?Pe.pingLeft!==Ye.pingLeft||Pe.pingRight!==Ye.pingRight:!1});function At(Pe){var Ye,tt=Pe.prefixCls,ot=Pe.className,pe=Pe.rowClassName,ne=Pe.style,ie=Pe.data,de=Pe.rowKey,ge=Pe.scroll,se=Pe.tableLayout,Ae=Pe.direction,Ee=Pe.title,xe=Pe.footer,ke=Pe.summary,Qe=Pe.id,nt=Pe.showHeader,dt=Pe.components,wt=Pe.emptyText,gt=Pe.onRow,$t=Pe.onHeaderRow,xt=Pe.internalHooks,ut=Pe.transformColumns,Ot=Pe.internalRefs,jt=Pe.sticky,Tt=ie||Xe,Yt=!!Tt.length,Qt=O.useState(0),Xt=Object(U.a)(Qt,2),or=Xt[0],It=Xt[1];O.useEffect(function(){It(Object(A.a)())});var br=O.useMemo(function(){return Object(y.c)(dt,{})},[dt]),Mt=O.useCallback(function(yr,vr){return Object(y.b)(br,yr)||vr},[br]),Pt=O.useMemo(function(){return typeof de=="function"?de:function(yr){var vr=yr&&yr[de];return vr}},[de]),kt=Object(c.c)(Pe),pr=kt.expandIcon,jr=kt.expandedRowKeys,ln=kt.defaultExpandedRowKeys,cr=kt.defaultExpandAllRows,Jt=kt.expandedRowRender,nr=kt.onExpand,Wt=kt.onExpandedRowsChange,Sr=kt.expandRowByClick,Zt=kt.rowExpandable,zr=kt.expandIconColumnIndex,sr=kt.expandedRowClassName,me=kt.childrenColumnName,ve=kt.indentSize,Ie=pr||re,Ke=me||"children",it=O.useMemo(function(){return Jt?"row":Pe.expandable&&xt===et&&Pe.expandable.__PARENT_RENDER_ICON__||Tt.some(function(yr){return yr&&Object(V.a)(yr)==="object"&&yr[Ke]})?"nest":!1},[!!Jt,Tt]),lt=O.useState(function(){return ln||(cr?j(Tt,Pt,Ke):[])}),ht=Object(U.a)(lt,2),vt=ht[0],ct=ht[1],yt=O.useMemo(function(){return new Set(jr||vt||[])},[jr,vt]),bt=O.useCallback(function(yr){var vr=Pt(yr,Tt.indexOf(yr)),Zr,gn=yt.has(vr);gn?(yt.delete(vr),Zr=Object(L.a)(yt)):Zr=[].concat(Object(L.a)(yt),[vr]),ct(Zr),nr&&nr(!gn,yr),Wt&&Wt(Zr)},[Pt,yt,Tt,nr,Wt]),Ht=O.useState(0),qt=Object(U.a)(Ht,2),er=qt[0],dr=qt[1],lr=Object(je.b)(Object(W.a)(Object(W.a)(Object(W.a)({},Pe),kt),{},{expandable:!!Jt,expandedKeys:yt,getRowKey:Pt,onTriggerExpand:bt,expandIcon:Ie,expandIconColumnIndex:zr,direction:Ae}),xt===et?ut:null),Ar=Object(U.a)(lr,2),Mr=Ar[0],zt=Ar[1],ir=O.useMemo(function(){return{columns:Mr,flattenColumns:zt}},[Mr,zt]),tr=O.useRef(),Ir=O.useRef(),gr=O.useRef(),Cr=O.useState(!1),Vt=Object(U.a)(Cr,2),Qr=Vt[0],Pr=Vt[1],Er=O.useState(!1),kr=Object(U.a)(Er,2),$r=kr[0],Xr=kr[1],Gr=Se(new Map),Or=Object(U.a)(Gr,2),Wr=Or[0],en=Or[1],un=Object(y.a)(zt),cn=un.map(function(yr){return Wr.get(yr)}),tn=O.useMemo(function(){return cn},[cn.join("_")]),Fr=M(tn,zt.length,Ae),mr=ge&&Object(y.d)(ge.y),Nr=ge&&Object(y.d)(ge.x),Hr=Nr&&zt.some(function(yr){var vr=yr.fixed;return vr}),dn=O.useRef(),vn=Te(jt,tt),fn=vn.isSticky,si=vn.offsetHeader,Jn=vn.offsetScroll,Pn=vn.stickyClassName,kn,$n,Kr;mr&&($n={overflowY:"scroll",maxHeight:ge.y}),Nr&&(kn={overflowX:"auto"},mr||($n={overflowY:"hidden"}),Kr={width:ge.x===!0?"auto":ge.x,minWidth:"100%"});var Zi=O.useCallback(function(yr,vr){en(function(Zr){var gn=new Map(Zr);return gn.set(yr,vr),gn})},[]),Hn=$(null),qi=Object(U.a)(Hn,2),ea=qi[0],oi=qi[1];function wi(yr,vr){if(!vr)return;typeof vr=="function"?vr(yr):vr.scrollLeft!==yr&&(vr.scrollLeft=yr)}var xn=function(vr){var Zr=vr.currentTarget,gn=vr.scrollLeft,qn=typeof gn=="number"?gn:Zr.scrollLeft,aa=Zr||Ze;if(!oi()||oi()===aa){var Oi;ea(aa),wi(qn,Ir.current),wi(qn,gr.current),wi(qn,(Oi=dn.current)===null||Oi===void 0?void 0:Oi.setScrollLeft)}if(Zr){var Na=Zr.scrollWidth,Ma=Zr.clientWidth;Pr(qn>0),Xr(qn<Na-Ma)}},Cn=function(){gr.current&&xn({currentTarget:gr.current})},ta=function(vr){var Zr=vr.width;Cn(),dr(tr.current?tr.current.offsetWidth:Zr)};O.useEffect(function(){return Cn},[]),O.useEffect(function(){Nr&&Cn()},[Nr]),O.useEffect(function(){xt===et&&Ot&&(Ot.body.current=gr.current)});var Ci=Mt(["table"],"table"),pn=O.useMemo(function(){return se||(Hr?ge.x==="max-content"?"auto":"fixed":mr||zt.some(function(yr){var vr=yr.ellipsis;return vr})?"fixed":"auto")},[mr,Hr,zt,se]),Ln,Zn={colWidths:tn,columCount:zt.length,stickyOffsets:Fr,onHeaderRow:$t,fixHeader:mr},ra=O.useMemo(function(){return Yt?null:typeof wt=="function"?wt():wt},[Yt,wt]),na=O.createElement(Le,{data:Tt,measureColumnWidth:mr||Nr||fn,expandedKeys:yt,rowExpandable:Zt,getRowKey:Pt,onRow:gt,emptyNode:ra,childrenColumnName:Ke}),Qn=O.createElement(u,{colWidths:zt.map(function(yr){var vr=yr.width;return vr}),columns:zt}),Kn=ke&&O.createElement(G.b,null,ke(Tt)),ia=Mt(["body"]);if(mr||fn){var Ti;typeof ia=="function"?(Ti=ia(Tt,{scrollbarSize:or,ref:gr,onScroll:xn}),Zn.colWidths=zt.map(function(yr,vr){var Zr=yr.width,gn=vr===Mr.length-1?Zr-or:Zr;return typeof gn=="number"&&!Number.isNaN(gn)?gn:(Object(d.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Ti=O.createElement("div",{style:Object(W.a)(Object(W.a)({},kn),$n),onScroll:xn,ref:gr,className:k()("".concat(tt,"-body"))},O.createElement(Ci,{style:Object(W.a)(Object(W.a)({},Kr),{},{tableLayout:pn})},Qn,na,Kn),fn&&O.createElement(we,{ref:dn,offsetScroll:Jn,scrollBodyRef:gr,onScroll:xn})),Ln=O.createElement(O.Fragment,null,nt!==!1&&O.createElement(m,Object.assign({noData:!Tt.length},Zn,ir,{direction:Ae,offsetHeader:si,stickyClassName:Pn,ref:Ir,onScroll:xn})),Ti)}else Ln=O.createElement("div",{style:Object(W.a)(Object(W.a)({},kn),$n),className:k()("".concat(tt,"-content")),onScroll:xn,ref:gr},O.createElement(Ci,{style:Object(W.a)(Object(W.a)({},Kr),{},{tableLayout:pn})},Qn,nt!==!1&&O.createElement(h,Object.assign({},Zn,ir)),na,Kn));var Fa=Object(c.b)(Pe),xi=O.createElement("div",Object.assign({className:k()(tt,ot,(Ye={},Object(fe.a)(Ye,"".concat(tt,"-rtl"),Ae==="rtl"),Object(fe.a)(Ye,"".concat(tt,"-ping-left"),Qr),Object(fe.a)(Ye,"".concat(tt,"-ping-right"),$r),Object(fe.a)(Ye,"".concat(tt,"-layout-fixed"),se==="fixed"),Object(fe.a)(Ye,"".concat(tt,"-fixed-header"),mr),Object(fe.a)(Ye,"".concat(tt,"-fixed-column"),Hr),Object(fe.a)(Ye,"".concat(tt,"-scroll-horizontal"),Nr),Object(fe.a)(Ye,"".concat(tt,"-has-fix-left"),zt[0]&&zt[0].fixed),Object(fe.a)(Ye,"".concat(tt,"-has-fix-right"),zt[zt.length-1]&&zt[zt.length-1].fixed==="right"),Ye)),style:ne,id:Qe,ref:tr},Fa),O.createElement(rt,{pingLeft:Qr,pingRight:$r,props:Object(W.a)(Object(W.a)({},Pe),{},{stickyOffsets:Fr,mergedExpandedKeys:yt})},Ee&&O.createElement(oe,{className:"".concat(tt,"-title")},Ee(Tt)),O.createElement("div",{className:"".concat(tt,"-container")},Ln),xe&&O.createElement(oe,{className:"".concat(tt,"-footer")},xe(Tt))));Nr&&(xi=O.createElement(p.a,{onResize:ta},xi));var Bi=O.useMemo(function(){return{prefixCls:tt,getComponent:Mt,scrollbarSize:or,direction:Ae,fixedInfoList:zt.map(function(yr,vr){return t(vr,vr,zt,Fr,Ae)}),isSticky:fn}},[tt,Mt,or,Ae,zt,Fr,Ae,fn]),Si=O.useMemo(function(){return Object(W.a)(Object(W.a)({},ir),{},{tableLayout:pn,rowClassName:pe,expandedRowClassName:sr,componentWidth:er,fixHeader:mr,fixColumn:Hr,horizonScroll:Nr,expandIcon:Ie,expandableType:it,expandRowByClick:Sr,expandedRowRender:Jt,onTriggerExpand:bt,expandIconColumnIndex:zr,indentSize:ve})},[ir,pn,pe,sr,er,mr,Hr,Nr,Ie,it,Sr,Jt,bt,zr,ve]),Ii=O.useMemo(function(){return{onColumnResize:Zi}},[Zi]);return O.createElement(r.a.Provider,{value:Bi},O.createElement(H.Provider,{value:Si},O.createElement(le.Provider,{value:Ii},xi)))}At.Column=i.a,At.ColumnGroup=s.a,At.Summary=G.a,At.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var pt=Oe.b=At},wOnQ:function(ft,Oe,K){/*!
|
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
* Released under MIT License
|
|
*/(function(fe,W){ft.exports=W()})(this,function(){"use strict";/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */var fe=function(w,f){return fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,S){R.__proto__=S}||function(R,S){for(var X in S)Object.prototype.hasOwnProperty.call(S,X)&&(R[X]=S[X])},fe(w,f)};function W(w,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");fe(w,f);function R(){this.constructor=w}w.prototype=f===null?Object.create(f):(R.prototype=f.prototype,new R)}var L=function(){return L=Object.assign||function(f){for(var R,S=1,X=arguments.length;S<X;S++){R=arguments[S];for(var ae in R)Object.prototype.hasOwnProperty.call(R,ae)&&(f[ae]=R[ae])}return f},L.apply(this,arguments)};function V(w,f,R,S){function X(ae){return ae instanceof R?ae:new R(function(_e){_e(ae)})}return new(R||(R=Promise))(function(ae,_e){function De($e){try{ze(S.next($e))}catch(at){_e(at)}}function Re($e){try{ze(S.throw($e))}catch(at){_e(at)}}function ze($e){$e.done?ae($e.value):X($e.value).then(De,Re)}ze((S=S.apply(w,f||[])).next())})}function U(w,f){var R={label:0,sent:function(){if(ae[0]&1)throw ae[1];return ae[1]},trys:[],ops:[]},S,X,ae,_e;return _e={next:De(0),throw:De(1),return:De(2)},typeof Symbol=="function"&&(_e[Symbol.iterator]=function(){return this}),_e;function De(ze){return function($e){return Re([ze,$e])}}function Re(ze){if(S)throw new TypeError("Generator is already executing.");for(;R;)try{if(S=1,X&&(ae=ze[0]&2?X.return:ze[0]?X.throw||((ae=X.return)&&ae.call(X),0):X.next)&&!(ae=ae.call(X,ze[1])).done)return ae;(X=0,ae)&&(ze=[ze[0]&2,ae.value]);switch(ze[0]){case 0:case 1:ae=ze;break;case 4:return R.label++,{value:ze[1],done:!1};case 5:R.label++,X=ze[1],ze=[0];continue;case 7:ze=R.ops.pop(),R.trys.pop();continue;default:if(!(ae=R.trys,ae=ae.length>0&&ae[ae.length-1])&&(ze[0]===6||ze[0]===2)){R=0;continue}if(ze[0]===3&&(!ae||ze[1]>ae[0]&&ze[1]<ae[3])){R.label=ze[1];break}if(ze[0]===6&&R.label<ae[1]){R.label=ae[1],ae=ze;break}if(ae&&R.label<ae[2]){R.label=ae[2],R.ops.push(ze);break}ae[2]&&R.ops.pop(),R.trys.pop();continue}ze=f.call(w,R)}catch($e){ze=[6,$e],X=0}finally{S=ae=0}if(ze[0]&5)throw ze[1];return{value:ze[0]?ze[1]:void 0,done:!0}}}function O(w,f,R){if(R||arguments.length===2)for(var S=0,X=f.length,ae;S<X;S++)(ae||!(S in f))&&(ae||(ae=Array.prototype.slice.call(f,0,S)),ae[S]=f[S]);return w.concat(ae||f)}for(var q=function(){function w(f,R,S,X){this.left=f,this.top=R,this.width=S,this.height=X}return w.prototype.add=function(f,R,S,X){return new w(this.left+f,this.top+R,this.width+S,this.height+X)},w.fromClientRect=function(f,R){return new w(R.left+f.windowBounds.left,R.top+f.windowBounds.top,R.width,R.height)},w.fromDOMRectList=function(f,R){var S=Array.from(R).find(function(X){return X.width!==0});return S?new w(S.left+f.windowBounds.left,S.top+f.windowBounds.top,S.width,S.height):w.EMPTY},w.EMPTY=new w(0,0,0,0),w}(),k=function(w,f){return q.fromClientRect(w,f.getBoundingClientRect())},e=function(w){var f=w.body,R=w.documentElement;if(!f||!R)throw new Error("Unable to get document size");var S=Math.max(Math.max(f.scrollWidth,R.scrollWidth),Math.max(f.offsetWidth,R.offsetWidth),Math.max(f.clientWidth,R.clientWidth)),X=Math.max(Math.max(f.scrollHeight,R.scrollHeight),Math.max(f.offsetHeight,R.offsetHeight),Math.max(f.clientHeight,R.clientHeight));return new q(0,0,S,X)},I=function(w){for(var f=[],R=0,S=w.length;R<S;){var X=w.charCodeAt(R++);if(X>=55296&&X<=56319&&R<S){var ae=w.charCodeAt(R++);(ae&64512)===56320?f.push(((X&1023)<<10)+(ae&1023)+65536):(f.push(X),R--)}else f.push(X)}return f},d=function(){for(var w=[],f=0;f<arguments.length;f++)w[f]=arguments[f];if(String.fromCodePoint)return String.fromCodePoint.apply(String,w);var R=w.length;if(!R)return"";for(var S=[],X=-1,ae="";++X<R;){var _e=w[X];_e<=65535?S.push(_e):(_e-=65536,S.push((_e>>10)+55296,_e%1024+56320)),(X+1===R||S.length>16384)&&(ae+=String.fromCharCode.apply(String,S),S.length=0)}return ae},p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),s=0;s<p.length;s++)A[p.charCodeAt(s)]=s;for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n<i.length;n++)o[i.charCodeAt(n)]=n;for(var a=function(w){var f=w.length*.75,R=w.length,S,X=0,ae,_e,De,Re;w[w.length-1]==="="&&(f--,w[w.length-2]==="="&&f--);var ze=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(f):new Array(f),$e=Array.isArray(ze)?ze:new Uint8Array(ze);for(S=0;S<R;S+=4)ae=o[w.charCodeAt(S)],_e=o[w.charCodeAt(S+1)],De=o[w.charCodeAt(S+2)],Re=o[w.charCodeAt(S+3)],$e[X++]=ae<<2|_e>>4,$e[X++]=(_e&15)<<4|De>>2,$e[X++]=(De&3)<<6|Re&63;return ze},r=function(w){for(var f=w.length,R=[],S=0;S<f;S+=2)R.push(w[S+1]<<8|w[S]);return R},t=function(w){for(var f=w.length,R=[],S=0;S<f;S+=4)R.push(w[S+3]<<24|w[S+2]<<16|w[S+1]<<8|w[S]);return R},y=5,b=6+5,E=2,T=b-y,C=65536>>y,h=1<<y,c=h-1,l=1024>>y,u=C+l,_=u,g=2048>>6,m=_+g,F=65536>>b,H=1<<T,B=H-1,Q=function(w,f,R){return w.slice?w.slice(f,R):new Uint16Array(Array.prototype.slice.call(w,f,R))},z=function(w,f,R){return w.slice?w.slice(f,R):new Uint32Array(Array.prototype.slice.call(w,f,R))},N=function(w,f){var R=a(w),S=Array.isArray(R)?t(R):new Uint32Array(R),X=Array.isArray(R)?r(R):new Uint16Array(R),ae=24,_e=Q(X,ae/2,S[4]/2),De=S[5]===2?Q(X,(ae+S[4])/2):z(S,Math.ceil((ae+S[4])/4));return new ee(S[0],S[1],S[2],S[3],_e,De)},ee=function(){function w(f,R,S,X,ae,_e){this.initialValue=f,this.errorValue=R,this.highStart=S,this.highValueIndex=X,this.index=ae,this.data=_e}return w.prototype.get=function(f){var R;if(f>=0){if(f<55296||f>56319&&f<=65535)return R=this.index[f>>y],R=(R<<E)+(f&c),this.data[R];if(f<=65535)return R=this.index[C+(f-55296>>y)],R=(R<<E)+(f&c),this.data[R];if(f<this.highStart)return R=m-F+(f>>b),R=this.index[R],R+=f>>y&B,R=this.index[R],R=(R<<E)+(f&c),this.data[R];if(f<=1114111)return this.data[this.highValueIndex]}return this.errorValue},w}(),le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Be=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ce=0;Ce<le.length;Ce++)Be[le.charCodeAt(Ce)]=Ce;var Me="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",Le=50,je=1,He=2,Je=3,Se=4,$=5,D=7,M=8,te=9,oe=10,G=11,re=12,j=13,J=14,Y=15,he=16,we=17,Te=18,Xe=19,Ze=20,et=21,rt=22,At=23,pt=24,Pe=25,Ye=26,tt=27,ot=28,pe=29,ne=30,ie=31,de=32,ge=33,se=34,Ae=35,Ee=36,xe=37,ke=38,Qe=39,nt=40,dt=41,wt=42,gt=43,$t=[9001,65288],xt="!",ut="\xD7",Ot="\xF7",jt=N(Me),Tt=[ne,Ee],Yt=[je,He,Je,$],Qt=[oe,M],Xt=[tt,Ye],or=Yt.concat(Qt),It=[ke,Qe,nt,se,Ae],br=[Y,j],Mt=function(w,f){f===void 0&&(f="strict");var R=[],S=[],X=[];return w.forEach(function(ae,_e){var De=jt.get(ae);if(De>Le?(X.push(!0),De-=Le):X.push(!1),["normal","auto","loose"].indexOf(f)!==-1&&[8208,8211,12316,12448].indexOf(ae)!==-1)return S.push(_e),R.push(he);if(De===Se||De===G){if(_e===0)return S.push(_e),R.push(ne);var Re=R[_e-1];return or.indexOf(Re)===-1?(S.push(S[_e-1]),R.push(Re)):(S.push(_e),R.push(ne))}if(S.push(_e),De===ie)return R.push(f==="strict"?et:xe);if(De===wt)return R.push(ne);if(De===pe)return R.push(ne);if(De===gt)return ae>=131072&&ae<=196605||ae>=196608&&ae<=262141?R.push(xe):R.push(ne);R.push(De)}),[S,R,X]},Pt=function(w,f,R,S){var X=S[R];if(Array.isArray(w)?w.indexOf(X)!==-1:w===X)for(var ae=R;ae<=S.length;){ae++;var _e=S[ae];if(_e===f)return!0;if(_e!==oe)break}if(X===oe)for(var ae=R;ae>0;){ae--;var De=S[ae];if(Array.isArray(w)?w.indexOf(De)!==-1:w===De)for(var Re=R;Re<=S.length;){Re++;var _e=S[Re];if(_e===f)return!0;if(_e!==oe)break}if(De!==oe)break}return!1},kt=function(w,f){for(var R=w;R>=0;){var S=f[R];if(S===oe)R--;else return S}return 0},pr=function(w,f,R,S,X){if(R[S]===0)return ut;var ae=S-1;if(Array.isArray(X)&&X[ae]===!0)return ut;var _e=ae-1,De=ae+1,Re=f[ae],ze=_e>=0?f[_e]:0,$e=f[De];if(Re===He&&$e===Je)return ut;if(Yt.indexOf(Re)!==-1)return xt;if(Yt.indexOf($e)!==-1)return ut;if(Qt.indexOf($e)!==-1)return ut;if(kt(ae,f)===M)return Ot;if(jt.get(w[ae])===G)return ut;if((Re===de||Re===ge)&&jt.get(w[De])===G)return ut;if(Re===D||$e===D)return ut;if(Re===te)return ut;if([oe,j,Y].indexOf(Re)===-1&&$e===te)return ut;if([we,Te,Xe,pt,ot].indexOf($e)!==-1)return ut;if(kt(ae,f)===rt)return ut;if(Pt(At,rt,ae,f))return ut;if(Pt([we,Te],et,ae,f))return ut;if(Pt(re,re,ae,f))return ut;if(Re===oe)return Ot;if(Re===At||$e===At)return ut;if($e===he||Re===he)return Ot;if([j,Y,et].indexOf($e)!==-1||Re===J)return ut;if(ze===Ee&&br.indexOf(Re)!==-1)return ut;if(Re===ot&&$e===Ee)return ut;if($e===Ze)return ut;if(Tt.indexOf($e)!==-1&&Re===Pe||Tt.indexOf(Re)!==-1&&$e===Pe)return ut;if(Re===tt&&[xe,de,ge].indexOf($e)!==-1||[xe,de,ge].indexOf(Re)!==-1&&$e===Ye)return ut;if(Tt.indexOf(Re)!==-1&&Xt.indexOf($e)!==-1||Xt.indexOf(Re)!==-1&&Tt.indexOf($e)!==-1)return ut;if([tt,Ye].indexOf(Re)!==-1&&($e===Pe||[rt,Y].indexOf($e)!==-1&&f[De+1]===Pe)||[rt,Y].indexOf(Re)!==-1&&$e===Pe||Re===Pe&&[Pe,ot,pt].indexOf($e)!==-1)return ut;if([Pe,ot,pt,we,Te].indexOf($e)!==-1)for(var at=ae;at>=0;){var st=f[at];if(st===Pe)return ut;if([ot,pt].indexOf(st)!==-1)at--;else break}if([tt,Ye].indexOf($e)!==-1)for(var at=[we,Te].indexOf(Re)!==-1?_e:ae;at>=0;){var st=f[at];if(st===Pe)return ut;if([ot,pt].indexOf(st)!==-1)at--;else break}if(ke===Re&&[ke,Qe,se,Ae].indexOf($e)!==-1||[Qe,se].indexOf(Re)!==-1&&[Qe,nt].indexOf($e)!==-1||[nt,Ae].indexOf(Re)!==-1&&$e===nt)return ut;if(It.indexOf(Re)!==-1&&[Ze,Ye].indexOf($e)!==-1||It.indexOf($e)!==-1&&Re===tt)return ut;if(Tt.indexOf(Re)!==-1&&Tt.indexOf($e)!==-1)return ut;if(Re===pt&&Tt.indexOf($e)!==-1)return ut;if(Tt.concat(Pe).indexOf(Re)!==-1&&$e===rt&&$t.indexOf(w[De])===-1||Tt.concat(Pe).indexOf($e)!==-1&&Re===Te)return ut;if(Re===dt&&$e===dt){for(var Ut=R[ae],_t=1;Ut>0&&(Ut--,f[Ut]===dt);)_t++;if(_t%2!==0)return ut}return Re===de&&$e===ge?ut:Ot},jr=function(w,f){f||(f={lineBreak:"normal",wordBreak:"normal"});var R=Mt(w,f.lineBreak),S=R[0],X=R[1],ae=R[2];(f.wordBreak==="break-all"||f.wordBreak==="break-word")&&(X=X.map(function(De){return[Pe,ne,wt].indexOf(De)!==-1?xe:De}));var _e=f.wordBreak==="keep-all"?ae.map(function(De,Re){return De&&w[Re]>=19968&&w[Re]<=40959}):void 0;return[S,X,_e]},ln=function(){function w(f,R,S,X){this.codePoints=f,this.required=R===xt,this.start=S,this.end=X}return w.prototype.slice=function(){return d.apply(void 0,this.codePoints.slice(this.start,this.end))},w}(),cr=function(w,f){var R=I(w),S=jr(R,f),X=S[0],ae=S[1],_e=S[2],De=R.length,Re=0,ze=0;return{next:function(){if(ze>=De)return{done:!0,value:null};for(var $e=ut;ze<De&&($e=pr(R,ae,X,++ze,_e))===ut;);if($e!==ut||ze===De){var at=new ln(R,$e,Re,ze);return Re=ze,{value:at,done:!1}}return{done:!0,value:null}}}},Jt=1<<0,nr=1<<1,Wt=1<<2,Sr=1<<3,Zt=10,zr=47,sr=92,me=9,ve=32,Ie=34,Ke=61,it=35,lt=36,ht=37,vt=39,ct=40,yt=41,bt=95,Ht=45,qt=33,er=60,dr=62,lr=64,Ar=91,Mr=93,zt=61,ir=123,tr=63,Ir=125,gr=124,Cr=126,Vt=128,Qr=65533,Pr=42,Er=43,kr=44,$r=58,Xr=59,Gr=46,Or=0,Wr=8,en=11,un=14,cn=31,tn=127,Fr=-1,mr=48,Nr=97,Hr=101,dn=102,vn=117,fn=122,si=65,Jn=69,Pn=70,kn=85,$n=90,Kr=function(w){return w>=mr&&w<=57},Zi=function(w){return w>=55296&&w<=57343},Hn=function(w){return Kr(w)||w>=si&&w<=Pn||w>=Nr&&w<=dn},qi=function(w){return w>=Nr&&w<=fn},ea=function(w){return w>=si&&w<=$n},oi=function(w){return qi(w)||ea(w)},wi=function(w){return w>=Vt},xn=function(w){return w===Zt||w===me||w===ve},Cn=function(w){return oi(w)||wi(w)||w===bt},ta=function(w){return Cn(w)||Kr(w)||w===Ht},Ci=function(w){return w>=Or&&w<=Wr||w===en||w>=un&&w<=cn||w===tn},pn=function(w,f){return w!==sr?!1:f!==Zt},Ln=function(w,f,R){return w===Ht?Cn(f)||pn(f,R):Cn(w)?!0:!!(w===sr&&pn(w,f))},Zn=function(w,f,R){return w===Er||w===Ht?Kr(f)?!0:f===Gr&&Kr(R):w===Gr?Kr(f):Kr(w)},ra=function(w){var f=0,R=1;(w[f]===Er||w[f]===Ht)&&(w[f]===Ht&&(R=-1),f++);for(var S=[];Kr(w[f]);)S.push(w[f++]);var X=S.length?parseInt(d.apply(void 0,S),10):0;w[f]===Gr&&f++;for(var ae=[];Kr(w[f]);)ae.push(w[f++]);var _e=ae.length,De=_e?parseInt(d.apply(void 0,ae),10):0;(w[f]===Jn||w[f]===Hr)&&f++;var Re=1;(w[f]===Er||w[f]===Ht)&&(w[f]===Ht&&(Re=-1),f++);for(var ze=[];Kr(w[f]);)ze.push(w[f++]);var $e=ze.length?parseInt(d.apply(void 0,ze),10):0;return R*(X+De*Math.pow(10,-_e))*Math.pow(10,Re*$e)},na={type:2},Qn={type:3},Kn={type:4},ia={type:13},Ti={type:8},Fa={type:21},xi={type:9},Bi={type:10},Si={type:11},Ii={type:12},yr={type:14},vr={type:23},Zr={type:1},gn={type:25},qn={type:24},aa={type:26},Oi={type:27},Na={type:28},Ma={type:29},Wo={type:31},sa={type:32},_s=function(){function w(){this._value=[]}return w.prototype.write=function(f){this._value=this._value.concat(I(f))},w.prototype.read=function(){for(var f=[],R=this.consumeToken();R!==sa;)f.push(R),R=this.consumeToken();return f},w.prototype.consumeToken=function(){var f=this.consumeCodePoint();switch(f){case Ie:return this.consumeStringToken(Ie);case it:var R=this.peekCodePoint(0),S=this.peekCodePoint(1),X=this.peekCodePoint(2);if(ta(R)||pn(S,X)){var ae=Ln(R,S,X)?nr:Jt,_e=this.consumeName();return{type:5,value:_e,flags:ae}}break;case lt:if(this.peekCodePoint(0)===Ke)return this.consumeCodePoint(),ia;break;case vt:return this.consumeStringToken(vt);case ct:return na;case yt:return Qn;case Pr:if(this.peekCodePoint(0)===Ke)return this.consumeCodePoint(),yr;break;case Er:if(Zn(f,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(f),this.consumeNumericToken();break;case kr:return Kn;case Ht:var De=f,Re=this.peekCodePoint(0),ze=this.peekCodePoint(1);if(Zn(De,Re,ze))return this.reconsumeCodePoint(f),this.consumeNumericToken();if(Ln(De,Re,ze))return this.reconsumeCodePoint(f),this.consumeIdentLikeToken();if(Re===Ht&&ze===dr)return this.consumeCodePoint(),this.consumeCodePoint(),qn;break;case Gr:if(Zn(f,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(f),this.consumeNumericToken();break;case zr:if(this.peekCodePoint(0)===Pr)for(this.consumeCodePoint();;){var $e=this.consumeCodePoint();if($e===Pr&&($e=this.consumeCodePoint(),$e===zr))return this.consumeToken();if($e===Fr)return this.consumeToken()}break;case $r:return aa;case Xr:return Oi;case er:if(this.peekCodePoint(0)===qt&&this.peekCodePoint(1)===Ht&&this.peekCodePoint(2)===Ht)return this.consumeCodePoint(),this.consumeCodePoint(),gn;break;case lr:var at=this.peekCodePoint(0),st=this.peekCodePoint(1),Ut=this.peekCodePoint(2);if(Ln(at,st,Ut)){var _e=this.consumeName();return{type:7,value:_e}}break;case Ar:return Na;case sr:if(pn(f,this.peekCodePoint(0)))return this.reconsumeCodePoint(f),this.consumeIdentLikeToken();break;case Mr:return Ma;case zt:if(this.peekCodePoint(0)===Ke)return this.consumeCodePoint(),Ti;break;case ir:return Si;case Ir:return Ii;case vn:case kn:var _t=this.peekCodePoint(0),St=this.peekCodePoint(1);return _t===Er&&(Hn(St)||St===tr)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(f),this.consumeIdentLikeToken();case gr:if(this.peekCodePoint(0)===Ke)return this.consumeCodePoint(),xi;if(this.peekCodePoint(0)===gr)return this.consumeCodePoint(),Fa;break;case Cr:if(this.peekCodePoint(0)===Ke)return this.consumeCodePoint(),Bi;break;case Fr:return sa}return xn(f)?(this.consumeWhiteSpace(),Wo):Kr(f)?(this.reconsumeCodePoint(f),this.consumeNumericToken()):Cn(f)?(this.reconsumeCodePoint(f),this.consumeIdentLikeToken()):{type:6,value:d(f)}},w.prototype.consumeCodePoint=function(){var f=this._value.shift();return typeof f=="undefined"?-1:f},w.prototype.reconsumeCodePoint=function(f){this._value.unshift(f)},w.prototype.peekCodePoint=function(f){return f>=this._value.length?-1:this._value[f]},w.prototype.consumeUnicodeRangeToken=function(){for(var f=[],R=this.consumeCodePoint();Hn(R)&&f.length<6;)f.push(R),R=this.consumeCodePoint();for(var S=!1;R===tr&&f.length<6;)f.push(R),R=this.consumeCodePoint(),S=!0;if(S){var X=parseInt(d.apply(void 0,f.map(function(Re){return Re===tr?mr:Re})),16),ae=parseInt(d.apply(void 0,f.map(function(Re){return Re===tr?Pn:Re})),16);return{type:30,start:X,end:ae}}var _e=parseInt(d.apply(void 0,f),16);if(this.peekCodePoint(0)===Ht&&Hn(this.peekCodePoint(1))){this.consumeCodePoint(),R=this.consumeCodePoint();for(var De=[];Hn(R)&&De.length<6;)De.push(R),R=this.consumeCodePoint();var ae=parseInt(d.apply(void 0,De),16);return{type:30,start:_e,end:ae}}else return{type:30,start:_e,end:_e}},w.prototype.consumeIdentLikeToken=function(){var f=this.consumeName();return f.toLowerCase()==="url"&&this.peekCodePoint(0)===ct?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===ct?(this.consumeCodePoint(),{type:19,value:f}):{type:20,value:f}},w.prototype.consumeUrlToken=function(){var f=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Fr)return{type:22,value:""};var R=this.peekCodePoint(0);if(R===vt||R===Ie){var S=this.consumeStringToken(this.consumeCodePoint());return S.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Fr||this.peekCodePoint(0)===yt)?(this.consumeCodePoint(),{type:22,value:S.value}):(this.consumeBadUrlRemnants(),vr)}for(;;){var X=this.consumeCodePoint();if(X===Fr||X===yt)return{type:22,value:d.apply(void 0,f)};if(xn(X))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Fr||this.peekCodePoint(0)===yt?(this.consumeCodePoint(),{type:22,value:d.apply(void 0,f)}):(this.consumeBadUrlRemnants(),vr);if(X===Ie||X===vt||X===ct||Ci(X))return this.consumeBadUrlRemnants(),vr;if(X===sr)if(pn(X,this.peekCodePoint(0)))f.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),vr;else f.push(X)}},w.prototype.consumeWhiteSpace=function(){for(;xn(this.peekCodePoint(0));)this.consumeCodePoint()},w.prototype.consumeBadUrlRemnants=function(){for(;;){var f=this.consumeCodePoint();if(f===yt||f===Fr)return;pn(f,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},w.prototype.consumeStringSlice=function(f){for(var R=5e4,S="";f>0;){var X=Math.min(R,f);S+=d.apply(void 0,this._value.splice(0,X)),f-=X}return this._value.shift(),S},w.prototype.consumeStringToken=function(f){var R="",S=0;do{var X=this._value[S];if(X===Fr||X===void 0||X===f)return R+=this.consumeStringSlice(S),{type:0,value:R};if(X===Zt)return this._value.splice(0,S),Zr;if(X===sr){var ae=this._value[S+1];ae!==Fr&&ae!==void 0&&(ae===Zt?(R+=this.consumeStringSlice(S),S=-1,this._value.shift()):pn(X,ae)&&(R+=this.consumeStringSlice(S),R+=d(this.consumeEscapedCodePoint()),S=-1))}S++}while(!0)},w.prototype.consumeNumber=function(){var f=[],R=Wt,S=this.peekCodePoint(0);for((S===Er||S===Ht)&&f.push(this.consumeCodePoint());Kr(this.peekCodePoint(0));)f.push(this.consumeCodePoint());S=this.peekCodePoint(0);var X=this.peekCodePoint(1);if(S===Gr&&Kr(X))for(f.push(this.consumeCodePoint(),this.consumeCodePoint()),R=Sr;Kr(this.peekCodePoint(0));)f.push(this.consumeCodePoint());S=this.peekCodePoint(0),X=this.peekCodePoint(1);var ae=this.peekCodePoint(2);if((S===Jn||S===Hr)&&((X===Er||X===Ht)&&Kr(ae)||Kr(X)))for(f.push(this.consumeCodePoint(),this.consumeCodePoint()),R=Sr;Kr(this.peekCodePoint(0));)f.push(this.consumeCodePoint());return[ra(f),R]},w.prototype.consumeNumericToken=function(){var f=this.consumeNumber(),R=f[0],S=f[1],X=this.peekCodePoint(0),ae=this.peekCodePoint(1),_e=this.peekCodePoint(2);if(Ln(X,ae,_e)){var De=this.consumeName();return{type:15,number:R,flags:S,unit:De}}return X===ht?(this.consumeCodePoint(),{type:16,number:R,flags:S}):{type:17,number:R,flags:S}},w.prototype.consumeEscapedCodePoint=function(){var f=this.consumeCodePoint();if(Hn(f)){for(var R=d(f);Hn(this.peekCodePoint(0))&&R.length<6;)R+=d(this.consumeCodePoint());xn(this.peekCodePoint(0))&&this.consumeCodePoint();var S=parseInt(R,16);return S===0||Zi(S)||S>1114111?Qr:S}return f===Fr?Qr:f},w.prototype.consumeName=function(){for(var f="";;){var R=this.consumeCodePoint();if(ta(R))f+=d(R);else if(pn(R,this.peekCodePoint(0)))f+=d(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(R),f}},w}(),ws=function(){function w(f){this._tokens=f}return w.create=function(f){var R=new _s;return R.write(f),new w(R.read())},w.parseValue=function(f){return w.create(f).parseComponentValue()},w.parseValues=function(f){return w.create(f).parseComponentValues()},w.prototype.parseComponentValue=function(){for(var f=this.consumeToken();f.type===31;)f=this.consumeToken();if(f.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(f);var R=this.consumeComponentValue();do f=this.consumeToken();while(f.type===31);if(f.type===32)return R;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},w.prototype.parseComponentValues=function(){for(var f=[];;){var R=this.consumeComponentValue();if(R.type===32)return f;f.push(R),f.push()}},w.prototype.consumeComponentValue=function(){var f=this.consumeToken();switch(f.type){case 11:case 28:case 2:return this.consumeSimpleBlock(f.type);case 19:return this.consumeFunction(f)}return f},w.prototype.consumeSimpleBlock=function(f){for(var R={type:f,values:[]},S=this.consumeToken();;){if(S.type===32||Vo(S,f))return R;this.reconsumeToken(S),R.values.push(this.consumeComponentValue()),S=this.consumeToken()}},w.prototype.consumeFunction=function(f){for(var R={name:f.value,values:[],type:18};;){var S=this.consumeToken();if(S.type===32||S.type===3)return R;this.reconsumeToken(S),R.values.push(this.consumeComponentValue())}},w.prototype.consumeToken=function(){var f=this._tokens.shift();return typeof f=="undefined"?sa:f},w.prototype.reconsumeToken=function(f){this._tokens.unshift(f)},w}(),Ri=function(w){return w.type===15},li=function(w){return w.type===17},Rr=function(w){return w.type===20},Go=function(w){return w.type===0},Di=function(w,f){return Rr(w)&&w.value===f},Cs=function(w){return w.type!==31},jn=function(w){return w.type!==31&&w.type!==4},Bn=function(w){var f=[],R=[];return w.forEach(function(S){if(S.type===4){if(R.length===0)throw new Error("Error parsing function args, zero tokens for arg");f.push(R),R=[];return}S.type!==31&&R.push(S)}),R.length&&f.push(R),f},Vo=function(w,f){return f===11&&w.type===12||f===28&&w.type===29?!0:f===2&&w.type===3},Un=function(w){return w.type===17||w.type===15},qr=function(w){return w.type===16||Un(w)},Ts=function(w){return w.length>1?[w[0],w[1]]:[w[0]]},sn={type:17,number:0,flags:Wt},Pa={type:16,number:50,flags:Wt},In={type:16,number:100,flags:Wt},Fn=function(w,f,R){var S=w[0],X=w[1];return[Dr(S,f),Dr(typeof X!="undefined"?X:S,R)]},Dr=function(w,f){if(w.type===16)return w.number/100*f;if(Ri(w))switch(w.unit){case"rem":case"em":return 16*w.number;case"px":default:return w.number}return w.number},Wn="deg",Ai="grad",ka="rad",oa="turn",ui={name:"angle",parse:function(w,f){if(f.type===15)switch(f.unit){case Wn:return Math.PI*f.number/180;case Ai:return Math.PI/200*f.number;case ka:return f.number;case oa:return Math.PI*2*f.number}throw new Error("Unsupported angle type")}},Ha=function(w){return w.type===15&&(w.unit===Wn||w.unit===Ai||w.unit===ka||w.unit===oa)},xs=function(w){var f=w.filter(Rr).map(function(R){return R.value}).join(" ");switch(f){case"to bottom right":case"to right bottom":case"left top":case"top left":return[sn,sn];case"to top":case"bottom":return yn(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[sn,In];case"to right":case"left":return yn(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[In,In];case"to bottom":case"top":return yn(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[In,sn];case"to left":case"right":return yn(270)}return 0},yn=function(w){return Math.PI*w/180},Gn={name:"color",parse:function(w,f){if(f.type===18){var R=zo[f.name];if(typeof R=="undefined")throw new Error('Attempting to parse an unsupported color function "'+f.name+'"');return R(w,f.values)}if(f.type===5){if(f.value.length===3){var S=f.value.substring(0,1),X=f.value.substring(1,2),ae=f.value.substring(2,3);return zn(parseInt(S+S,16),parseInt(X+X,16),parseInt(ae+ae,16),1)}if(f.value.length===4){var S=f.value.substring(0,1),X=f.value.substring(1,2),ae=f.value.substring(2,3),_e=f.value.substring(3,4);return zn(parseInt(S+S,16),parseInt(X+X,16),parseInt(ae+ae,16),parseInt(_e+_e,16)/255)}if(f.value.length===6){var S=f.value.substring(0,2),X=f.value.substring(2,4),ae=f.value.substring(4,6);return zn(parseInt(S,16),parseInt(X,16),parseInt(ae,16),1)}if(f.value.length===8){var S=f.value.substring(0,2),X=f.value.substring(2,4),ae=f.value.substring(4,6),_e=f.value.substring(6,8);return zn(parseInt(S,16),parseInt(X,16),parseInt(ae,16),parseInt(_e,16)/255)}}if(f.type===20){var De=Nn[f.value.toUpperCase()];if(typeof De!="undefined")return De}return Nn.TRANSPARENT}},Vn=function(w){return(255&w)===0},rn=function(w){var f=255&w,R=255&w>>8,S=255&w>>16,X=255&w>>24;return f<255?"rgba("+X+","+S+","+R+","+f/255+")":"rgb("+X+","+S+","+R+")"},zn=function(w,f,R,S){return(w<<24|f<<16|R<<8|Math.round(S*255)<<0)>>>0},Bs=function(w,f){if(w.type===17)return w.number;if(w.type===16){var R=f===3?1:255;return f===3?w.number/100*R:Math.round(w.number/100*R)}return 0},Qa=function(w,f){var R=f.filter(jn);if(R.length===3){var S=R.map(Bs),X=S[0],ae=S[1],_e=S[2];return zn(X,ae,_e,1)}if(R.length===4){var De=R.map(Bs),X=De[0],ae=De[1],_e=De[2],Re=De[3];return zn(X,ae,_e,Re)}return 0};function Ka(w,f,R){return R<0&&(R+=1),R>=1&&(R-=1),R<1/6?(f-w)*R*6+w:R<1/2?f:R<2/3?(f-w)*6*(2/3-R)+w:w}var Ss=function(w,f){var R=f.filter(jn),S=R[0],X=R[1],ae=R[2],_e=R[3],De=(S.type===17?yn(S.number):ui.parse(w,S))/(Math.PI*2),Re=qr(X)?X.number/100:0,ze=qr(ae)?ae.number/100:0,$e=typeof _e!="undefined"&&qr(_e)?Dr(_e,1):1;if(Re===0)return zn(ze*255,ze*255,ze*255,1);var at=ze<=.5?ze*(Re+1):ze+Re-ze*Re,st=ze*2-at,Ut=Ka(st,at,De+1/3),_t=Ka(st,at,De),St=Ka(st,at,De-1/3);return zn(Ut*255,_t*255,St*255,$e)},zo={hsl:Ss,hsla:Ss,rgb:Qa,rgba:Qa},Li=function(w,f){return Gn.parse(w,ws.create(f).parseComponentValue())},Nn={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Xo={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(w,f){return f.map(function(R){if(Rr(R))switch(R.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Yo={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},la=function(w,f){var R=Gn.parse(w,f[0]),S=f[1];return S&&qr(S)?{color:R,stop:S}:{color:R,stop:null}},Is=function(w,f){var R=w[0],S=w[w.length-1];R.stop===null&&(R.stop=sn),S.stop===null&&(S.stop=In);for(var X=[],ae=0,_e=0;_e<w.length;_e++){var De=w[_e].stop;if(De!==null){var Re=Dr(De,f);Re>ae?X.push(Re):X.push(ae),ae=Re}else X.push(null)}for(var ze=null,_e=0;_e<X.length;_e++){var $e=X[_e];if($e===null)ze===null&&(ze=_e);else if(ze!==null){for(var at=_e-ze,st=X[ze-1],Ut=($e-st)/(at+1),_t=1;_t<=at;_t++)X[ze+_t-1]=Ut*_t;ze=null}}return w.map(function(St,rr){var Lt=St.color;return{color:Lt,stop:Math.max(Math.min(1,X[rr]/f),0)}})},Ui=function(w,f,R){var S=f/2,X=R/2,ae=Dr(w[0],f)-S,_e=X-Dr(w[1],R);return(Math.atan2(_e,ae)+Math.PI*2)%(Math.PI*2)},Aa=function(w,f,R){var S=typeof w=="number"?w:Ui(w,f,R),X=Math.abs(f*Math.sin(S))+Math.abs(R*Math.cos(S)),ae=f/2,_e=R/2,De=X/2,Re=Math.sin(S-Math.PI/2)*De,ze=Math.cos(S-Math.PI/2)*De;return[X,ae-ze,ae+ze,_e-Re,_e+Re]},bn=function(w,f){return Math.sqrt(w*w+f*f)},Os=function(w,f,R,S,X){var ae=[[0,0],[0,f],[w,0],[w,f]];return ae.reduce(function(_e,De){var Re=De[0],ze=De[1],$e=bn(R-Re,S-ze);return(X?$e<_e.optimumDistance:$e>_e.optimumDistance)?{optimumCorner:De,optimumDistance:$e}:_e},{optimumDistance:X?Infinity:-Infinity,optimumCorner:null}).optimumCorner},Jo=function(w,f,R,S,X){var ae=0,_e=0;switch(w.size){case 0:w.shape===0?ae=_e=Math.min(Math.abs(f),Math.abs(f-S),Math.abs(R),Math.abs(R-X)):w.shape===1&&(ae=Math.min(Math.abs(f),Math.abs(f-S)),_e=Math.min(Math.abs(R),Math.abs(R-X)));break;case 2:if(w.shape===0)ae=_e=Math.min(bn(f,R),bn(f,R-X),bn(f-S,R),bn(f-S,R-X));else if(w.shape===1){var De=Math.min(Math.abs(R),Math.abs(R-X))/Math.min(Math.abs(f),Math.abs(f-S)),Re=Os(S,X,f,R,!0),ze=Re[0],$e=Re[1];ae=bn(ze-f,($e-R)/De),_e=De*ae}break;case 1:w.shape===0?ae=_e=Math.max(Math.abs(f),Math.abs(f-S),Math.abs(R),Math.abs(R-X)):w.shape===1&&(ae=Math.max(Math.abs(f),Math.abs(f-S)),_e=Math.max(Math.abs(R),Math.abs(R-X)));break;case 3:if(w.shape===0)ae=_e=Math.max(bn(f,R),bn(f,R-X),bn(f-S,R),bn(f-S,R-X));else if(w.shape===1){var De=Math.max(Math.abs(R),Math.abs(R-X))/Math.max(Math.abs(f),Math.abs(f-S)),at=Os(S,X,f,R,!1),ze=at[0],$e=at[1];ae=bn(ze-f,($e-R)/De),_e=De*ae}break}return Array.isArray(w.size)&&(ae=Dr(w.size[0],S),_e=w.size.length===2?Dr(w.size[1],X):ae),[ae,_e]},$o=function(w,f){var R=yn(180),S=[];return Bn(f).forEach(function(X,ae){if(ae===0){var _e=X[0];if(_e.type===20&&_e.value==="to"){R=xs(X);return}else if(Ha(_e)){R=ui.parse(w,_e);return}}var De=la(w,X);S.push(De)}),{angle:R,stops:S,type:1}},ua=function(w,f){var R=yn(180),S=[];return Bn(f).forEach(function(X,ae){if(ae===0){var _e=X[0];if(_e.type===20&&["top","left","right","bottom"].indexOf(_e.value)!==-1){R=xs(X);return}else if(Ha(_e)){R=(ui.parse(w,_e)+yn(270))%yn(360);return}}var De=la(w,X);S.push(De)}),{angle:R,stops:S,type:1}},Zo=function(w,f){var R=yn(180),S=[],X=1,ae=0,_e=3,De=[];return Bn(f).forEach(function(Re,ze){var $e=Re[0];if(ze===0){if(Rr($e)&&$e.value==="linear"){X=1;return}else if(Rr($e)&&$e.value==="radial"){X=2;return}}if($e.type===18){if($e.name==="from"){var at=Gn.parse(w,$e.values[0]);S.push({stop:sn,color:at})}else if($e.name==="to"){var at=Gn.parse(w,$e.values[0]);S.push({stop:In,color:at})}else if($e.name==="color-stop"){var st=$e.values.filter(jn);if(st.length===2){var at=Gn.parse(w,st[1]),Ut=st[0];li(Ut)&&S.push({stop:{type:16,number:Ut.number*100,flags:Ut.flags},color:at})}}}}),X===1?{angle:(R+yn(180))%yn(360),stops:S,type:X}:{size:_e,shape:ae,stops:S,position:De,type:X}},Rs="closest-side",Ds="farthest-side",Ls="closest-corner",Us="farthest-corner",Fs="circle",Ns="ellipse",ca="cover",Ms="contain",Ps=function(w,f){var R=0,S=3,X=[],ae=[];return Bn(f).forEach(function(_e,De){var Re=!0;if(De===0){var ze=!1;Re=_e.reduce(function(at,st){if(ze)if(Rr(st))switch(st.value){case"center":return ae.push(Pa),at;case"top":case"left":return ae.push(sn),at;case"right":case"bottom":return ae.push(In),at}else(qr(st)||Un(st))&&ae.push(st);else if(Rr(st))switch(st.value){case Fs:return R=0,!1;case Ns:return R=1,!1;case"at":return ze=!0,!1;case Rs:return S=0,!1;case ca:case Ds:return S=1,!1;case Ms:case Ls:return S=2,!1;case Us:return S=3,!1}else if(Un(st)||qr(st))return Array.isArray(S)||(S=[]),S.push(st),!1;return at},Re)}if(Re){var $e=la(w,_e);X.push($e)}}),{size:S,shape:R,stops:X,position:ae,type:2}},Fi=function(w,f){var R=0,S=3,X=[],ae=[];return Bn(f).forEach(function(_e,De){var Re=!0;if(De===0?Re=_e.reduce(function($e,at){if(Rr(at))switch(at.value){case"center":return ae.push(Pa),!1;case"top":case"left":return ae.push(sn),!1;case"right":case"bottom":return ae.push(In),!1}else if(qr(at)||Un(at))return ae.push(at),!1;return $e},Re):De===1&&(Re=_e.reduce(function($e,at){if(Rr(at))switch(at.value){case Fs:return R=0,!1;case Ns:return R=1,!1;case Ms:case Rs:return S=0,!1;case Ds:return S=1,!1;case Ls:return S=2,!1;case ca:case Us:return S=3,!1}else if(Un(at)||qr(at))return Array.isArray(S)||(S=[]),S.push(at),!1;return $e},Re)),Re){var ze=la(w,_e);X.push(ze)}}),{size:S,shape:R,stops:X,position:ae,type:2}},ks=function(w){return w.type===1},qo=function(w){return w.type===2},ja={name:"image",parse:function(w,f){if(f.type===22){var R={url:f.value,type:0};return w.cache.addImage(f.value),R}if(f.type===18){var S=Qs[f.name];if(typeof S=="undefined")throw new Error('Attempting to parse an unsupported image function "'+f.name+'"');return S(w,f.values)}throw new Error("Unsupported image type "+f.type)}};function Hs(w){return!(w.type===20&&w.value==="none")&&(w.type!==18||!!Qs[w.name])}var Qs={"linear-gradient":$o,"-moz-linear-gradient":ua,"-ms-linear-gradient":ua,"-o-linear-gradient":ua,"-webkit-linear-gradient":ua,"radial-gradient":Ps,"-moz-radial-gradient":Fi,"-ms-radial-gradient":Fi,"-o-radial-gradient":Fi,"-webkit-radial-gradient":Fi,"-webkit-gradient":Zo},Ks={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(w,f){if(f.length===0)return[];var R=f[0];return R.type===20&&R.value==="none"?[]:f.filter(function(S){return jn(S)&&Hs(S)}).map(function(S){return ja.parse(w,S)})}},el={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(w,f){return f.map(function(R){if(Rr(R))switch(R.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},tl={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(w,f){return Bn(f).map(function(R){return R.filter(qr)}).map(Ts)}},rl={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(w,f){return Bn(f).map(function(R){return R.filter(Rr).map(function(S){return S.value}).join(" ")}).map(nl)}},nl=function(w){switch(w){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},En;(function(w){w.AUTO="auto",w.CONTAIN="contain",w.COVER="cover"})(En||(En={}));var il={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(w,f){return Bn(f).map(function(R){return R.filter(js)})}},js=function(w){return Rr(w)||qr(w)},ci=function(w){return{name:"border-"+w+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},al=ci("top"),Ws=ci("right"),Gs=ci("bottom"),sl=ci("left"),Ni=function(w){return{name:"border-radius-"+w,initialValue:"0 0",prefix:!1,type:1,parse:function(f,R){return Ts(R.filter(qr))}}},Vs=Ni("top-left"),ol=Ni("top-right"),ll=Ni("bottom-right"),zs=Ni("bottom-left"),da=function(w){return{name:"border-"+w+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(f,R){switch(R){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Wa=da("top"),Xs=da("right"),Ga=da("bottom"),Al=da("left"),di=function(w){return{name:"border-"+w+"-width",initialValue:"0",type:0,prefix:!1,parse:function(f,R){return Ri(R)?R.number:0}}},ul=di("top"),cl=di("right"),dl=di("bottom"),Ys=di("left"),hl={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},fl={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(w,f){switch(f){case"rtl":return 1;case"ltr":default:return 0}}},pl={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(w,f){return f.filter(Rr).reduce(function(R,S){return R|hi(S.value)},0)}},hi=function(w){switch(w){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},fi={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(w,f){switch(f){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Va={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(w,f){return f.type===20&&f.value==="normal"?0:f.type===17||f.type===15?f.number:0}},ha;(function(w){w.NORMAL="normal",w.STRICT="strict"})(ha||(ha={}));var Js={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(w,f){switch(f){case"strict":return ha.STRICT;case"normal":default:return ha.NORMAL}}},gl={name:"line-height",initialValue:"normal",prefix:!1,type:4},pi=function(w,f){return Rr(w)&&w.value==="normal"?1.2*f:w.type===17?f*w.number:qr(w)?Dr(w,f):f},ml={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(w,f){return f.type===20&&f.value==="none"?null:ja.parse(w,f)}},vl={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(w,f){switch(f){case"inside":return 0;case"outside":default:return 1}}},hn={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(w,f){switch(f){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},gi=function(w){return{name:"margin-"+w,initialValue:"0",prefix:!1,type:4}},$s=gi("top"),yl=gi("right"),Zs=gi("bottom"),Mi=gi("left"),qs={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(w,f){return f.filter(Rr).map(function(R){switch(R.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},bl={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(w,f){switch(f){case"break-word":return"break-word";case"normal":default:return"normal"}}},fa=function(w){return{name:"padding-"+w,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},El=fa("top"),za=fa("right"),Pi=fa("bottom"),_l=fa("left"),wl={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(w,f){switch(f){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Cl={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(w,f){switch(f){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},eo={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(w,f){return f.length===1&&Di(f[0],"none")?[]:Bn(f).map(function(R){for(var S={color:Nn.TRANSPARENT,offsetX:sn,offsetY:sn,blur:sn},X=0,ae=0;ae<R.length;ae++){var _e=R[ae];Un(_e)?(X===0?S.offsetX=_e:X===1?S.offsetY=_e:S.blur=_e,X++):S.color=Gn.parse(w,_e)}return S})}},Tl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(w,f){switch(f){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},xl={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(w,f){if(f.type===20&&f.value==="none")return null;if(f.type===18){var R=Sl[f.name];if(typeof R=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+f.name+'"');return R(f.values)}return null}},Xa=function(w){var f=w.filter(function(R){return R.type===17}).map(function(R){return R.number});return f.length===6?f:null},Bl=function(w){var f=w.filter(function(Re){return Re.type===17}).map(function(Re){return Re.number}),R=f[0],S=f[1];f[2],f[3];var X=f[4],ae=f[5];f[6],f[7],f[8],f[9],f[10],f[11];var _e=f[12],De=f[13];return f[14],f[15],f.length===16?[R,S,X,ae,_e,De]:null},Sl={matrix:Xa,matrix3d:Bl},ki={type:16,number:50,flags:Wt},Il=[ki,ki],Ol={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(w,f){var R=f.filter(qr);return R.length!==2?Il:[R[0],R[1]]}},to={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(w,f){switch(f){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Hi;(function(w){w.NORMAL="normal",w.BREAK_ALL="break-all",w.KEEP_ALL="keep-all"})(Hi||(Hi={}));for(var Rl={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(w,f){switch(f){case"break-all":return Hi.BREAK_ALL;case"keep-all":return Hi.KEEP_ALL;case"normal":default:return Hi.NORMAL}}},jA={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(w,f){if(f.type===20)return{auto:!0,order:0};if(li(f))return{auto:!1,order:f.number};throw new Error("Invalid z-index number parsed")}},ro={name:"time",parse:function(w,f){if(f.type===15)switch(f.unit.toLowerCase()){case"s":return 1e3*f.number;case"ms":return f.number}throw new Error("Unsupported time type")}},Ya={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(w,f){return li(f)?f.number:1}},Qi={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Dl={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(w,f){return f.filter(Rr).map(function(R){switch(R.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(R){return R!==0})}},Ja={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(w,f){var R=[],S=[];return f.forEach(function(X){switch(X.type){case 20:case 0:R.push(X.value);break;case 17:R.push(X.number.toString());break;case 4:S.push(R.join(" ")),R.length=0;break}}),R.length&&S.push(R.join(" ")),S.map(function(X){return X.indexOf(" ")===-1?X:"'"+X+"'"})}},Ll={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Ul={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(w,f){if(li(f))return f.number;if(Rr(f))switch(f.value){case"bold":return 700;case"normal":default:return 400}return 400}},Fl={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(w,f){return f.filter(Rr).map(function(R){return R.value})}},$a={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(w,f){switch(f){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Yr=function(w,f){return(w&f)!==0},Nl={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(w,f){if(f.length===0)return[];var R=f[0];return R.type===20&&R.value==="none"?[]:f}},Ml={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(w,f){if(f.length===0)return null;var R=f[0];if(R.type===20&&R.value==="none")return null;for(var S=[],X=f.filter(Cs),ae=0;ae<X.length;ae++){var _e=X[ae],De=X[ae+1];if(_e.type===20){var Re=De&&li(De)?De.number:1;S.push({counter:_e.value,increment:Re})}}return S}},Pl={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(w,f){if(f.length===0)return[];for(var R=[],S=f.filter(Cs),X=0;X<S.length;X++){var ae=S[X],_e=S[X+1];if(Rr(ae)&&ae.value!=="none"){var De=_e&&li(_e)?_e.number:0;R.push({counter:ae.value,reset:De})}}return R}},kl={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(w,f){return f.filter(Ri).map(function(R){return ro.parse(w,R)})}},Hl={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(w,f){if(f.length===0)return null;var R=f[0];if(R.type===20&&R.value==="none")return null;var S=[],X=f.filter(Go);if(X.length%2!==0)return null;for(var ae=0;ae<X.length;ae+=2){var _e=X[ae].value,De=X[ae+1].value;S.push({open:_e,close:De})}return S}},no=function(w,f,R){if(!w)return"";var S=w[Math.min(f,w.length-1)];return S?R?S.open:S.close:""},Ql={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(w,f){return f.length===1&&Di(f[0],"none")?[]:Bn(f).map(function(R){for(var S={color:255,offsetX:sn,offsetY:sn,blur:sn,spread:sn,inset:!1},X=0,ae=0;ae<R.length;ae++){var _e=R[ae];Di(_e,"inset")?S.inset=!0:Un(_e)?(X===0?S.offsetX=_e:X===1?S.offsetY=_e:X===2?S.blur=_e:S.spread=_e,X++):S.color=Gn.parse(w,_e)}return S})}},Kl={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(w,f){var R=[0,1,2],S=[];return f.filter(Rr).forEach(function(X){switch(X.value){case"stroke":S.push(1);break;case"fill":S.push(0);break;case"markers":S.push(2);break}}),R.forEach(function(X){S.indexOf(X)===-1&&S.push(X)}),S}},pa={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},jl={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(w,f){return Ri(f)?f.number:0}},io=function(){function w(f,R){var S,X;this.animationDuration=Rt(f,kl,R.animationDuration),this.backgroundClip=Rt(f,Xo,R.backgroundClip),this.backgroundColor=Rt(f,Yo,R.backgroundColor),this.backgroundImage=Rt(f,Ks,R.backgroundImage),this.backgroundOrigin=Rt(f,el,R.backgroundOrigin),this.backgroundPosition=Rt(f,tl,R.backgroundPosition),this.backgroundRepeat=Rt(f,rl,R.backgroundRepeat),this.backgroundSize=Rt(f,il,R.backgroundSize),this.borderTopColor=Rt(f,al,R.borderTopColor),this.borderRightColor=Rt(f,Ws,R.borderRightColor),this.borderBottomColor=Rt(f,Gs,R.borderBottomColor),this.borderLeftColor=Rt(f,sl,R.borderLeftColor),this.borderTopLeftRadius=Rt(f,Vs,R.borderTopLeftRadius),this.borderTopRightRadius=Rt(f,ol,R.borderTopRightRadius),this.borderBottomRightRadius=Rt(f,ll,R.borderBottomRightRadius),this.borderBottomLeftRadius=Rt(f,zs,R.borderBottomLeftRadius),this.borderTopStyle=Rt(f,Wa,R.borderTopStyle),this.borderRightStyle=Rt(f,Xs,R.borderRightStyle),this.borderBottomStyle=Rt(f,Ga,R.borderBottomStyle),this.borderLeftStyle=Rt(f,Al,R.borderLeftStyle),this.borderTopWidth=Rt(f,ul,R.borderTopWidth),this.borderRightWidth=Rt(f,cl,R.borderRightWidth),this.borderBottomWidth=Rt(f,dl,R.borderBottomWidth),this.borderLeftWidth=Rt(f,Ys,R.borderLeftWidth),this.boxShadow=Rt(f,Ql,R.boxShadow),this.color=Rt(f,hl,R.color),this.direction=Rt(f,fl,R.direction),this.display=Rt(f,pl,R.display),this.float=Rt(f,fi,R.cssFloat),this.fontFamily=Rt(f,Ja,R.fontFamily),this.fontSize=Rt(f,Ll,R.fontSize),this.fontStyle=Rt(f,$a,R.fontStyle),this.fontVariant=Rt(f,Fl,R.fontVariant),this.fontWeight=Rt(f,Ul,R.fontWeight),this.letterSpacing=Rt(f,Va,R.letterSpacing),this.lineBreak=Rt(f,Js,R.lineBreak),this.lineHeight=Rt(f,gl,R.lineHeight),this.listStyleImage=Rt(f,ml,R.listStyleImage),this.listStylePosition=Rt(f,vl,R.listStylePosition),this.listStyleType=Rt(f,hn,R.listStyleType),this.marginTop=Rt(f,$s,R.marginTop),this.marginRight=Rt(f,yl,R.marginRight),this.marginBottom=Rt(f,Zs,R.marginBottom),this.marginLeft=Rt(f,Mi,R.marginLeft),this.opacity=Rt(f,Ya,R.opacity);var ae=Rt(f,qs,R.overflow);this.overflowX=ae[0],this.overflowY=ae[ae.length>1?1:0],this.overflowWrap=Rt(f,bl,R.overflowWrap),this.paddingTop=Rt(f,El,R.paddingTop),this.paddingRight=Rt(f,za,R.paddingRight),this.paddingBottom=Rt(f,Pi,R.paddingBottom),this.paddingLeft=Rt(f,_l,R.paddingLeft),this.paintOrder=Rt(f,Kl,R.paintOrder),this.position=Rt(f,Cl,R.position),this.textAlign=Rt(f,wl,R.textAlign),this.textDecorationColor=Rt(f,Qi,(S=R.textDecorationColor)!==null&&S!==void 0?S:R.color),this.textDecorationLine=Rt(f,Dl,(X=R.textDecorationLine)!==null&&X!==void 0?X:R.textDecoration),this.textShadow=Rt(f,eo,R.textShadow),this.textTransform=Rt(f,Tl,R.textTransform),this.transform=Rt(f,xl,R.transform),this.transformOrigin=Rt(f,Ol,R.transformOrigin),this.visibility=Rt(f,to,R.visibility),this.webkitTextStrokeColor=Rt(f,pa,R.webkitTextStrokeColor),this.webkitTextStrokeWidth=Rt(f,jl,R.webkitTextStrokeWidth),this.wordBreak=Rt(f,Rl,R.wordBreak),this.zIndex=Rt(f,jA,R.zIndex)}return w.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},w.prototype.isTransparent=function(){return Vn(this.backgroundColor)},w.prototype.isTransformed=function(){return this.transform!==null},w.prototype.isPositioned=function(){return this.position!==0},w.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},w.prototype.isFloating=function(){return this.float!==0},w.prototype.isInlineLevel=function(){return Yr(this.display,4)||Yr(this.display,33554432)||Yr(this.display,268435456)||Yr(this.display,536870912)||Yr(this.display,67108864)||Yr(this.display,134217728)},w}(),ga=function(){function w(f,R){this.content=Rt(f,Nl,R.content),this.quotes=Rt(f,Hl,R.quotes)}return w}(),Za=function(){function w(f,R){this.counterIncrement=Rt(f,Ml,R.counterIncrement),this.counterReset=Rt(f,Pl,R.counterReset)}return w}(),Rt=function(w,f,R){var S=new _s,X=R!==null&&typeof R!="undefined"?R.toString():f.initialValue;S.write(X);var ae=new ws(S.read());switch(f.type){case 2:var _e=ae.parseComponentValue();return f.parse(w,Rr(_e)?_e.value:f.initialValue);case 0:return f.parse(w,ae.parseComponentValue());case 1:return f.parse(w,ae.parseComponentValues());case 4:return ae.parseComponentValue();case 3:switch(f.format){case"angle":return ui.parse(w,ae.parseComponentValue());case"color":return Gn.parse(w,ae.parseComponentValue());case"image":return ja.parse(w,ae.parseComponentValue());case"length":var De=ae.parseComponentValue();return Un(De)?De:sn;case"length-percentage":var Re=ae.parseComponentValue();return qr(Re)?Re:sn;case"time":return ro.parse(w,ae.parseComponentValue())}break}},Wl="data-html2canvas-debug",ao=function(w){var f=w.getAttribute(Wl);switch(f){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},qa=function(w,f){var R=ao(w);return R===1||f===R},On=function(){function w(f,R){if(this.context=f,this.textNodes=[],this.elements=[],this.flags=0,qa(R,3))debugger;this.styles=new io(f,window.getComputedStyle(R,null)),fs(R)&&(this.styles.animationDuration.some(function(S){return S>0})&&(R.style.animationDuration="0s"),this.styles.transform!==null&&(R.style.transform="none")),this.bounds=k(this.context,R),qa(R,4)&&(this.flags|=16)}return w}(),mi="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",so="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ki=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ma=0;ma<so.length;ma++)Ki[so.charCodeAt(ma)]=ma;for(var Gl=function(w){var f=w.length*.75,R=w.length,S,X=0,ae,_e,De,Re;w[w.length-1]==="="&&(f--,w[w.length-2]==="="&&f--);var ze=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(f):new Array(f),$e=Array.isArray(ze)?ze:new Uint8Array(ze);for(S=0;S<R;S+=4)ae=Ki[w.charCodeAt(S)],_e=Ki[w.charCodeAt(S+1)],De=Ki[w.charCodeAt(S+2)],Re=Ki[w.charCodeAt(S+3)],$e[X++]=ae<<2|_e>>4,$e[X++]=(_e&15)<<4|De>>2,$e[X++]=(De&3)<<6|Re&63;return ze},es=function(w){for(var f=w.length,R=[],S=0;S<f;S+=2)R.push(w[S+1]<<8|w[S]);return R},Vl=function(w){for(var f=w.length,R=[],S=0;S<f;S+=4)R.push(w[S+3]<<24|w[S+2]<<16|w[S+1]<<8|w[S]);return R},ei=5,ts=6+5,rs=2,zl=ts-ei,oo=65536>>ei,Xl=1<<ei,va=Xl-1,Yl=1024>>ei,Jl=oo+Yl,$l=Jl,Zl=2048>>6,lo=$l+Zl,ql=65536>>ts,eA=1<<zl,tA=eA-1,Ao=function(w,f,R){return w.slice?w.slice(f,R):new Uint16Array(Array.prototype.slice.call(w,f,R))},rA=function(w,f,R){return w.slice?w.slice(f,R):new Uint32Array(Array.prototype.slice.call(w,f,R))},nA=function(w,f){var R=Gl(w),S=Array.isArray(R)?Vl(R):new Uint32Array(R),X=Array.isArray(R)?es(R):new Uint16Array(R),ae=24,_e=Ao(X,ae/2,S[4]/2),De=S[5]===2?Ao(X,(ae+S[4])/2):rA(S,Math.ceil((ae+S[4])/4));return new ya(S[0],S[1],S[2],S[3],_e,De)},ya=function(){function w(f,R,S,X,ae,_e){this.initialValue=f,this.errorValue=R,this.highStart=S,this.highValueIndex=X,this.index=ae,this.data=_e}return w.prototype.get=function(f){var R;if(f>=0){if(f<55296||f>56319&&f<=65535)return R=this.index[f>>ei],R=(R<<rs)+(f&va),this.data[R];if(f<=65535)return R=this.index[oo+(f-55296>>ei)],R=(R<<rs)+(f&va),this.data[R];if(f<this.highStart)return R=lo-ql+(f>>ts),R=this.index[R],R+=f>>ei&tA,R=this.index[R],R=(R<<rs)+(f&va),this.data[R];if(f<=1114111)return this.data[this.highValueIndex]}return this.errorValue},w}(),ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",iA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ba=0;ba<ns.length;ba++)iA[ns.charCodeAt(ba)]=ba;var aA=1,is=2,ti=3,uo=4,as=5,sA=7,co=8,ho=9,ss=10,Ea=11,fo=12,po=13,go=14,_a=15,oA=function(w){for(var f=[],R=0,S=w.length;R<S;){var X=w.charCodeAt(R++);if(X>=55296&&X<=56319&&R<S){var ae=w.charCodeAt(R++);(ae&64512)===56320?f.push(((X&1023)<<10)+(ae&1023)+65536):(f.push(X),R--)}else f.push(X)}return f},mo=function(){for(var w=[],f=0;f<arguments.length;f++)w[f]=arguments[f];if(String.fromCodePoint)return String.fromCodePoint.apply(String,w);var R=w.length;if(!R)return"";for(var S=[],X=-1,ae="";++X<R;){var _e=w[X];_e<=65535?S.push(_e):(_e-=65536,S.push((_e>>10)+55296,_e%1024+56320)),(X+1===R||S.length>16384)&&(ae+=String.fromCharCode.apply(String,S),S.length=0)}return ae},lA=nA(mi),_n="\xD7",vo="\xF7",os=function(w){return lA.get(w)},AA=function(w,f,R){var S=R-2,X=f[S],ae=f[R-1],_e=f[R];if(ae===is&&_e===ti)return _n;if(ae===is||ae===ti||ae===uo)return vo;if(_e===is||_e===ti||_e===uo)return vo;if(ae===co&&[co,ho,Ea,fo].indexOf(_e)!==-1)return _n;if((ae===Ea||ae===ho)&&(_e===ho||_e===ss))return _n;if((ae===fo||ae===ss)&&_e===ss)return _n;if(_e===po||_e===as)return _n;if(_e===sA)return _n;if(ae===aA)return _n;if(ae===po&&_e===go){for(;X===as;)X=f[--S];if(X===go)return _n}if(ae===_a&&_e===_a){for(var De=0;X===_a;)De++,X=f[--S];if(De%2===0)return _n}return vo},uA=function(w){var f=oA(w),R=f.length,S=0,X=0,ae=f.map(os);return{next:function(){if(S>=R)return{done:!0,value:null};for(var _e=_n;S<R&&(_e=AA(f,ae,++S))===_n;);if(_e!==_n||S===R){var De=mo.apply(null,f.slice(X,S));return X=S,{value:De,done:!1}}return{done:!0,value:null}}}},cA=function(w){for(var f=uA(w),R=[],S;!(S=f.next()).done;)S.value&&R.push(S.value.slice());return R},dA=function(w){var f=123;if(w.createRange){var R=w.createRange();if(R.getBoundingClientRect){var S=w.createElement("boundtest");S.style.height=f+"px",S.style.display="block",w.body.appendChild(S),R.selectNode(S);var X=R.getBoundingClientRect(),ae=Math.round(X.height);if(w.body.removeChild(S),ae===f)return!0}}return!1},hA=function(w){var f=w.createElement("boundtest");f.style.width="50px",f.style.display="block",f.style.fontSize="12px",f.style.letterSpacing="0px",f.style.wordSpacing="0px",w.body.appendChild(f);var R=w.createRange();f.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var S=f.firstChild,X=I(S.data).map(function(Re){return d(Re)}),ae=0,_e={},De=X.every(function(Re,ze){R.setStart(S,ae),R.setEnd(S,ae+Re.length);var $e=R.getBoundingClientRect();ae+=Re.length;var at=$e.x>_e.x||$e.y>_e.y;return _e=$e,ze===0?!0:at});return w.body.removeChild(f),De},fA=function(){return typeof new Image().crossOrigin!="undefined"},pA=function(){return typeof new XMLHttpRequest().responseType=="string"},yo=function(w){var f=new Image,R=w.createElement("canvas"),S=R.getContext("2d");if(!S)return!1;f.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{S.drawImage(f,0,0),R.toDataURL()}catch(X){return!1}return!0},ji=function(w){return w[0]===0&&w[1]===255&&w[2]===0&&w[3]===255},wa=function(w){var f=w.createElement("canvas"),R=100;f.width=R,f.height=R;var S=f.getContext("2d");if(!S)return Promise.reject(!1);S.fillStyle="rgb(0, 255, 0)",S.fillRect(0,0,R,R);var X=new Image,ae=f.toDataURL();X.src=ae;var _e=ls(R,R,0,0,X);return S.fillStyle="red",S.fillRect(0,0,R,R),Ca(_e).then(function(De){S.drawImage(De,0,0);var Re=S.getImageData(0,0,R,R).data;S.fillStyle="red",S.fillRect(0,0,R,R);var ze=w.createElement("div");return ze.style.backgroundImage="url("+ae+")",ze.style.height=R+"px",ji(Re)?Ca(ls(R,R,0,0,ze)):Promise.reject(!1)}).then(function(De){return S.drawImage(De,0,0),ji(S.getImageData(0,0,R,R).data)}).catch(function(){return!1})},ls=function(w,f,R,S,X){var ae="http://www.w3.org/2000/svg",_e=document.createElementNS(ae,"svg"),De=document.createElementNS(ae,"foreignObject");return _e.setAttributeNS(null,"width",w.toString()),_e.setAttributeNS(null,"height",f.toString()),De.setAttributeNS(null,"width","100%"),De.setAttributeNS(null,"height","100%"),De.setAttributeNS(null,"x",R.toString()),De.setAttributeNS(null,"y",S.toString()),De.setAttributeNS(null,"externalResourcesRequired","true"),_e.appendChild(De),De.appendChild(X),_e},Ca=function(w){return new Promise(function(f,R){var S=new Image;S.onload=function(){return f(S)},S.onerror=R,S.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(w))})},nn={get SUPPORT_RANGE_BOUNDS(){var w=dA(document);return Object.defineProperty(nn,"SUPPORT_RANGE_BOUNDS",{value:w}),w},get SUPPORT_WORD_BREAKING(){var w=nn.SUPPORT_RANGE_BOUNDS&&hA(document);return Object.defineProperty(nn,"SUPPORT_WORD_BREAKING",{value:w}),w},get SUPPORT_SVG_DRAWING(){var w=yo(document);return Object.defineProperty(nn,"SUPPORT_SVG_DRAWING",{value:w}),w},get SUPPORT_FOREIGNOBJECT_DRAWING(){var w=typeof Array.from=="function"&&typeof window.fetch=="function"?wa(document):Promise.resolve(!1);return Object.defineProperty(nn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:w}),w},get SUPPORT_CORS_IMAGES(){var w=fA();return Object.defineProperty(nn,"SUPPORT_CORS_IMAGES",{value:w}),w},get SUPPORT_RESPONSE_TYPE(){var w=pA();return Object.defineProperty(nn,"SUPPORT_RESPONSE_TYPE",{value:w}),w},get SUPPORT_CORS_XHR(){var w="withCredentials"in new XMLHttpRequest;return Object.defineProperty(nn,"SUPPORT_CORS_XHR",{value:w}),w},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var w=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(nn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:w}),w}},Wi=function(){function w(f,R){this.text=f,this.bounds=R}return w}(),gA=function(w,f,R,S){var X=As(f,R),ae=[],_e=0;return X.forEach(function(De){if(R.textDecorationLine.length||De.trim().length>0)if(nn.SUPPORT_RANGE_BOUNDS){var Re=bo(S,_e,De.length).getClientRects();if(Re.length>1){var ze=Gi(De),$e=0;ze.forEach(function(st){ae.push(new Wi(st,q.fromDOMRectList(w,bo(S,$e+_e,st.length).getClientRects()))),$e+=st.length})}else ae.push(new Wi(De,q.fromDOMRectList(w,Re)))}else{var at=S.splitText(De.length);ae.push(new Wi(De,mA(w,S))),S=at}else nn.SUPPORT_RANGE_BOUNDS||(S=S.splitText(De.length));_e+=De.length}),ae},mA=function(w,f){var R=f.ownerDocument;if(R){var S=R.createElement("html2canvaswrapper");S.appendChild(f.cloneNode(!0));var X=f.parentNode;if(X){X.replaceChild(S,f);var ae=k(w,S);return S.firstChild&&X.replaceChild(S.firstChild,S),ae}}return q.EMPTY},bo=function(w,f,R){var S=w.ownerDocument;if(!S)throw new Error("Node has no owner document");var X=S.createRange();return X.setStart(w,f),X.setEnd(w,f+R),X},Gi=function(w){if(nn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var f=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(f.segment(w)).map(function(R){return R.segment})}return cA(w)},Eo=function(w,f){if(nn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var R=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(R.segment(w)).map(function(S){return S.segment})}return vA(w,f)},As=function(w,f){return f.letterSpacing!==0?Gi(w):Eo(w,f)},us=[32,160,4961,65792,65793,4153,4241],vA=function(w,f){for(var R=cr(w,{lineBreak:f.lineBreak,wordBreak:f.overflowWrap==="break-word"?"break-word":f.wordBreak}),S=[],X,ae=function(){if(X.value){var _e=X.value.slice(),De=I(_e),Re="";De.forEach(function(ze){us.indexOf(ze)===-1?Re+=d(ze):(Re.length&&S.push(Re),S.push(d(ze)),Re="")}),Re.length&&S.push(Re)}};!(X=R.next()).done;)ae();return S},yA=function(){function w(f,R,S){this.text=bA(R.data,S.textTransform),this.textBounds=gA(f,this.text,S,R)}return w}(),bA=function(w,f){switch(f){case 1:return w.toLowerCase();case 3:return w.replace(EA,_A);case 2:return w.toUpperCase();default:return w}},EA=/(^|\s|:|-|\(|\))([a-z])/g,_A=function(w,f,R){return w.length>0?f+R.toUpperCase():w},cs=function(w){W(f,w);function f(R,S){var X=w.call(this,R,S)||this;return X.src=S.currentSrc||S.src,X.intrinsicWidth=S.naturalWidth,X.intrinsicHeight=S.naturalHeight,X.context.cache.addImage(X.src),X}return f}(On),_o=function(w){W(f,w);function f(R,S){var X=w.call(this,R,S)||this;return X.canvas=S,X.intrinsicWidth=S.width,X.intrinsicHeight=S.height,X}return f}(On),wo=function(w){W(f,w);function f(R,S){var X=w.call(this,R,S)||this,ae=new XMLSerializer,_e=k(R,S);return S.setAttribute("width",_e.width+"px"),S.setAttribute("height",_e.height+"px"),X.svg="data:image/svg+xml,"+encodeURIComponent(ae.serializeToString(S)),X.intrinsicWidth=S.width.baseVal.value,X.intrinsicHeight=S.height.baseVal.value,X.context.cache.addImage(X.svg),X}return f}(On),Co=function(w){W(f,w);function f(R,S){var X=w.call(this,R,S)||this;return X.value=S.value,X}return f}(On),ds=function(w){W(f,w);function f(R,S){var X=w.call(this,R,S)||this;return X.start=S.start,X.reversed=typeof S.reversed=="boolean"&&S.reversed===!0,X}return f}(On),wA=[{type:15,flags:0,unit:"px",number:3}],CA=[{type:16,flags:0,number:50}],TA=function(w){return w.width>w.height?new q(w.left+(w.width-w.height)/2,w.top,w.height,w.height):w.width<w.height?new q(w.left,w.top+(w.height-w.width)/2,w.width,w.width):w},xA=function(w){var f=w.type===BA?new Array(w.value.length+1).join("\u2022"):w.value;return f.length===0?w.placeholder||"":f},Ta="checkbox",xa="radio",BA="password",To=707406591,Ba=function(w){W(f,w);function f(R,S){var X=w.call(this,R,S)||this;X.type=S.type.toLowerCase(),X.checked=S.checked,X.value=xA(S),(X.type===Ta||X.type===xa)&&(X.styles.backgroundColor=3739148031,X.styles.borderTopColor=X.styles.borderRightColor=X.styles.borderBottomColor=X.styles.borderLeftColor=2779096575,X.styles.borderTopWidth=X.styles.borderRightWidth=X.styles.borderBottomWidth=X.styles.borderLeftWidth=1,X.styles.borderTopStyle=X.styles.borderRightStyle=X.styles.borderBottomStyle=X.styles.borderLeftStyle=1,X.styles.backgroundClip=[0],X.styles.backgroundOrigin=[0],X.bounds=TA(X.bounds));switch(X.type){case Ta:X.styles.borderTopRightRadius=X.styles.borderTopLeftRadius=X.styles.borderBottomRightRadius=X.styles.borderBottomLeftRadius=wA;break;case xa:X.styles.borderTopRightRadius=X.styles.borderTopLeftRadius=X.styles.borderBottomRightRadius=X.styles.borderBottomLeftRadius=CA;break}return X}return f}(On),hs=function(w){W(f,w);function f(R,S){var X=w.call(this,R,S)||this,ae=S.options[S.selectedIndex||0];return X.value=ae&&ae.text||"",X}return f}(On),xo=function(w){W(f,w);function f(R,S){var X=w.call(this,R,S)||this;return X.value=S.value,X}return f}(On),Bo=function(w){W(f,w);function f(R,S){var X=w.call(this,R,S)||this;X.src=S.src,X.width=parseInt(S.width,10)||0,X.height=parseInt(S.height,10)||0,X.backgroundColor=X.styles.backgroundColor;try{if(S.contentWindow&&S.contentWindow.document&&S.contentWindow.document.documentElement){X.tree=Io(R,S.contentWindow.document.documentElement);var ae=S.contentWindow.document.documentElement?Li(R,getComputedStyle(S.contentWindow.document.documentElement).backgroundColor):Nn.TRANSPARENT,_e=S.contentWindow.document.body?Li(R,getComputedStyle(S.contentWindow.document.body).backgroundColor):Nn.TRANSPARENT;X.backgroundColor=Vn(ae)?Vn(_e)?X.styles.backgroundColor:_e:ae}}catch(De){}return X}return f}(On),SA=["OL","UL","MENU"],Vi=function(w,f,R,S){for(var X=f.firstChild,ae=void 0;X;X=ae)if(ae=X.nextSibling,Oo(X)&&X.data.trim().length>0)R.textNodes.push(new yA(w,X,R.styles));else if(ri(X))if(be(X)&&X.assignedNodes)X.assignedNodes().forEach(function(De){return Vi(w,De,R,S)});else{var _e=So(w,X);_e.styles.isVisible()&&(IA(X,_e,S)?_e.flags|=4:OA(_e.styles)&&(_e.flags|=2),SA.indexOf(X.tagName)!==-1&&(_e.flags|=8),R.elements.push(_e),X.slot,X.shadowRoot?Vi(w,X.shadowRoot,_e,S):!ue(X)&&!Do(X)&&!ye(X)&&Vi(w,X,_e,S))}},So=function(w,f){return x(f)?new cs(w,f):ms(f)?new _o(w,f):Do(f)?new wo(w,f):ps(f)?new Co(w,f):Ro(f)?new ds(w,f):RA(f)?new Ba(w,f):ye(f)?new hs(w,f):ue(f)?new xo(w,f):P(f)?new Bo(w,f):new On(w,f)},Io=function(w,f){var R=So(w,f);return R.flags|=4,Vi(w,f,R,R),R},IA=function(w,f,R){return f.styles.isPositionedWithZIndex()||f.styles.opacity<1||f.styles.isTransformed()||gs(w)&&R.styles.isTransparent()},OA=function(w){return w.isPositioned()||w.isFloating()},Oo=function(w){return w.nodeType===Node.TEXT_NODE},ri=function(w){return w.nodeType===Node.ELEMENT_NODE},fs=function(w){return ri(w)&&typeof w.style!="undefined"&&!Sa(w)},Sa=function(w){return typeof w.className=="object"},ps=function(w){return w.tagName==="LI"},Ro=function(w){return w.tagName==="OL"},RA=function(w){return w.tagName==="INPUT"},DA=function(w){return w.tagName==="HTML"},Do=function(w){return w.tagName==="svg"},gs=function(w){return w.tagName==="BODY"},ms=function(w){return w.tagName==="CANVAS"},v=function(w){return w.tagName==="VIDEO"},x=function(w){return w.tagName==="IMG"},P=function(w){return w.tagName==="IFRAME"},Z=function(w){return w.tagName==="STYLE"},ce=function(w){return w.tagName==="SCRIPT"},ue=function(w){return w.tagName==="TEXTAREA"},ye=function(w){return w.tagName==="SELECT"},be=function(w){return w.tagName==="SLOT"},Ue=function(w){return w.tagName.indexOf("-")>0},We=function(){function w(){this.counters={}}return w.prototype.getCounterValue=function(f){var R=this.counters[f];return R&&R.length?R[R.length-1]:1},w.prototype.getCounterValues=function(f){var R=this.counters[f];return R||[]},w.prototype.pop=function(f){var R=this;f.forEach(function(S){return R.counters[S].pop()})},w.prototype.parse=function(f){var R=this,S=f.counterIncrement,X=f.counterReset,ae=!0;S!==null&&S.forEach(function(De){var Re=R.counters[De.counter];Re&&De.increment!==0&&(ae=!1,Re.length||Re.push(1),Re[Math.max(0,Re.length-1)]+=De.increment)});var _e=[];return ae&&X.forEach(function(De){var Re=R.counters[De.counter];_e.push(De.counter),Re||(Re=R.counters[De.counter]=[]),Re.push(De.reset)}),_e},w}(),Ge={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Ne={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},Fe={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Ve={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},qe=function(w,f,R,S,X,ae){return w<f||w>R?on(w,X,ae.length>0):S.integers.reduce(function(_e,De,Re){for(;w>=De;)w-=De,_e+=S.values[Re];return _e},"")+ae},Et=function(w,f,R,S){var X="";do R||w--,X=S(w)+X,w/=f;while(w*f>=f);return X},mt=function(w,f,R,S,X){var ae=R-f+1;return(w<0?"-":"")+(Et(Math.abs(w),ae,S,function(_e){return d(Math.floor(_e%ae)+f)})+X)},Ct=function(w,f,R){R===void 0&&(R=". ");var S=f.length;return Et(Math.abs(w),S,!1,function(X){return f[Math.floor(X%S)]})+R},Bt=1<<0,Kt=1<<1,Gt=1<<2,hr=1<<3,ar=function(w,f,R,S,X,ae){if(w<-9999||w>9999)return on(w,4,X.length>0);var _e=Math.abs(w),De=X;if(_e===0)return f[0]+De;for(var Re=0;_e>0&&Re<=4;Re++){var ze=_e%10;ze===0&&Yr(ae,Bt)&&De!==""?De=f[ze]+De:ze>1||ze===1&&Re===0||ze===1&&Re===1&&Yr(ae,Kt)||ze===1&&Re===1&&Yr(ae,Gt)&&w>100||ze===1&&Re>1&&Yr(ae,hr)?De=f[ze]+(Re>0?R[Re-1]:"")+De:ze===1&&Re>0&&(De=R[Re-1]+De),_e=Math.floor(_e/10)}return(w<0?S:"")+De},Lr="\u5341\u767E\u5343\u842C",an="\u62FE\u4F70\u4EDF\u842C",_r="\u30DE\u30A4\u30CA\u30B9",Jr="\uB9C8\uC774\uB108\uC2A4",on=function(w,f,R){var S=R?". ":"",X=R?"\u3001":"",ae=R?", ":"",_e=R?" ":"";switch(f){case 0:return"\u2022"+_e;case 1:return"\u25E6"+_e;case 2:return"\u25FE"+_e;case 5:var De=mt(w,48,57,!0,S);return De.length<4?"0"+De:De;case 4:return Ct(w,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",X);case 6:return qe(w,1,3999,Ge,3,S).toLowerCase();case 7:return qe(w,1,3999,Ge,3,S);case 8:return mt(w,945,969,!1,S);case 9:return mt(w,97,122,!1,S);case 10:return mt(w,65,90,!1,S);case 11:return mt(w,1632,1641,!0,S);case 12:case 49:return qe(w,1,9999,Ne,3,S);case 35:return qe(w,1,9999,Ne,3,S).toLowerCase();case 13:return mt(w,2534,2543,!0,S);case 14:case 30:return mt(w,6112,6121,!0,S);case 15:return Ct(w,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",X);case 16:return Ct(w,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",X);case 17:case 48:return ar(w,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Lr,"\u8CA0",X,Kt|Gt|hr);case 47:return ar(w,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",an,"\u8CA0",X,Bt|Kt|Gt|hr);case 42:return ar(w,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Lr,"\u8D1F",X,Kt|Gt|hr);case 41:return ar(w,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",an,"\u8D1F",X,Bt|Kt|Gt|hr);case 26:return ar(w,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",_r,X,0);case 25:return ar(w,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",_r,X,Bt|Kt|Gt);case 31:return ar(w,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",Jr,ae,Bt|Kt|Gt);case 33:return ar(w,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",Jr,ae,0);case 32:return ar(w,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",Jr,ae,Bt|Kt|Gt);case 18:return mt(w,2406,2415,!0,S);case 20:return qe(w,1,19999,Ve,3,S);case 21:return mt(w,2790,2799,!0,S);case 22:return mt(w,2662,2671,!0,S);case 22:return qe(w,1,10999,Fe,3,S);case 23:return Ct(w,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return Ct(w,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return mt(w,3302,3311,!0,S);case 28:return Ct(w,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",X);case 29:return Ct(w,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",X);case 34:return mt(w,3792,3801,!0,S);case 37:return mt(w,6160,6169,!0,S);case 38:return mt(w,4160,4169,!0,S);case 39:return mt(w,2918,2927,!0,S);case 40:return mt(w,1776,1785,!0,S);case 43:return mt(w,3046,3055,!0,S);case 44:return mt(w,3174,3183,!0,S);case 45:return mt(w,3664,3673,!0,S);case 46:return mt(w,3872,3881,!0,S);case 3:default:return mt(w,48,57,!0,S)}},mn="data-html2canvas-ignore",ni=function(){function w(f,R,S){if(this.context=f,this.options=S,this.scrolledElements=[],this.referenceElement=R,this.counters=new We,this.quoteDepth=0,!R.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(R.ownerDocument.documentElement,!1)}return w.prototype.toIFrame=function(f,R){var S=this,X=vi(f,R);if(!X.contentWindow)return Promise.reject("Unable to find iframe window");var ae=f.defaultView.pageXOffset,_e=f.defaultView.pageYOffset,De=X.contentWindow,Re=De.document,ze=Lo(X).then(function(){return V(S,void 0,void 0,function(){var $e,at;return U(this,function(st){switch(st.label){case 0:return this.scrolledElements.forEach(FA),De&&(De.scrollTo(R.left,R.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(De.scrollY!==R.top||De.scrollX!==R.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(De.scrollX-R.left,De.scrollY-R.top,0,0))),$e=this.options.onclone,at=this.clonedReferenceElement,typeof at=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:Re.fonts&&Re.fonts.ready?[4,Re.fonts.ready]:[3,2];case 1:st.sent(),st.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,LA(Re)]:[3,4];case 3:st.sent(),st.label=4;case 4:return typeof $e=="function"?[2,Promise.resolve().then(function(){return $e(Re,at)}).then(function(){return X})]:[2,X]}})})});return Re.open(),Re.write(UA(document.doctype)+"<html></html>"),Oa(this.referenceElement.ownerDocument,ae,_e),Re.replaceChild(Re.adoptNode(this.documentElement),Re.documentElement),Re.close(),ze},w.prototype.createElementClone=function(f){if(qa(f,2))debugger;if(ms(f))return this.createCanvasClone(f);if(v(f))return this.createVideoClone(f);if(Z(f))return this.createStyleClone(f);var R=f.cloneNode(!1);return x(R)&&(x(f)&&f.currentSrc&&f.currentSrc!==f.src&&(R.src=f.currentSrc,R.srcset=""),R.loading==="lazy"&&(R.loading="eager")),Ue(R)?this.createCustomElementClone(R):R},w.prototype.createCustomElementClone=function(f){var R=document.createElement("html2canvascustomelement");return Ia(f.style,R),R},w.prototype.createStyleClone=function(f){try{var R=f.sheet;if(R&&R.cssRules){var S=[].slice.call(R.cssRules,0).reduce(function(ae,_e){return _e&&typeof _e.cssText=="string"?ae+_e.cssText:ae},""),X=f.cloneNode(!1);return X.textContent=S,X}}catch(ae){if(this.context.logger.error("Unable to access cssRules property",ae),ae.name!=="SecurityError")throw ae}return f.cloneNode(!1)},w.prototype.createCanvasClone=function(f){var R;if(this.options.inlineImages&&f.ownerDocument){var S=f.ownerDocument.createElement("img");try{return S.src=f.toDataURL(),S}catch(ze){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",f)}}var X=f.cloneNode(!1);try{X.width=f.width,X.height=f.height;var ae=f.getContext("2d"),_e=X.getContext("2d");if(_e)if(!this.options.allowTaint&&ae)_e.putImageData(ae.getImageData(0,0,f.width,f.height),0,0);else{var De=(R=f.getContext("webgl2"))!==null&&R!==void 0?R:f.getContext("webgl");if(De){var Re=De.getContextAttributes();(Re==null?void 0:Re.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",f)}_e.drawImage(f,0,0)}return X}catch(ze){this.context.logger.info("Unable to clone canvas as it is tainted",f)}return X},w.prototype.createVideoClone=function(f){var R=f.ownerDocument.createElement("canvas");R.width=f.offsetWidth,R.height=f.offsetHeight;var S=R.getContext("2d");try{return S&&(S.drawImage(f,0,0,R.width,R.height),this.options.allowTaint||S.getImageData(0,0,R.width,R.height)),R}catch(ae){this.context.logger.info("Unable to clone video as it is tainted",f)}var X=f.ownerDocument.createElement("canvas");return X.width=f.offsetWidth,X.height=f.offsetHeight,X},w.prototype.appendChildNode=function(f,R,S){(!ri(R)||!ce(R)&&!R.hasAttribute(mn)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(R)))&&((!this.options.copyStyles||!ri(R)||!Z(R))&&f.appendChild(this.cloneNode(R,S)))},w.prototype.cloneChildNodes=function(f,R,S){for(var X=this,ae=f.shadowRoot?f.shadowRoot.firstChild:f.firstChild;ae;ae=ae.nextSibling)if(ri(ae)&&be(ae)&&typeof ae.assignedNodes=="function"){var _e=ae.assignedNodes();_e.length&&_e.forEach(function(De){return X.appendChildNode(R,De,S)})}else this.appendChildNode(R,ae,S)},w.prototype.cloneNode=function(f,R){if(Oo(f))return document.createTextNode(f.data);if(!f.ownerDocument)return f.cloneNode(!1);var S=f.ownerDocument.defaultView;if(S&&ri(f)&&(fs(f)||Sa(f))){var X=this.createElementClone(f);X.style.transitionProperty="none";var ae=S.getComputedStyle(f),_e=S.getComputedStyle(f,":before"),De=S.getComputedStyle(f,":after");this.referenceElement===f&&fs(X)&&(this.clonedReferenceElement=X),gs(X)&&MA(X);var Re=this.counters.parse(new Za(this.context,ae)),ze=this.resolvePseudoContent(f,X,_e,Mn.BEFORE);Ue(f)&&(R=!0),v(f)||this.cloneChildNodes(f,X,R),ze&&X.insertBefore(ze,X.firstChild);var $e=this.resolvePseudoContent(f,X,De,Mn.AFTER);return $e&&X.appendChild($e),this.counters.pop(Re),(ae&&(this.options.copyStyles||Sa(f))&&!P(f)||R)&&Ia(ae,X),(f.scrollTop!==0||f.scrollLeft!==0)&&this.scrolledElements.push([X,f.scrollLeft,f.scrollTop]),(ue(f)||ye(f))&&(ue(X)||ye(X))&&(X.value=f.value),X}return f.cloneNode(!1)},w.prototype.resolvePseudoContent=function(f,R,S,X){var ae=this;if(!S)return;var _e=S.content,De=R.ownerDocument;if(!De||!_e||_e==="none"||_e==="-moz-alt-content"||S.display==="none")return;this.counters.parse(new Za(this.context,S));var Re=new ga(this.context,S),ze=De.createElement("html2canvaspseudoelement");Ia(S,ze),Re.content.forEach(function(at){if(at.type===0)ze.appendChild(De.createTextNode(at.value));else if(at.type===22){var st=De.createElement("img");st.src=at.value,st.style.opacity="1",ze.appendChild(st)}else if(at.type===18){if(at.name==="attr"){var Ut=at.values.filter(Rr);Ut.length&&ze.appendChild(De.createTextNode(f.getAttribute(Ut[0].value)||""))}else if(at.name==="counter"){var _t=at.values.filter(jn),St=_t[0],rr=_t[1];if(St&&Rr(St)){var Lt=ae.counters.getCounterValue(St.value),Nt=rr&&Rr(rr)?hn.parse(ae.context,rr.value):3;ze.appendChild(De.createTextNode(on(Lt,Nt,!1)))}}else if(at.name==="counters"){var wr=at.values.filter(jn),St=wr[0],fr=wr[1],rr=wr[2];if(St&&Rr(St)){var xr=ae.counters.getCounterValues(St.value),Ft=rr&&Rr(rr)?hn.parse(ae.context,rr.value):3,Tr=fr&&fr.type===0?fr.value:"",Br=xr.map(function(wn){return on(wn,Ft,!1)}).join(Tr);ze.appendChild(De.createTextNode(Br))}}}else if(at.type===20)switch(at.value){case"open-quote":ze.appendChild(De.createTextNode(no(Re.quotes,ae.quoteDepth++,!0)));break;case"close-quote":ze.appendChild(De.createTextNode(no(Re.quotes,--ae.quoteDepth,!1)));break;default:ze.appendChild(De.createTextNode(at.value))}}),ze.className=ys+" "+bs;var $e=X===Mn.BEFORE?" "+ys:" "+bs;return Sa(R)?R.className.baseValue+=$e:R.className+=$e,ze},w.destroy=function(f){return f.parentNode?(f.parentNode.removeChild(f),!0):!1},w}(),Mn;(function(w){w[w.BEFORE=0]="BEFORE",w[w.AFTER=1]="AFTER"})(Mn||(Mn={}));var vi=function(w,f){var R=w.createElement("iframe");return R.className="html2canvas-container",R.style.visibility="hidden",R.style.position="fixed",R.style.left="-10000px",R.style.top="0px",R.style.border="0",R.width=f.width.toString(),R.height=f.height.toString(),R.scrolling="no",R.setAttribute(mn,"true"),w.body.appendChild(R),R},zi=function(w){return new Promise(function(f){if(w.complete){f();return}if(!w.src){f();return}w.onload=f,w.onerror=f})},LA=function(w){return Promise.all([].slice.call(w.images,0).map(zi))},Lo=function(w){return new Promise(function(f,R){var S=w.contentWindow;if(!S)return R("No window assigned for iframe");var X=S.document;S.onload=w.onload=function(){S.onload=w.onload=null;var ae=setInterval(function(){X.body.childNodes.length>0&&X.readyState==="complete"&&(clearInterval(ae),f(w))},50)}})},Uo=["all","d","content"],Ia=function(w,f){for(var R=w.length-1;R>=0;R--){var S=w.item(R);Uo.indexOf(S)===-1&&f.style.setProperty(S,w.getPropertyValue(S))}return f},UA=function(w){var f="";return w&&(f+="<!DOCTYPE ",w.name&&(f+=w.name),w.internalSubset&&(f+=w.internalSubset),w.publicId&&(f+='"'+w.publicId+'"'),w.systemId&&(f+='"'+w.systemId+'"'),f+=">"),f},Oa=function(w,f,R){w&&w.defaultView&&(f!==w.defaultView.pageXOffset||R!==w.defaultView.pageYOffset)&&w.defaultView.scrollTo(f,R)},FA=function(w){var f=w[0],R=w[1],S=w[2];f.scrollLeft=R,f.scrollTop=S},NA=":before",vs=":after",ys="___html2canvas___pseudoelement_before",bs="___html2canvas___pseudoelement_after",Fo=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,MA=function(w){PA(w,"."+ys+NA+Fo+`
|
|
.`+bs+vs+Fo)},PA=function(w,f){var R=w.ownerDocument;if(R){var S=R.createElement("style");S.textContent=f,w.appendChild(S)}},No=function(){function w(){}return w.getOrigin=function(f){var R=w._link;return R?(R.href=f,R.href=R.href,R.protocol+R.hostname+R.port):"about:blank"},w.isSameOrigin=function(f){return w.getOrigin(f)===w._origin},w.setContext=function(f){w._link=f.document.createElement("a"),w._origin=w.getOrigin(f.location.href)},w._origin="about:blank",w}(),qA=function(){function w(f,R){this.context=f,this._options=R,this._cache={}}return w.prototype.addImage=function(f){var R=Promise.resolve();return this.has(f)||(HA(f)||nu(f))&&(this._cache[f]=this.loadImage(f)).catch(function(){}),R},w.prototype.match=function(f){return this._cache[f]},w.prototype.loadImage=function(f){return V(this,void 0,void 0,function(){var R,S,X,ae,_e=this;return U(this,function(De){switch(De.label){case 0:return R=No.isSameOrigin(f),S=!kA(f)&&this._options.useCORS===!0&&nn.SUPPORT_CORS_IMAGES&&!R,X=!kA(f)&&!R&&!HA(f)&&typeof this._options.proxy=="string"&&nn.SUPPORT_CORS_XHR&&!S,!R&&this._options.allowTaint===!1&&!kA(f)&&!HA(f)&&!X&&!S?[2]:(ae=f,X?[4,this.proxy(ae)]:[3,2]);case 1:ae=De.sent(),De.label=2;case 2:return this.context.logger.debug("Added image "+f.substring(0,256)),[4,new Promise(function(Re,ze){var $e=new Image;$e.onload=function(){return Re($e)},$e.onerror=ze,(iu(ae)||S)&&($e.crossOrigin="anonymous"),$e.src=ae,$e.complete===!0&&setTimeout(function(){return Re($e)},500),_e._options.imageTimeout>0&&setTimeout(function(){return ze("Timed out ("+_e._options.imageTimeout+"ms) loading image")},_e._options.imageTimeout)})];case 3:return[2,De.sent()]}})})},w.prototype.has=function(f){return typeof this._cache[f]!="undefined"},w.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},w.prototype.proxy=function(f){var R=this,S=this._options.proxy;if(!S)throw new Error("No proxy defined");var X=f.substring(0,256);return new Promise(function(ae,_e){var De=nn.SUPPORT_RESPONSE_TYPE?"blob":"text",Re=new XMLHttpRequest;Re.onload=function(){if(Re.status===200)if(De==="text")ae(Re.response);else{var at=new FileReader;at.addEventListener("load",function(){return ae(at.result)},!1),at.addEventListener("error",function(st){return _e(st)},!1),at.readAsDataURL(Re.response)}else _e("Failed to proxy resource "+X+" with status code "+Re.status)},Re.onerror=_e;var ze=S.indexOf("?")>-1?"&":"?";if(Re.open("GET",""+S+ze+"url="+encodeURIComponent(f)+"&responseType="+De),De!=="text"&&Re instanceof XMLHttpRequest&&(Re.responseType=De),R._options.imageTimeout){var $e=R._options.imageTimeout;Re.timeout=$e,Re.ontimeout=function(){return _e("Timed out ("+$e+"ms) proxying "+X)}}Re.send()})},w}(),eu=/^data:image\/svg\+xml/i,tu=/^data:image\/.*;base64,/i,ru=/^data:image\/.*/i,nu=function(w){return nn.SUPPORT_SVG_DRAWING||!au(w)},kA=function(w){return ru.test(w)},iu=function(w){return tu.test(w)},HA=function(w){return w.substr(0,4)==="blob"},au=function(w){return w.substr(-3).toLowerCase()==="svg"||eu.test(w)},Dt=function(){function w(f,R){this.type=0,this.x=f,this.y=R}return w.prototype.add=function(f,R){return new w(this.x+f,this.y+R)},w}(),Ra=function(w,f,R){return new Dt(w.x+(f.x-w.x)*R,w.y+(f.y-w.y)*R)},Mo=function(){function w(f,R,S,X){this.type=1,this.start=f,this.startControl=R,this.endControl=S,this.end=X}return w.prototype.subdivide=function(f,R){var S=Ra(this.start,this.startControl,f),X=Ra(this.startControl,this.endControl,f),ae=Ra(this.endControl,this.end,f),_e=Ra(S,X,f),De=Ra(X,ae,f),Re=Ra(_e,De,f);return R?new w(this.start,S,_e,Re):new w(Re,De,ae,this.end)},w.prototype.add=function(f,R){return new w(this.start.add(f,R),this.startControl.add(f,R),this.endControl.add(f,R),this.end.add(f,R))},w.prototype.reverse=function(){return new w(this.end,this.endControl,this.startControl,this.start)},w}(),Rn=function(w){return w.type===1},su=function(){function w(f){var R=f.styles,S=f.bounds,X=Fn(R.borderTopLeftRadius,S.width,S.height),ae=X[0],_e=X[1],De=Fn(R.borderTopRightRadius,S.width,S.height),Re=De[0],ze=De[1],$e=Fn(R.borderBottomRightRadius,S.width,S.height),at=$e[0],st=$e[1],Ut=Fn(R.borderBottomLeftRadius,S.width,S.height),_t=Ut[0],St=Ut[1],rr=[];rr.push((ae+Re)/S.width),rr.push((_t+at)/S.width),rr.push((_e+St)/S.height),rr.push((ze+st)/S.height);var Lt=Math.max.apply(Math,rr);Lt>1&&(ae/=Lt,_e/=Lt,Re/=Lt,ze/=Lt,at/=Lt,st/=Lt,_t/=Lt,St/=Lt);var Nt=S.width-Re,wr=S.height-st,fr=S.width-at,xr=S.height-St,Ft=R.borderTopWidth,Tr=R.borderRightWidth,Br=R.borderBottomWidth,ur=R.borderLeftWidth,Tn=Dr(R.paddingTop,f.bounds.width),wn=Dr(R.paddingRight,f.bounds.width),Sn=Dr(R.paddingBottom,f.bounds.width),An=Dr(R.paddingLeft,f.bounds.width);this.topLeftBorderDoubleOuterBox=ae>0||_e>0?Vr(S.left+ur/3,S.top+Ft/3,ae-ur/3,_e-Ft/3,Ur.TOP_LEFT):new Dt(S.left+ur/3,S.top+Ft/3),this.topRightBorderDoubleOuterBox=ae>0||_e>0?Vr(S.left+Nt,S.top+Ft/3,Re-Tr/3,ze-Ft/3,Ur.TOP_RIGHT):new Dt(S.left+S.width-Tr/3,S.top+Ft/3),this.bottomRightBorderDoubleOuterBox=at>0||st>0?Vr(S.left+fr,S.top+wr,at-Tr/3,st-Br/3,Ur.BOTTOM_RIGHT):new Dt(S.left+S.width-Tr/3,S.top+S.height-Br/3),this.bottomLeftBorderDoubleOuterBox=_t>0||St>0?Vr(S.left+ur/3,S.top+xr,_t-ur/3,St-Br/3,Ur.BOTTOM_LEFT):new Dt(S.left+ur/3,S.top+S.height-Br/3),this.topLeftBorderDoubleInnerBox=ae>0||_e>0?Vr(S.left+ur*2/3,S.top+Ft*2/3,ae-ur*2/3,_e-Ft*2/3,Ur.TOP_LEFT):new Dt(S.left+ur*2/3,S.top+Ft*2/3),this.topRightBorderDoubleInnerBox=ae>0||_e>0?Vr(S.left+Nt,S.top+Ft*2/3,Re-Tr*2/3,ze-Ft*2/3,Ur.TOP_RIGHT):new Dt(S.left+S.width-Tr*2/3,S.top+Ft*2/3),this.bottomRightBorderDoubleInnerBox=at>0||st>0?Vr(S.left+fr,S.top+wr,at-Tr*2/3,st-Br*2/3,Ur.BOTTOM_RIGHT):new Dt(S.left+S.width-Tr*2/3,S.top+S.height-Br*2/3),this.bottomLeftBorderDoubleInnerBox=_t>0||St>0?Vr(S.left+ur*2/3,S.top+xr,_t-ur*2/3,St-Br*2/3,Ur.BOTTOM_LEFT):new Dt(S.left+ur*2/3,S.top+S.height-Br*2/3),this.topLeftBorderStroke=ae>0||_e>0?Vr(S.left+ur/2,S.top+Ft/2,ae-ur/2,_e-Ft/2,Ur.TOP_LEFT):new Dt(S.left+ur/2,S.top+Ft/2),this.topRightBorderStroke=ae>0||_e>0?Vr(S.left+Nt,S.top+Ft/2,Re-Tr/2,ze-Ft/2,Ur.TOP_RIGHT):new Dt(S.left+S.width-Tr/2,S.top+Ft/2),this.bottomRightBorderStroke=at>0||st>0?Vr(S.left+fr,S.top+wr,at-Tr/2,st-Br/2,Ur.BOTTOM_RIGHT):new Dt(S.left+S.width-Tr/2,S.top+S.height-Br/2),this.bottomLeftBorderStroke=_t>0||St>0?Vr(S.left+ur/2,S.top+xr,_t-ur/2,St-Br/2,Ur.BOTTOM_LEFT):new Dt(S.left+ur/2,S.top+S.height-Br/2),this.topLeftBorderBox=ae>0||_e>0?Vr(S.left,S.top,ae,_e,Ur.TOP_LEFT):new Dt(S.left,S.top),this.topRightBorderBox=Re>0||ze>0?Vr(S.left+Nt,S.top,Re,ze,Ur.TOP_RIGHT):new Dt(S.left+S.width,S.top),this.bottomRightBorderBox=at>0||st>0?Vr(S.left+fr,S.top+wr,at,st,Ur.BOTTOM_RIGHT):new Dt(S.left+S.width,S.top+S.height),this.bottomLeftBorderBox=_t>0||St>0?Vr(S.left,S.top+xr,_t,St,Ur.BOTTOM_LEFT):new Dt(S.left,S.top+S.height),this.topLeftPaddingBox=ae>0||_e>0?Vr(S.left+ur,S.top+Ft,Math.max(0,ae-ur),Math.max(0,_e-Ft),Ur.TOP_LEFT):new Dt(S.left+ur,S.top+Ft),this.topRightPaddingBox=Re>0||ze>0?Vr(S.left+Math.min(Nt,S.width-Tr),S.top+Ft,Nt>S.width+Tr?0:Math.max(0,Re-Tr),Math.max(0,ze-Ft),Ur.TOP_RIGHT):new Dt(S.left+S.width-Tr,S.top+Ft),this.bottomRightPaddingBox=at>0||st>0?Vr(S.left+Math.min(fr,S.width-ur),S.top+Math.min(wr,S.height-Br),Math.max(0,at-Tr),Math.max(0,st-Br),Ur.BOTTOM_RIGHT):new Dt(S.left+S.width-Tr,S.top+S.height-Br),this.bottomLeftPaddingBox=_t>0||St>0?Vr(S.left+ur,S.top+Math.min(xr,S.height-Br),Math.max(0,_t-ur),Math.max(0,St-Br),Ur.BOTTOM_LEFT):new Dt(S.left+ur,S.top+S.height-Br),this.topLeftContentBox=ae>0||_e>0?Vr(S.left+ur+An,S.top+Ft+Tn,Math.max(0,ae-(ur+An)),Math.max(0,_e-(Ft+Tn)),Ur.TOP_LEFT):new Dt(S.left+ur+An,S.top+Ft+Tn),this.topRightContentBox=Re>0||ze>0?Vr(S.left+Math.min(Nt,S.width+ur+An),S.top+Ft+Tn,Nt>S.width+ur+An?0:Re-ur+An,ze-(Ft+Tn),Ur.TOP_RIGHT):new Dt(S.left+S.width-(Tr+wn),S.top+Ft+Tn),this.bottomRightContentBox=at>0||st>0?Vr(S.left+Math.min(fr,S.width-(ur+An)),S.top+Math.min(wr,S.height+Ft+Tn),Math.max(0,at-(Tr+wn)),st-(Br+Sn),Ur.BOTTOM_RIGHT):new Dt(S.left+S.width-(Tr+wn),S.top+S.height-(Br+Sn)),this.bottomLeftContentBox=_t>0||St>0?Vr(S.left+ur+An,S.top+xr,Math.max(0,_t-(ur+An)),St-(Br+Sn),Ur.BOTTOM_LEFT):new Dt(S.left+ur+An,S.top+S.height-(Br+Sn))}return w}(),Ur;(function(w){w[w.TOP_LEFT=0]="TOP_LEFT",w[w.TOP_RIGHT=1]="TOP_RIGHT",w[w.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",w[w.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Ur||(Ur={}));var Vr=function(w,f,R,S,X){var ae=4*((Math.sqrt(2)-1)/3),_e=R*ae,De=S*ae,Re=w+R,ze=f+S;switch(X){case Ur.TOP_LEFT:return new Mo(new Dt(w,ze),new Dt(w,ze-De),new Dt(Re-_e,f),new Dt(Re,f));case Ur.TOP_RIGHT:return new Mo(new Dt(w,f),new Dt(w+_e,f),new Dt(Re,ze-De),new Dt(Re,ze));case Ur.BOTTOM_RIGHT:return new Mo(new Dt(Re,f),new Dt(Re,f+De),new Dt(w+_e,ze),new Dt(w,ze));case Ur.BOTTOM_LEFT:default:return new Mo(new Dt(Re,ze),new Dt(Re-_e,ze),new Dt(w,f+De),new Dt(w,f))}},Po=function(w){return[w.topLeftBorderBox,w.topRightBorderBox,w.bottomRightBorderBox,w.bottomLeftBorderBox]},ou=function(w){return[w.topLeftContentBox,w.topRightContentBox,w.bottomRightContentBox,w.bottomLeftContentBox]},ko=function(w){return[w.topLeftPaddingBox,w.topRightPaddingBox,w.bottomRightPaddingBox,w.bottomLeftPaddingBox]},lu=function(){function w(f,R,S){this.offsetX=f,this.offsetY=R,this.matrix=S,this.type=0,this.target=2|4}return w}(),Ho=function(){function w(f,R){this.path=f,this.target=R,this.type=1}return w}(),Au=function(){function w(f){this.opacity=f,this.type=2,this.target=2|4}return w}(),uu=function(w){return w.type===0},WA=function(w){return w.type===1},cu=function(w){return w.type===2},GA=function(w,f){return w.length===f.length?w.some(function(R,S){return R===f[S]}):!1},du=function(w,f,R,S,X){return w.map(function(ae,_e){switch(_e){case 0:return ae.add(f,R);case 1:return ae.add(f+S,R);case 2:return ae.add(f+S,R+X);case 3:return ae.add(f,R+X)}return ae})},VA=function(){function w(f){this.element=f,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return w}(),zA=function(){function w(f,R){if(this.container=f,this.parent=R,this.effects=[],this.curves=new su(this.container),this.container.styles.opacity<1&&this.effects.push(new Au(this.container.styles.opacity)),this.container.styles.transform!==null){var S=this.container.bounds.left+this.container.styles.transformOrigin[0].number,X=this.container.bounds.top+this.container.styles.transformOrigin[1].number,ae=this.container.styles.transform;this.effects.push(new lu(S,X,ae))}if(this.container.styles.overflowX!==0){var _e=Po(this.curves),De=ko(this.curves);GA(_e,De)?this.effects.push(new Ho(_e,2|4)):(this.effects.push(new Ho(_e,2)),this.effects.push(new Ho(De,4)))}}return w.prototype.getEffects=function(f){for(var R=[2,3].indexOf(this.container.styles.position)===-1,S=this.parent,X=this.effects.slice(0);S;){var ae=S.effects.filter(function(Re){return!WA(Re)});if(R||S.container.styles.position!==0||!S.parent){if(X.unshift.apply(X,ae),R=[2,3].indexOf(S.container.styles.position)===-1,S.container.styles.overflowX!==0){var _e=Po(S.curves),De=ko(S.curves);GA(_e,De)||X.unshift(new Ho(De,2|4))}}else X.unshift.apply(X,ae);S=S.parent}return X.filter(function(Re){return Yr(Re.target,f)})},w}(),QA=function(w,f,R,S){w.container.elements.forEach(function(X){var ae=Yr(X.flags,4),_e=Yr(X.flags,2),De=new zA(X,w);Yr(X.styles.display,2048)&&S.push(De);var Re=Yr(X.flags,8)?[]:S;if(ae||_e){var ze=ae||X.styles.isPositioned()?R:f,$e=new VA(De);if(X.styles.isPositioned()||X.styles.opacity<1||X.styles.isTransformed()){var at=X.styles.zIndex.order;if(at<0){var st=0;ze.negativeZIndex.some(function(_t,St){return at>_t.element.container.styles.zIndex.order?(st=St,!1):st>0}),ze.negativeZIndex.splice(st,0,$e)}else if(at>0){var Ut=0;ze.positiveZIndex.some(function(_t,St){return at>=_t.element.container.styles.zIndex.order?(Ut=St+1,!1):Ut>0}),ze.positiveZIndex.splice(Ut,0,$e)}else ze.zeroOrAutoZIndexOrTransformedOrOpacity.push($e)}else X.styles.isFloating()?ze.nonPositionedFloats.push($e):ze.nonPositionedInlineLevel.push($e);QA(De,$e,ae?$e:R,Re)}else X.styles.isInlineLevel()?f.inlineLevel.push(De):f.nonInlineLevel.push(De),QA(De,f,R,Re);Yr(X.flags,8)&&XA(X,Re)})},XA=function(w,f){for(var R=w instanceof ds?w.start:1,S=w instanceof ds?w.reversed:!1,X=0;X<f.length;X++){var ae=f[X];ae.container instanceof Co&&typeof ae.container.value=="number"&&ae.container.value!==0&&(R=ae.container.value),ae.listValue=on(R,ae.container.styles.listStyleType,!0),R+=S?-1:1}},hu=function(w){var f=new zA(w,null),R=new VA(f),S=[];return QA(f,R,R,S),XA(f.container,S),R},YA=function(w,f){switch(f){case 0:return Dn(w.topLeftBorderBox,w.topLeftPaddingBox,w.topRightBorderBox,w.topRightPaddingBox);case 1:return Dn(w.topRightBorderBox,w.topRightPaddingBox,w.bottomRightBorderBox,w.bottomRightPaddingBox);case 2:return Dn(w.bottomRightBorderBox,w.bottomRightPaddingBox,w.bottomLeftBorderBox,w.bottomLeftPaddingBox);case 3:default:return Dn(w.bottomLeftBorderBox,w.bottomLeftPaddingBox,w.topLeftBorderBox,w.topLeftPaddingBox)}},fu=function(w,f){switch(f){case 0:return Dn(w.topLeftBorderBox,w.topLeftBorderDoubleOuterBox,w.topRightBorderBox,w.topRightBorderDoubleOuterBox);case 1:return Dn(w.topRightBorderBox,w.topRightBorderDoubleOuterBox,w.bottomRightBorderBox,w.bottomRightBorderDoubleOuterBox);case 2:return Dn(w.bottomRightBorderBox,w.bottomRightBorderDoubleOuterBox,w.bottomLeftBorderBox,w.bottomLeftBorderDoubleOuterBox);case 3:default:return Dn(w.bottomLeftBorderBox,w.bottomLeftBorderDoubleOuterBox,w.topLeftBorderBox,w.topLeftBorderDoubleOuterBox)}},pu=function(w,f){switch(f){case 0:return Dn(w.topLeftBorderDoubleInnerBox,w.topLeftPaddingBox,w.topRightBorderDoubleInnerBox,w.topRightPaddingBox);case 1:return Dn(w.topRightBorderDoubleInnerBox,w.topRightPaddingBox,w.bottomRightBorderDoubleInnerBox,w.bottomRightPaddingBox);case 2:return Dn(w.bottomRightBorderDoubleInnerBox,w.bottomRightPaddingBox,w.bottomLeftBorderDoubleInnerBox,w.bottomLeftPaddingBox);case 3:default:return Dn(w.bottomLeftBorderDoubleInnerBox,w.bottomLeftPaddingBox,w.topLeftBorderDoubleInnerBox,w.topLeftPaddingBox)}},gu=function(w,f){switch(f){case 0:return Qo(w.topLeftBorderStroke,w.topRightBorderStroke);case 1:return Qo(w.topRightBorderStroke,w.bottomRightBorderStroke);case 2:return Qo(w.bottomRightBorderStroke,w.bottomLeftBorderStroke);case 3:default:return Qo(w.bottomLeftBorderStroke,w.topLeftBorderStroke)}},Qo=function(w,f){var R=[];return Rn(w)?R.push(w.subdivide(.5,!1)):R.push(w),Rn(f)?R.push(f.subdivide(.5,!0)):R.push(f),R},Dn=function(w,f,R,S){var X=[];return Rn(w)?X.push(w.subdivide(.5,!1)):X.push(w),Rn(R)?X.push(R.subdivide(.5,!0)):X.push(R),Rn(S)?X.push(S.subdivide(.5,!0).reverse()):X.push(S),Rn(f)?X.push(f.subdivide(.5,!1).reverse()):X.push(f),X},JA=function(w){var f=w.bounds,R=w.styles;return f.add(R.borderLeftWidth,R.borderTopWidth,-(R.borderRightWidth+R.borderLeftWidth),-(R.borderTopWidth+R.borderBottomWidth))},Ko=function(w){var f=w.styles,R=w.bounds,S=Dr(f.paddingLeft,R.width),X=Dr(f.paddingRight,R.width),ae=Dr(f.paddingTop,R.width),_e=Dr(f.paddingBottom,R.width);return R.add(S+f.borderLeftWidth,ae+f.borderTopWidth,-(f.borderRightWidth+f.borderLeftWidth+S+X),-(f.borderTopWidth+f.borderBottomWidth+ae+_e))},mu=function(w,f){return w===0?f.bounds:w===2?Ko(f):JA(f)},vu=function(w,f){return w===0?f.bounds:w===2?Ko(f):JA(f)},KA=function(w,f,R){var S=mu(La(w.styles.backgroundOrigin,f),w),X=vu(La(w.styles.backgroundClip,f),w),ae=yu(La(w.styles.backgroundSize,f),R,S),_e=ae[0],De=ae[1],Re=Fn(La(w.styles.backgroundPosition,f),S.width-_e,S.height-De),ze=bu(La(w.styles.backgroundRepeat,f),Re,ae,S,X),$e=Math.round(S.left+Re[0]),at=Math.round(S.top+Re[1]);return[ze,$e,at,_e,De]},Da=function(w){return Rr(w)&&w.value===En.AUTO},jo=function(w){return typeof w=="number"},yu=function(w,f,R){var S=f[0],X=f[1],ae=f[2],_e=w[0],De=w[1];if(!_e)return[0,0];if(qr(_e)&&De&&qr(De))return[Dr(_e,R.width),Dr(De,R.height)];var Re=jo(ae);if(Rr(_e)&&(_e.value===En.CONTAIN||_e.value===En.COVER)){if(jo(ae)){var ze=R.width/R.height;return ze<ae!==(_e.value===En.COVER)?[R.width,R.width/ae]:[R.height*ae,R.height]}return[R.width,R.height]}var $e=jo(S),at=jo(X),st=$e||at;if(Da(_e)&&(!De||Da(De))){if($e&&at)return[S,X];if(!Re&&!st)return[R.width,R.height];if(st&&Re){var Ut=$e?S:X*ae,_t=at?X:S/ae;return[Ut,_t]}var St=$e?S:R.width,rr=at?X:R.height;return[St,rr]}if(Re){var Lt=0,Nt=0;return qr(_e)?Lt=Dr(_e,R.width):qr(De)&&(Nt=Dr(De,R.height)),Da(_e)?Lt=Nt*ae:(!De||Da(De))&&(Nt=Lt/ae),[Lt,Nt]}var wr=null,fr=null;if(qr(_e)?wr=Dr(_e,R.width):De&&qr(De)&&(fr=Dr(De,R.height)),wr!==null&&(!De||Da(De))&&(fr=$e&&at?wr/S*X:R.height),fr!==null&&Da(_e)&&(wr=$e&&at?fr/X*S:R.width),wr!==null&&fr!==null)return[wr,fr];throw new Error("Unable to calculate background-size for element")},La=function(w,f){var R=w[f];return typeof R=="undefined"?w[0]:R},bu=function(w,f,R,S,X){var ae=f[0],_e=f[1],De=R[0],Re=R[1];switch(w){case 2:return[new Dt(Math.round(S.left),Math.round(S.top+_e)),new Dt(Math.round(S.left+S.width),Math.round(S.top+_e)),new Dt(Math.round(S.left+S.width),Math.round(Re+S.top+_e)),new Dt(Math.round(S.left),Math.round(Re+S.top+_e))];case 3:return[new Dt(Math.round(S.left+ae),Math.round(S.top)),new Dt(Math.round(S.left+ae+De),Math.round(S.top)),new Dt(Math.round(S.left+ae+De),Math.round(S.height+S.top)),new Dt(Math.round(S.left+ae),Math.round(S.height+S.top))];case 1:return[new Dt(Math.round(S.left+ae),Math.round(S.top+_e)),new Dt(Math.round(S.left+ae+De),Math.round(S.top+_e)),new Dt(Math.round(S.left+ae+De),Math.round(S.top+_e+Re)),new Dt(Math.round(S.left+ae),Math.round(S.top+_e+Re))];default:return[new Dt(Math.round(X.left),Math.round(X.top)),new Dt(Math.round(X.left+X.width),Math.round(X.top)),new Dt(Math.round(X.left+X.width),Math.round(X.height+X.top)),new Dt(Math.round(X.left),Math.round(X.height+X.top))]}},Eu="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",$A="Hidden Text",_u=function(){function w(f){this._data={},this._document=f}return w.prototype.parseMetrics=function(f,R){var S=this._document.createElement("div"),X=this._document.createElement("img"),ae=this._document.createElement("span"),_e=this._document.body;S.style.visibility="hidden",S.style.fontFamily=f,S.style.fontSize=R,S.style.margin="0",S.style.padding="0",S.style.whiteSpace="nowrap",_e.appendChild(S),X.src=Eu,X.width=1,X.height=1,X.style.margin="0",X.style.padding="0",X.style.verticalAlign="baseline",ae.style.fontFamily=f,ae.style.fontSize=R,ae.style.margin="0",ae.style.padding="0",ae.appendChild(this._document.createTextNode($A)),S.appendChild(ae),S.appendChild(X);var De=X.offsetTop-ae.offsetTop+2;S.removeChild(ae),S.appendChild(this._document.createTextNode($A)),S.style.lineHeight="normal",X.style.verticalAlign="super";var Re=X.offsetTop-S.offsetTop+2;return _e.removeChild(S),{baseline:De,middle:Re}},w.prototype.getMetrics=function(f,R){var S=f+" "+R;return typeof this._data[S]=="undefined"&&(this._data[S]=this.parseMetrics(f,R)),this._data[S]},w}(),ZA=function(){function w(f,R){this.context=f,this.options=R}return w}(),wu=1e4,Cu=function(w){W(f,w);function f(R,S){var X=w.call(this,R,S)||this;return X._activeEffects=[],X.canvas=S.canvas?S.canvas:document.createElement("canvas"),X.ctx=X.canvas.getContext("2d"),S.canvas||(X.canvas.width=Math.floor(S.width*S.scale),X.canvas.height=Math.floor(S.height*S.scale),X.canvas.style.width=S.width+"px",X.canvas.style.height=S.height+"px"),X.fontMetrics=new _u(document),X.ctx.scale(X.options.scale,X.options.scale),X.ctx.translate(-S.x,-S.y),X.ctx.textBaseline="bottom",X._activeEffects=[],X.context.logger.debug("Canvas renderer initialized ("+S.width+"x"+S.height+") with scale "+S.scale),X}return f.prototype.applyEffects=function(R){for(var S=this;this._activeEffects.length;)this.popEffect();R.forEach(function(X){return S.applyEffect(X)})},f.prototype.applyEffect=function(R){this.ctx.save(),cu(R)&&(this.ctx.globalAlpha=R.opacity),uu(R)&&(this.ctx.translate(R.offsetX,R.offsetY),this.ctx.transform(R.matrix[0],R.matrix[1],R.matrix[2],R.matrix[3],R.matrix[4],R.matrix[5]),this.ctx.translate(-R.offsetX,-R.offsetY)),WA(R)&&(this.path(R.path),this.ctx.clip()),this._activeEffects.push(R)},f.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},f.prototype.renderStack=function(R){return V(this,void 0,void 0,function(){var S;return U(this,function(X){switch(X.label){case 0:return S=R.element.container.styles,S.isVisible()?[4,this.renderStackContent(R)]:[3,2];case 1:X.sent(),X.label=2;case 2:return[2]}})})},f.prototype.renderNode=function(R){return V(this,void 0,void 0,function(){return U(this,function(S){switch(S.label){case 0:if(Yr(R.container.flags,16))debugger;return R.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(R)]:[3,3];case 1:return S.sent(),[4,this.renderNodeContent(R)];case 2:S.sent(),S.label=3;case 3:return[2]}})})},f.prototype.renderTextWithLetterSpacing=function(R,S,X){var ae=this;if(S===0)this.ctx.fillText(R.text,R.bounds.left,R.bounds.top+X);else{var _e=Gi(R.text);_e.reduce(function(De,Re){return ae.ctx.fillText(Re,De,R.bounds.top+X),De+ae.ctx.measureText(Re).width},R.bounds.left)}},f.prototype.createFontStyle=function(R){var S=R.fontVariant.filter(function(_e){return _e==="normal"||_e==="small-caps"}).join(""),X=Iu(R.fontFamily).join(", "),ae=Ri(R.fontSize)?""+R.fontSize.number+R.fontSize.unit:R.fontSize.number+"px";return[[R.fontStyle,S,R.fontWeight,ae,X].join(" "),X,ae]},f.prototype.renderTextNode=function(R,S){return V(this,void 0,void 0,function(){var X,ae,_e,De,Re,ze,$e,at,st=this;return U(this,function(Ut){return X=this.createFontStyle(S),ae=X[0],_e=X[1],De=X[2],this.ctx.font=ae,this.ctx.direction=S.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",Re=this.fontMetrics.getMetrics(_e,De),ze=Re.baseline,$e=Re.middle,at=S.paintOrder,R.textBounds.forEach(function(_t){at.forEach(function(St){switch(St){case 0:st.ctx.fillStyle=rn(S.color),st.renderTextWithLetterSpacing(_t,S.letterSpacing,ze);var rr=S.textShadow;rr.length&&_t.text.trim().length&&(rr.slice(0).reverse().forEach(function(Lt){st.ctx.shadowColor=rn(Lt.color),st.ctx.shadowOffsetX=Lt.offsetX.number*st.options.scale,st.ctx.shadowOffsetY=Lt.offsetY.number*st.options.scale,st.ctx.shadowBlur=Lt.blur.number,st.renderTextWithLetterSpacing(_t,S.letterSpacing,ze)}),st.ctx.shadowColor="",st.ctx.shadowOffsetX=0,st.ctx.shadowOffsetY=0,st.ctx.shadowBlur=0),S.textDecorationLine.length&&(st.ctx.fillStyle=rn(S.textDecorationColor||S.color),S.textDecorationLine.forEach(function(Lt){switch(Lt){case 1:st.ctx.fillRect(_t.bounds.left,Math.round(_t.bounds.top+ze),_t.bounds.width,1);break;case 2:st.ctx.fillRect(_t.bounds.left,Math.round(_t.bounds.top),_t.bounds.width,1);break;case 3:st.ctx.fillRect(_t.bounds.left,Math.ceil(_t.bounds.top+$e),_t.bounds.width,1);break}}));break;case 1:S.webkitTextStrokeWidth&&_t.text.trim().length&&(st.ctx.strokeStyle=rn(S.webkitTextStrokeColor),st.ctx.lineWidth=S.webkitTextStrokeWidth,st.ctx.lineJoin=window.chrome?"miter":"round",st.ctx.strokeText(_t.text,_t.bounds.left,_t.bounds.top+ze)),st.ctx.strokeStyle="",st.ctx.lineWidth=0,st.ctx.lineJoin="miter";break}})}),[2]})})},f.prototype.renderReplacedElement=function(R,S,X){if(X&&R.intrinsicWidth>0&&R.intrinsicHeight>0){var ae=Ko(R),_e=ko(S);this.path(_e),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(X,0,0,R.intrinsicWidth,R.intrinsicHeight,ae.left,ae.top,ae.width,ae.height),this.ctx.restore()}},f.prototype.renderNodeContent=function(R){return V(this,void 0,void 0,function(){var S,X,ae,_e,De,Re,ze,ze,$e,at,st,Ut,_t,St,rr,Lt,Nt,wr,fr,ze,xr,_t,Lt;return U(this,function(Ft){switch(Ft.label){case 0:this.applyEffects(R.getEffects(4)),S=R.container,X=R.curves,ae=S.styles,_e=0,De=S.textNodes,Ft.label=1;case 1:return _e<De.length?(Re=De[_e],[4,this.renderTextNode(Re,ae)]):[3,4];case 2:Ft.sent(),Ft.label=3;case 3:return _e++,[3,1];case 4:if(!(S instanceof cs))return[3,8];Ft.label=5;case 5:return Ft.trys.push([5,7,,8]),[4,this.context.cache.match(S.src)];case 6:return ze=Ft.sent(),this.renderReplacedElement(S,X,ze),[3,8];case 7:return Ft.sent(),this.context.logger.error("Error loading image "+S.src),[3,8];case 8:if(S instanceof _o&&this.renderReplacedElement(S,X,S.canvas),!(S instanceof wo))return[3,12];Ft.label=9;case 9:return Ft.trys.push([9,11,,12]),[4,this.context.cache.match(S.svg)];case 10:return ze=Ft.sent(),this.renderReplacedElement(S,X,ze),[3,12];case 11:return Ft.sent(),this.context.logger.error("Error loading svg "+S.svg.substring(0,255)),[3,12];case 12:return S instanceof Bo&&S.tree?($e=new f(this.context,{scale:this.options.scale,backgroundColor:S.backgroundColor,x:0,y:0,width:S.width,height:S.height}),[4,$e.render(S.tree)]):[3,14];case 13:at=Ft.sent(),S.width&&S.height&&this.ctx.drawImage(at,0,0,S.width,S.height,S.bounds.left,S.bounds.top,S.bounds.width,S.bounds.height),Ft.label=14;case 14:if(S instanceof Ba&&(st=Math.min(S.bounds.width,S.bounds.height),S.type===Ta?S.checked&&(this.ctx.save(),this.path([new Dt(S.bounds.left+st*.39363,S.bounds.top+st*.79),new Dt(S.bounds.left+st*.16,S.bounds.top+st*.5549),new Dt(S.bounds.left+st*.27347,S.bounds.top+st*.44071),new Dt(S.bounds.left+st*.39694,S.bounds.top+st*.5649),new Dt(S.bounds.left+st*.72983,S.bounds.top+st*.23),new Dt(S.bounds.left+st*.84,S.bounds.top+st*.34085),new Dt(S.bounds.left+st*.39363,S.bounds.top+st*.79)]),this.ctx.fillStyle=rn(To),this.ctx.fill(),this.ctx.restore()):S.type===xa&&(S.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(S.bounds.left+st/2,S.bounds.top+st/2,st/4,0,Math.PI*2,!0),this.ctx.fillStyle=rn(To),this.ctx.fill(),this.ctx.restore()))),Tu(S)&&S.value.length){Ut=this.createFontStyle(ae),_t=Ut[0],St=Ut[1],rr=this.fontMetrics.getMetrics(_t,St).baseline,this.ctx.font=_t,this.ctx.fillStyle=rn(ae.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Bu(S.styles.textAlign),Lt=Ko(S),Nt=0;switch(S.styles.textAlign){case 1:Nt+=Lt.width/2;break;case 2:Nt+=Lt.width;break}wr=Lt.add(Nt,0,0,-Lt.height/2+1),this.ctx.save(),this.path([new Dt(Lt.left,Lt.top),new Dt(Lt.left+Lt.width,Lt.top),new Dt(Lt.left+Lt.width,Lt.top+Lt.height),new Dt(Lt.left,Lt.top+Lt.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Wi(S.value,wr),ae.letterSpacing,rr),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Yr(S.styles.display,2048))return[3,20];if(!(S.styles.listStyleImage!==null))return[3,19];if(fr=S.styles.listStyleImage,!(fr.type===0))return[3,18];ze=void 0,xr=fr.url,Ft.label=15;case 15:return Ft.trys.push([15,17,,18]),[4,this.context.cache.match(xr)];case 16:return ze=Ft.sent(),this.ctx.drawImage(ze,S.bounds.left-(ze.width+10),S.bounds.top),[3,18];case 17:return Ft.sent(),this.context.logger.error("Error loading list-style-image "+xr),[3,18];case 18:return[3,20];case 19:R.listValue&&S.styles.listStyleType!==-1&&(_t=this.createFontStyle(ae)[0],this.ctx.font=_t,this.ctx.fillStyle=rn(ae.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",Lt=new q(S.bounds.left,S.bounds.top+Dr(S.styles.paddingTop,S.bounds.width),S.bounds.width,pi(ae.lineHeight,ae.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Wi(R.listValue,Lt),ae.letterSpacing,pi(ae.lineHeight,ae.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),Ft.label=20;case 20:return[2]}})})},f.prototype.renderStackContent=function(R){return V(this,void 0,void 0,function(){var S,X,ae,_e,De,ae,Re,ze,ae,$e,at,ae,st,Ut,ae,_t,St,ae,rr,Lt,ae;return U(this,function(Nt){switch(Nt.label){case 0:if(Yr(R.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(R.element)];case 1:Nt.sent(),S=0,X=R.negativeZIndex,Nt.label=2;case 2:return S<X.length?(ae=X[S],[4,this.renderStack(ae)]):[3,5];case 3:Nt.sent(),Nt.label=4;case 4:return S++,[3,2];case 5:return[4,this.renderNodeContent(R.element)];case 6:Nt.sent(),_e=0,De=R.nonInlineLevel,Nt.label=7;case 7:return _e<De.length?(ae=De[_e],[4,this.renderNode(ae)]):[3,10];case 8:Nt.sent(),Nt.label=9;case 9:return _e++,[3,7];case 10:Re=0,ze=R.nonPositionedFloats,Nt.label=11;case 11:return Re<ze.length?(ae=ze[Re],[4,this.renderStack(ae)]):[3,14];case 12:Nt.sent(),Nt.label=13;case 13:return Re++,[3,11];case 14:$e=0,at=R.nonPositionedInlineLevel,Nt.label=15;case 15:return $e<at.length?(ae=at[$e],[4,this.renderStack(ae)]):[3,18];case 16:Nt.sent(),Nt.label=17;case 17:return $e++,[3,15];case 18:st=0,Ut=R.inlineLevel,Nt.label=19;case 19:return st<Ut.length?(ae=Ut[st],[4,this.renderNode(ae)]):[3,22];case 20:Nt.sent(),Nt.label=21;case 21:return st++,[3,19];case 22:_t=0,St=R.zeroOrAutoZIndexOrTransformedOrOpacity,Nt.label=23;case 23:return _t<St.length?(ae=St[_t],[4,this.renderStack(ae)]):[3,26];case 24:Nt.sent(),Nt.label=25;case 25:return _t++,[3,23];case 26:rr=0,Lt=R.positiveZIndex,Nt.label=27;case 27:return rr<Lt.length?(ae=Lt[rr],[4,this.renderStack(ae)]):[3,30];case 28:Nt.sent(),Nt.label=29;case 29:return rr++,[3,27];case 30:return[2]}})})},f.prototype.mask=function(R){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(R.slice(0).reverse()),this.ctx.closePath()},f.prototype.path=function(R){this.ctx.beginPath(),this.formatPath(R),this.ctx.closePath()},f.prototype.formatPath=function(R){var S=this;R.forEach(function(X,ae){var _e=Rn(X)?X.start:X;ae===0?S.ctx.moveTo(_e.x,_e.y):S.ctx.lineTo(_e.x,_e.y),Rn(X)&&S.ctx.bezierCurveTo(X.startControl.x,X.startControl.y,X.endControl.x,X.endControl.y,X.end.x,X.end.y)})},f.prototype.renderRepeat=function(R,S,X,ae){this.path(R),this.ctx.fillStyle=S,this.ctx.translate(X,ae),this.ctx.fill(),this.ctx.translate(-X,-ae)},f.prototype.resizeImage=function(R,S,X){var ae;if(R.width===S&&R.height===X)return R;var _e=(ae=this.canvas.ownerDocument)!==null&&ae!==void 0?ae:document,De=_e.createElement("canvas");De.width=Math.max(1,S),De.height=Math.max(1,X);var Re=De.getContext("2d");return Re.drawImage(R,0,0,R.width,R.height,0,0,S,X),De},f.prototype.renderBackgroundImage=function(R){return V(this,void 0,void 0,function(){var S,X,ae,_e,De,Re;return U(this,function(ze){switch(ze.label){case 0:S=R.styles.backgroundImage.length-1,X=function($e){var at,st,Ut,_t,St,rr,Lt,Nt,wr,fr,_t,St,rr,Lt,Nt,xr,Ft,Tr,Br,ur,Tn,wn,Sn,An,wr,Xn,_t,yi,bi,Lt,Nt,Ei,St,rr,Xi,Yn,_i,Yi,Ji,ii,$i,ai;return U(this,function(Ua){switch(Ua.label){case 0:if(!($e.type===0))return[3,5];at=void 0,st=$e.url,Ua.label=1;case 1:return Ua.trys.push([1,3,,4]),[4,ae.context.cache.match(st)];case 2:return at=Ua.sent(),[3,4];case 3:return Ua.sent(),ae.context.logger.error("Error loading background-image "+st),[3,4];case 4:return at&&(Ut=KA(R,S,[at.width,at.height,at.width/at.height]),_t=Ut[0],St=Ut[1],rr=Ut[2],Lt=Ut[3],Nt=Ut[4],wr=ae.ctx.createPattern(ae.resizeImage(at,Lt,Nt),"repeat"),ae.renderRepeat(_t,wr,St,rr)),[3,6];case 5:ks($e)?(fr=KA(R,S,[null,null,null]),_t=fr[0],St=fr[1],rr=fr[2],Lt=fr[3],Nt=fr[4],xr=Aa($e.angle,Lt,Nt),Ft=xr[0],Tr=xr[1],Br=xr[2],ur=xr[3],Tn=xr[4],wn=document.createElement("canvas"),wn.width=Lt,wn.height=Nt,Sn=wn.getContext("2d"),An=Sn.createLinearGradient(Tr,ur,Br,Tn),Is($e.stops,Ft).forEach(function(Es){return An.addColorStop(Es.stop,rn(Es.color))}),Sn.fillStyle=An,Sn.fillRect(0,0,Lt,Nt),Lt>0&&Nt>0&&(wr=ae.ctx.createPattern(wn,"repeat"),ae.renderRepeat(_t,wr,St,rr))):qo($e)&&(Xn=KA(R,S,[null,null,null]),_t=Xn[0],yi=Xn[1],bi=Xn[2],Lt=Xn[3],Nt=Xn[4],Ei=$e.position.length===0?[Pa]:$e.position,St=Dr(Ei[0],Lt),rr=Dr(Ei[Ei.length-1],Nt),Xi=Jo($e,St,rr,Lt,Nt),Yn=Xi[0],_i=Xi[1],Yn>0&&_i>0&&(Yi=ae.ctx.createRadialGradient(yi+St,bi+rr,0,yi+St,bi+rr,Yn),Is($e.stops,Yn*2).forEach(function(Es){return Yi.addColorStop(Es.stop,rn(Es.color))}),ae.path(_t),ae.ctx.fillStyle=Yi,Yn!==_i?(Ji=R.bounds.left+.5*R.bounds.width,ii=R.bounds.top+.5*R.bounds.height,$i=_i/Yn,ai=1/$i,ae.ctx.save(),ae.ctx.translate(Ji,ii),ae.ctx.transform(1,0,0,$i,0,0),ae.ctx.translate(-Ji,-ii),ae.ctx.fillRect(yi,ai*(bi-ii)+ii,Lt,Nt*ai),ae.ctx.restore()):ae.ctx.fill())),Ua.label=6;case 6:return S--,[2]}})},ae=this,_e=0,De=R.styles.backgroundImage.slice(0).reverse(),ze.label=1;case 1:return _e<De.length?(Re=De[_e],[5,X(Re)]):[3,4];case 2:ze.sent(),ze.label=3;case 3:return _e++,[3,1];case 4:return[2]}})})},f.prototype.renderSolidBorder=function(R,S,X){return V(this,void 0,void 0,function(){return U(this,function(ae){return this.path(YA(X,S)),this.ctx.fillStyle=rn(R),this.ctx.fill(),[2]})})},f.prototype.renderDoubleBorder=function(R,S,X,ae){return V(this,void 0,void 0,function(){var _e,De;return U(this,function(Re){switch(Re.label){case 0:return S<3?[4,this.renderSolidBorder(R,X,ae)]:[3,2];case 1:return Re.sent(),[2];case 2:return _e=fu(ae,X),this.path(_e),this.ctx.fillStyle=rn(R),this.ctx.fill(),De=pu(ae,X),this.path(De),this.ctx.fill(),[2]}})})},f.prototype.renderNodeBackgroundAndBorders=function(R){return V(this,void 0,void 0,function(){var S,X,ae,_e,De,Re,ze,$e,at=this;return U(this,function(st){switch(st.label){case 0:return this.applyEffects(R.getEffects(2)),S=R.container.styles,X=!Vn(S.backgroundColor)||S.backgroundImage.length,ae=[{style:S.borderTopStyle,color:S.borderTopColor,width:S.borderTopWidth},{style:S.borderRightStyle,color:S.borderRightColor,width:S.borderRightWidth},{style:S.borderBottomStyle,color:S.borderBottomColor,width:S.borderBottomWidth},{style:S.borderLeftStyle,color:S.borderLeftColor,width:S.borderLeftWidth}],_e=xu(La(S.backgroundClip,0),R.curves),X||S.boxShadow.length?(this.ctx.save(),this.path(_e),this.ctx.clip(),Vn(S.backgroundColor)||(this.ctx.fillStyle=rn(S.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(R.container)]):[3,2];case 1:st.sent(),this.ctx.restore(),S.boxShadow.slice(0).reverse().forEach(function(Ut){at.ctx.save();var _t=Po(R.curves),St=Ut.inset?0:wu,rr=du(_t,-St+(Ut.inset?1:-1)*Ut.spread.number,(Ut.inset?1:-1)*Ut.spread.number,Ut.spread.number*(Ut.inset?-2:2),Ut.spread.number*(Ut.inset?-2:2));Ut.inset?(at.path(_t),at.ctx.clip(),at.mask(rr)):(at.mask(_t),at.ctx.clip(),at.path(rr)),at.ctx.shadowOffsetX=Ut.offsetX.number+St,at.ctx.shadowOffsetY=Ut.offsetY.number,at.ctx.shadowColor=rn(Ut.color),at.ctx.shadowBlur=Ut.blur.number,at.ctx.fillStyle=Ut.inset?rn(Ut.color):"rgba(0,0,0,1)",at.ctx.fill(),at.ctx.restore()}),st.label=2;case 2:De=0,Re=0,ze=ae,st.label=3;case 3:return Re<ze.length?($e=ze[Re],$e.style!==0&&!Vn($e.color)&&$e.width>0?$e.style===2?[4,this.renderDashedDottedBorder($e.color,$e.width,De,R.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return st.sent(),[3,11];case 5:return $e.style===3?[4,this.renderDashedDottedBorder($e.color,$e.width,De,R.curves,3)]:[3,7];case 6:return st.sent(),[3,11];case 7:return $e.style===4?[4,this.renderDoubleBorder($e.color,$e.width,De,R.curves)]:[3,9];case 8:return st.sent(),[3,11];case 9:return[4,this.renderSolidBorder($e.color,De,R.curves)];case 10:st.sent(),st.label=11;case 11:De++,st.label=12;case 12:return Re++,[3,3];case 13:return[2]}})})},f.prototype.renderDashedDottedBorder=function(R,S,X,ae,_e){return V(this,void 0,void 0,function(){var De,Re,ze,$e,at,st,Ut,_t,St,rr,Lt,Nt,wr,fr,xr,Ft,xr,Ft;return U(this,function(Tr){return this.ctx.save(),De=gu(ae,X),Re=YA(ae,X),_e===2&&(this.path(Re),this.ctx.clip()),Rn(Re[0])?(ze=Re[0].start.x,$e=Re[0].start.y):(ze=Re[0].x,$e=Re[0].y),Rn(Re[1])?(at=Re[1].end.x,st=Re[1].end.y):(at=Re[1].x,st=Re[1].y),X===0||X===2?Ut=Math.abs(ze-at):Ut=Math.abs($e-st),this.ctx.beginPath(),_e===3?this.formatPath(De):this.formatPath(Re.slice(0,2)),_t=S<3?S*3:S*2,St=S<3?S*2:S,_e===3&&(_t=S,St=S),rr=!0,Ut<=_t*2?rr=!1:Ut<=_t*2+St?(Lt=Ut/(2*_t+St),_t*=Lt,St*=Lt):(Nt=Math.floor((Ut+St)/(_t+St)),wr=(Ut-Nt*_t)/(Nt-1),fr=(Ut-(Nt+1)*_t)/Nt,St=fr<=0||Math.abs(St-wr)<Math.abs(St-fr)?wr:fr),rr&&(_e===3?this.ctx.setLineDash([0,_t+St]):this.ctx.setLineDash([_t,St])),_e===3?(this.ctx.lineCap="round",this.ctx.lineWidth=S):this.ctx.lineWidth=S*2+1.1,this.ctx.strokeStyle=rn(R),this.ctx.stroke(),this.ctx.setLineDash([]),_e===2&&(Rn(Re[0])&&(xr=Re[3],Ft=Re[0],this.ctx.beginPath(),this.formatPath([new Dt(xr.end.x,xr.end.y),new Dt(Ft.start.x,Ft.start.y)]),this.ctx.stroke()),Rn(Re[1])&&(xr=Re[1],Ft=Re[2],this.ctx.beginPath(),this.formatPath([new Dt(xr.end.x,xr.end.y),new Dt(Ft.start.x,Ft.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},f.prototype.render=function(R){return V(this,void 0,void 0,function(){var S;return U(this,function(X){switch(X.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=rn(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),S=hu(R),[4,this.renderStack(S)];case 1:return X.sent(),this.applyEffects([]),[2,this.canvas]}})})},f}(ZA),Tu=function(w){return w instanceof xo||w instanceof hs?!0:w instanceof Ba&&w.type!==xa&&w.type!==Ta},xu=function(w,f){switch(w){case 0:return Po(f);case 2:return ou(f);case 1:default:return ko(f)}},Bu=function(w){switch(w){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Su=["-apple-system","system-ui"],Iu=function(w){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?w.filter(function(f){return Su.indexOf(f)===-1}):w},Ou=function(w){W(f,w);function f(R,S){var X=w.call(this,R,S)||this;return X.canvas=S.canvas?S.canvas:document.createElement("canvas"),X.ctx=X.canvas.getContext("2d"),X.options=S,X.canvas.width=Math.floor(S.width*S.scale),X.canvas.height=Math.floor(S.height*S.scale),X.canvas.style.width=S.width+"px",X.canvas.style.height=S.height+"px",X.ctx.scale(X.options.scale,X.options.scale),X.ctx.translate(-S.x,-S.y),X.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+S.width+"x"+S.height+" at "+S.x+","+S.y+") with scale "+S.scale),X}return f.prototype.render=function(R){return V(this,void 0,void 0,function(){var S,X;return U(this,function(ae){switch(ae.label){case 0:return S=ls(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,R),[4,Ru(S)];case 1:return X=ae.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=rn(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(X,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},f}(ZA),Ru=function(w){return new Promise(function(f,R){var S=new Image;S.onload=function(){f(S)},S.onerror=R,S.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(w))})},Du=function(){function w(f){var R=f.id,S=f.enabled;this.id=R,this.enabled=S,this.start=Date.now()}return w.prototype.debug=function(){for(var f=[],R=0;R<arguments.length;R++)f[R]=arguments[R];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,O([this.id,this.getTime()+"ms"],f)):this.info.apply(this,f))},w.prototype.getTime=function(){return Date.now()-this.start},w.prototype.info=function(){for(var f=[],R=0;R<arguments.length;R++)f[R]=arguments[R];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,O([this.id,this.getTime()+"ms"],f)))},w.prototype.warn=function(){for(var f=[],R=0;R<arguments.length;R++)f[R]=arguments[R];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,O([this.id,this.getTime()+"ms"],f)):this.info.apply(this,f))},w.prototype.error=function(){for(var f=[],R=0;R<arguments.length;R++)f[R]=arguments[R];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,O([this.id,this.getTime()+"ms"],f)):this.info.apply(this,f))},w.instances={},w}(),Lu=function(){function w(f,R){var S;this.windowBounds=R,this.instanceName="#"+w.instanceCount++,this.logger=new Du({id:this.instanceName,enabled:f.logging}),this.cache=(S=f.cache)!==null&&S!==void 0?S:new qA(this,f)}return w.instanceCount=1,w}(),Uu=function(w,f){return f===void 0&&(f={}),Fu(w,f)};typeof window!="undefined"&&No.setContext(window);var Fu=function(w,f){return V(void 0,void 0,void 0,function(){var R,S,X,ae,_e,De,Re,ze,$e,at,st,Ut,_t,St,rr,Lt,Nt,wr,fr,xr,Ft,Tr,Ft,Br,ur,Tn,wn,Sn,An,Xn,yi,bi,Ei,Xi,Yn,_i,Yi,Ji,ii,$i;return U(this,function(ai){switch(ai.label){case 0:if(!w||typeof w!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(R=w.ownerDocument,!R)throw new Error("Element is not attached to a Document");if(S=R.defaultView,!S)throw new Error("Document is not attached to a Window");return X={allowTaint:(Br=f.allowTaint)!==null&&Br!==void 0?Br:!1,imageTimeout:(ur=f.imageTimeout)!==null&&ur!==void 0?ur:15e3,proxy:f.proxy,useCORS:(Tn=f.useCORS)!==null&&Tn!==void 0?Tn:!1},ae=L({logging:(wn=f.logging)!==null&&wn!==void 0?wn:!0,cache:f.cache},X),_e={windowWidth:(Sn=f.windowWidth)!==null&&Sn!==void 0?Sn:S.innerWidth,windowHeight:(An=f.windowHeight)!==null&&An!==void 0?An:S.innerHeight,scrollX:(Xn=f.scrollX)!==null&&Xn!==void 0?Xn:S.pageXOffset,scrollY:(yi=f.scrollY)!==null&&yi!==void 0?yi:S.pageYOffset},De=new q(_e.scrollX,_e.scrollY,_e.windowWidth,_e.windowHeight),Re=new Lu(ae,De),ze=(bi=f.foreignObjectRendering)!==null&&bi!==void 0?bi:!1,$e={allowTaint:(Ei=f.allowTaint)!==null&&Ei!==void 0?Ei:!1,onclone:f.onclone,ignoreElements:f.ignoreElements,inlineImages:ze,copyStyles:ze},Re.logger.debug("Starting document clone with size "+De.width+"x"+De.height+" scrolled to "+-De.left+","+-De.top),at=new ni(Re,w,$e),st=at.clonedReferenceElement,st?[4,at.toIFrame(R,De)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Ut=ai.sent(),_t=gs(st)||DA(st)?e(st.ownerDocument):k(Re,st),St=_t.width,rr=_t.height,Lt=_t.left,Nt=_t.top,wr=Nu(Re,st,f.backgroundColor),fr={canvas:f.canvas,backgroundColor:wr,scale:(Yn=(Xi=f.scale)!==null&&Xi!==void 0?Xi:S.devicePixelRatio)!==null&&Yn!==void 0?Yn:1,x:((_i=f.x)!==null&&_i!==void 0?_i:0)+Lt,y:((Yi=f.y)!==null&&Yi!==void 0?Yi:0)+Nt,width:(Ji=f.width)!==null&&Ji!==void 0?Ji:Math.ceil(St),height:(ii=f.height)!==null&&ii!==void 0?ii:Math.ceil(rr)},ze?(Re.logger.debug("Document cloned, using foreign object rendering"),Ft=new Ou(Re,fr),[4,Ft.render(st)]):[3,3];case 2:return xr=ai.sent(),[3,5];case 3:return Re.logger.debug("Document cloned, element located at "+Lt+","+Nt+" with size "+St+"x"+rr+" using computed rendering"),Re.logger.debug("Starting DOM parsing"),Tr=Io(Re,st),wr===Tr.styles.backgroundColor&&(Tr.styles.backgroundColor=Nn.TRANSPARENT),Re.logger.debug("Starting renderer for element at "+fr.x+","+fr.y+" with size "+fr.width+"x"+fr.height),Ft=new Cu(Re,fr),[4,Ft.render(Tr)];case 4:xr=ai.sent(),ai.label=5;case 5:return(($i=f.removeContainer)!==null&&$i!==void 0?$i:!0)&&(ni.destroy(Ut)||Re.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),Re.logger.debug("Finished rendering"),[2,xr]}})})},Nu=function(w,f,R){var S=f.ownerDocument,X=S.documentElement?Li(w,getComputedStyle(S.documentElement).backgroundColor):Nn.TRANSPARENT,ae=S.body?Li(w,getComputedStyle(S.body).backgroundColor):Nn.TRANSPARENT,_e=typeof R=="string"?Li(w,R):R===null?Nn.TRANSPARENT:4294967295;return f===S.documentElement?Vn(X)?Vn(ae)?_e:ae:X:_e};return Uu})},wRmb:function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return I});var fe=K("rePB"),W=K("KQm4"),L=K("VTBJ"),V=K("Ff2n"),U=K("q1tI"),O=K.n(U),q=K("Kwbf"),k=K("Zm9Q"),e=K("hW8S");function I(i){return Object(k.a)(i).filter(function(o){return U.isValidElement(o)}).map(function(o){var n=o.key,a=o.props,r=a.children,t=Object(V.a)(a,["children"]),y=Object(L.a)({key:n},t);return r&&(y.children=I(r)),y})}function d(i){return i.reduce(function(o,n){var a=n.fixed,r=a===!0?"left":a,t=n.children;return t&&t.length>0?[].concat(Object(W.a)(o),Object(W.a)(d(t).map(function(y){return Object(L.a)({fixed:r},y)}))):[].concat(Object(W.a)(o),[Object(L.a)(Object(L.a)({},n),{},{fixed:r})])},[])}function p(i){for(var o=!0,n=0;n<i.length;n+=1){var a=i[n];if(o&&a.fixed!=="left")o=!1;else if(!o&&a.fixed==="left"){Object(q.a)(!1,"Index ".concat(n-1," of `columns` missing `fixed='left'` prop."));break}}for(var r=!0,t=i.length-1;t>=0;t-=1){var y=i[t];if(r&&y.fixed!=="right")r=!1;else if(!r&&y.fixed==="right"){Object(q.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function A(i){return i.map(function(o){var n=o.fixed,a=Object(V.a)(o,["fixed"]),r=n;return n==="left"?r="right":n==="right"&&(r="left"),Object(L.a)({fixed:r},a)})}function s(i,o){var n=i.prefixCls,a=i.columns,r=i.children,t=i.expandable,y=i.expandedKeys,b=i.getRowKey,E=i.onTriggerExpand,T=i.expandIcon,C=i.rowExpandable,h=i.expandIconColumnIndex,c=i.direction,l=i.expandRowByClick,u=U.useMemo(function(){return a||I(r)},[a,r]),_=U.useMemo(function(){if(t){var F,H=h||0,B=u[H],Q=(F={},Object(fe.a)(F,e.a,{className:"".concat(n,"-expand-icon-col")}),Object(fe.a)(F,"title",""),Object(fe.a)(F,"fixed",B?B.fixed:null),Object(fe.a)(F,"className","".concat(n,"-row-expand-icon-cell")),Object(fe.a)(F,"render",function(ee,le,Be){var Ce=b(le,Be),Me=y.has(Ce),Le=C?C(le):!0,je=T({prefixCls:n,expanded:Me,expandable:Le,record:le,onExpand:E});return l?U.createElement("span",{onClick:function(Je){return Je.stopPropagation()}},je):je}),F),z=u.slice();return H>=0&&z.splice(H,0,Q),z}return u},[t,u,b,y,T,c]),g=U.useMemo(function(){var F=_;return o&&(F=o(F)),F.length||(F=[{render:function(){return null}}]),F},[o,_,c]),m=U.useMemo(function(){return c==="rtl"?A(d(g)):d(g)},[g,c]);return[g,m]}Oe.b=s},"y0+3":function(ft,Oe,K){"use strict";K.d(Oe,"a",function(){return d}),K.d(Oe,"b",function(){return A});var fe=/margin|padding|width|height|max|min|offset/,W={left:!0,top:!0},L={cssFloat:1,styleFloat:1,float:1};function V(s){return s.nodeType===1?s.ownerDocument.defaultView.getComputedStyle(s,null):{}}function U(s,i,o){if(i=i.toLowerCase(),o==="auto"){if(i==="height")return s.offsetHeight;if(i==="width")return s.offsetWidth}return i in W||(W[i]=fe.test(i)),W[i]?parseFloat(o)||0:o}function O(s,i){var o=arguments.length,n=V(s);return i=L[i]?"cssFloat"in s.style?"cssFloat":"styleFloat":i,o===1?n:U(s,i,n[i]||s.style[i])}function q(s,i,o){var n=arguments.length;if(i=L[i]?"cssFloat"in s.style?"cssFloat":"styleFloat":i,n===3)return typeof o=="number"&&fe.test(i)&&(o="".concat(o,"px")),s.style[i]=o,o;for(var a in i)i.hasOwnProperty(a)&&q(s,a,i[a]);return V(s)}function k(s){return s===document.body?document.documentElement.clientWidth:s.offsetWidth}function e(s){return s===document.body?window.innerHeight||document.documentElement.clientHeight:s.offsetHeight}function I(){var s=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),i=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:s,height:i}}function d(){var s=document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight;return{width:s,height:i}}function p(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function A(s){var i=s.getBoundingClientRect(),o=document.documentElement;return{left:i.left+(window.pageXOffset||o.scrollLeft)-(o.clientLeft||document.body.clientLeft||0),top:i.top+(window.pageYOffset||o.scrollTop)-(o.clientTop||document.body.clientTop||0)}}}}]);
|