diff --git a/admin-views/dist/assets/BarCode-Bh7BTV9b.js b/admin-views/dist/assets/BarCode-BUOvI9nD.js similarity index 99% rename from admin-views/dist/assets/BarCode-Bh7BTV9b.js rename to admin-views/dist/assets/BarCode-BUOvI9nD.js index 44653b58..d9dd854c 100644 --- a/admin-views/dist/assets/BarCode-Bh7BTV9b.js +++ b/admin-views/dist/assets/BarCode-BUOvI9nD.js @@ -1 +1 @@ -import{p as At,t as Pt,R as te,Q as Tt}from"./index-B4ouchdD.js";var he={},U={},l={};Object.defineProperty(l,"__esModule",{value:!0});function Mt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var kt=function t(e,r){Mt(this,t),this.data=e,this.text=r.text||e,this.options=r};l.default=kt;Object.defineProperty(U,"__esModule",{value:!0});U.CODE39=void 0;var It=function(){function t(e,r){for(var n=0;n=200){u=n.shift()-105;var y=h.SWAP[u];y!==void 0?o=e.next(n,a+1,y):((i===h.SET_A||i===h.SET_B)&&u===h.SHIFT&&(n[0]=i===h.SET_A?n[0]>95?n[0]-96:n[0]:n[0]<32?n[0]+96:n[0]),o=e.next(n,a+1,i))}else u=e.correctIndex(n,i),o=e.next(n,a+1,i);var $=e.getBar(u),Rt=u*a;return{result:$+o.result,checksum:Rt+o.checksum}}}]),e}(Wt.default);P.default=tn;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var g=f,ut=function(e){return e.match(new RegExp("^"+g.A_CHARS+"*"))[0].length},ft=function(e){return e.match(new RegExp("^"+g.B_CHARS+"*"))[0].length},ct=function(e){return e.match(new RegExp("^"+g.C_CHARS+"*"))[0]};function ve(t,e){var r=e?g.A_CHARS:g.B_CHARS,n=t.match(new RegExp("^("+r+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(n)return n[1]+"Ì"+lt(t.substring(n[1].length));var a=t.match(new RegExp("^"+r+"+"))[0];return a.length===t.length?t:a+String.fromCharCode(e?205:206)+ve(t.substring(a.length),!e)}function lt(t){var e=ct(t),r=e.length;if(r===t.length)return t;t=t.substring(r);var n=ut(t)>=ft(t);return e+String.fromCharCode(n?206:205)+ve(t,n)}_e.default=function(t){var e=void 0,r=ct(t).length;if(r>=2)e=g.C_START_CHAR+lt(t);else{var n=ut(t)>ft(t);e=(n?g.A_START_CHAR:g.B_START_CHAR)+ve(t,n)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(a,i){return"Ë"+i})};Object.defineProperty(de,"__esModule",{value:!0});var nn=P,rn=ht(nn),an=_e,on=ht(an);function ht(t){return t&&t.__esModule?t:{default:t}}function un(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ae(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function fn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var cn=function(t){fn(e,t);function e(r,n){if(un(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(r))var a=ae(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,on.default)(r),n));else var a=ae(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n));return ae(a)}return e}(rn.default);de.default=cn;var se={};Object.defineProperty(se,"__esModule",{value:!0});var ln=function(){function t(e,r){for(var n=0;nn.width*10?n.width*10:n.fontSize,a.guardHeight=n.height+a.fontSize/2+n.textMargin,a}return zn(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(n,a){return this.text.substr(n,a)}},{key:"leftEncode",value:function(n,a){return(0,Ue.default)(n,a)}},{key:"rightText",value:function(n,a){return this.text.substr(n,a)}},{key:"rightEncode",value:function(n,a){return(0,Ue.default)(n,a)}},{key:"encodeGuarded",value:function(){var n={fontSize:this.fontSize},a={height:this.guardHeight};return[{data:S.SIDE_BIN,options:a},{data:this.leftEncode(),text:this.leftText(),options:n},{data:S.MIDDLE_BIN,options:a},{data:this.rightEncode(),text:this.rightText(),options:n},{data:S.SIDE_BIN,options:a}]}},{key:"encodeFlat",value:function(){var n=[S.SIDE_BIN,this.leftEncode(),S.MIDDLE_BIN,this.rightEncode(),S.SIDE_BIN];return{data:n.join(""),text:this.text}}}]),e}(Vn.default);V.default=Yn;Object.defineProperty(ge,"__esModule",{value:!0});var Zn=function(){function t(e,r){for(var n=0;nn.width*10?a.fontSize=n.width*10:a.fontSize=n.fontSize,a.guardHeight=n.height+a.fontSize/2+n.textMargin,a}return Br(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==fe(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var n="";return n+="101",n+=(0,x.default)(this.data.substr(0,6),"LLLLLL"),n+="01010",n+=(0,x.default)(this.data.substr(6,6),"RRRRRR"),n+="101",{data:n,text:this.text}}},{key:"guardedEncoding",value:function(){var n=[];return this.displayValue&&n.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),n.push({data:"101"+(0,x.default)(this.data[0],"L"),options:{height:this.guardHeight}}),n.push({data:(0,x.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),n.push({data:"01010",options:{height:this.guardHeight}}),n.push({data:(0,x.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),n.push({data:(0,x.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&n.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),n}}]),e}(Cr.default);function fe(t){var e=0,r;for(r=1;r<11;r+=2)e+=parseInt(t[r]);for(r=0;r<11;r+=2)e+=parseInt(t[r])*3;return(10-e%10)%10}L.default=Xr;var me={};Object.defineProperty(me,"__esModule",{value:!0});var zr=function(){function t(e,r){for(var n=0;nn.width*10?a.fontSize=n.width*10:a.fontSize=n.fontSize,a.guardHeight=n.height+a.fontSize/2+n.textMargin,a}return zr(e,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var n="";return n+="101",n+=this.encodeMiddleDigits(),n+="010101",{data:n,text:this.text}}},{key:"guardedEncoding",value:function(){var n=[];return this.displayValue&&n.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),n.push({data:"101",options:{height:this.guardHeight}}),n.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),n.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&n.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),n}},{key:"encodeMiddleDigits",value:function(){var n=this.upcA[0],a=this.upcA[this.upcA.length-1],i=Kr[parseInt(a)][parseInt(n)];return(0,qr.default)(this.middleDigits,i)}}]),e}(Jr.default);function Je(t,e){for(var r=parseInt(t[t.length-1]),n=Zr[r],a="",i=0,o=0;o=3&&this.number<=131070}}]),e}(ki.default);Q.pharmacode=Li;var W={};Object.defineProperty(W,"__esModule",{value:!0});W.codabar=void 0;var Ni=function(){function t(e,r){for(var n=0;n0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function Et(t,e,r){if(r.displayValue&&ee&&(e=t[r].height);return e}function Eo(t,e,r){var n;if(r)n=r;else if(typeof document<"u")n=document.createElement("canvas").getContext("2d");else return 0;n.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var a=n.measureText(t);if(!a)return 0;var i=a.width;return i}d.getMaximumHeightOfEncodings=Oo;d.getEncodingHeight=Ot;d.getBarcodePadding=Et;d.calculateEncodingAttributes=po;d.getTotalWidthOfEncodings=go;Object.defineProperty(Ie,"__esModule",{value:!0});var bo=function(){function t(e,r){for(var n=0;n0?(o=0,a.textAlign="left"):r.textAlign=="right"?(o=n.width-1,a.textAlign="right"):(o=n.width/2,a.textAlign="center"),a.fillText(n.text,o,u)}}},{key:"moveCanvasDrawing",value:function(r){var n=this.canvas.getContext("2d");n.translate(r.width,0)}},{key:"restoreCanvas",value:function(){var r=this.canvas.getContext("2d");r.restore()}}]),t}();Ie.default=xo;var De={};Object.defineProperty(De,"__esModule",{value:!0});var Ro=function(){function t(e,r){for(var n=0;n0&&(this.drawRect(y-n.width*u,o,n.width*u,n.height,r),u=0);u>0&&this.drawRect(y-n.width*(u-1),o,n.width*u,n.height,r)}},{key:"drawSVGText",value:function(r,n,a){var i=this.document.createElementNS(z,"text");if(n.displayValue){var o,u;i.setAttribute("style","font:"+n.fontOptions+" "+n.fontSize+"px "+n.font),n.textPosition=="top"?u=n.fontSize-n.textMargin:u=n.height+n.textMargin+n.fontSize,n.textAlign=="left"||a.barcodePadding>0?(o=0,i.setAttribute("text-anchor","start")):n.textAlign=="right"?(o=a.width-1,i.setAttribute("text-anchor","end")):(o=a.width/2,i.setAttribute("text-anchor","middle")),i.setAttribute("x",o),i.setAttribute("y",u),i.appendChild(this.document.createTextNode(a.text)),r.appendChild(i)}}},{key:"setSvgAttributes",value:function(r,n){var a=this.svg;a.setAttribute("width",r+"px"),a.setAttribute("height",n+"px"),a.setAttribute("x","0px"),a.setAttribute("y","0px"),a.setAttribute("viewBox","0 0 "+r+" "+n),a.setAttribute("xmlns",z),a.setAttribute("version","1.1"),a.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(r,n,a){var i=this.document.createElementNS(z,"g");return i.setAttribute("transform","translate("+r+", "+n+")"),a.appendChild(i),i}},{key:"setGroupOptions",value:function(r,n){r.setAttribute("style","fill:"+n.lineColor+";")}},{key:"drawRect",value:function(r,n,a,i,o){var u=this.document.createElementNS(z,"rect");return u.setAttribute("x",r),u.setAttribute("y",n),u.setAttribute("width",a),u.setAttribute("height",i),o.appendChild(u),u}}]),t}();De.default=ko;var je={};Object.defineProperty(je,"__esModule",{value:!0});var Io=function(){function t(e,r){for(var n=0;n"u"?"undefined":Uo(t))==="object"&&!t.nodeName)return{element:t,renderer:B.default.ObjectRenderer};throw new Jo.InvalidElementException}}function Qo(t){var e=document.querySelectorAll(t);if(e.length!==0){for(var r=[],n=0;n"u")throw Error("No element to render on was provided.");return a._renderProperties=(0,iu.default)(e),a._encodings=[],a._options=$t.default,a._errorHandler=new cu.default(a),typeof r<"u"&&(n=n||{},n.format||(n.format=xt()),a.options(n)[n.format](r,n).render()),a};ee.getModule=function(t){return E.default[t]};for(var tt in E.default)E.default.hasOwnProperty(tt)&&hu(E.default,tt);function hu(t,e){p.prototype[e]=p.prototype[e.toUpperCase()]=p.prototype[e.toLowerCase()]=function(r,n){var a=this;return a._errorHandler.wrapBarcodeCall(function(){n.text=typeof n.text>"u"?void 0:""+n.text;var i=(0,G.default)(a._options,n);i=(0,uu.default)(i);var o=t[e],u=St(r,o,i);return a._encodings.push(u),a})}}function St(t,e,r){t=""+t;var n=new e(t,r);if(!n.valid())throw new wt.InvalidInputException(n.constructor.name,t);var a=n.encode();a=(0,mt.default)(a);for(var i=0;i=200){u=n.shift()-105;var y=h.SWAP[u];y!==void 0?o=e.next(n,a+1,y):((i===h.SET_A||i===h.SET_B)&&u===h.SHIFT&&(n[0]=i===h.SET_A?n[0]>95?n[0]-96:n[0]:n[0]<32?n[0]+96:n[0]),o=e.next(n,a+1,i))}else u=e.correctIndex(n,i),o=e.next(n,a+1,i);var $=e.getBar(u),Rt=u*a;return{result:$+o.result,checksum:Rt+o.checksum}}}]),e}(Wt.default);P.default=tn;var _e={};Object.defineProperty(_e,"__esModule",{value:!0});var g=f,ut=function(e){return e.match(new RegExp("^"+g.A_CHARS+"*"))[0].length},ft=function(e){return e.match(new RegExp("^"+g.B_CHARS+"*"))[0].length},ct=function(e){return e.match(new RegExp("^"+g.C_CHARS+"*"))[0]};function ve(t,e){var r=e?g.A_CHARS:g.B_CHARS,n=t.match(new RegExp("^("+r+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(n)return n[1]+"Ì"+lt(t.substring(n[1].length));var a=t.match(new RegExp("^"+r+"+"))[0];return a.length===t.length?t:a+String.fromCharCode(e?205:206)+ve(t.substring(a.length),!e)}function lt(t){var e=ct(t),r=e.length;if(r===t.length)return t;t=t.substring(r);var n=ut(t)>=ft(t);return e+String.fromCharCode(n?206:205)+ve(t,n)}_e.default=function(t){var e=void 0,r=ct(t).length;if(r>=2)e=g.C_START_CHAR+lt(t);else{var n=ut(t)>ft(t);e=(n?g.A_START_CHAR:g.B_START_CHAR)+ve(t,n)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(a,i){return"Ë"+i})};Object.defineProperty(de,"__esModule",{value:!0});var nn=P,rn=ht(nn),an=_e,on=ht(an);function ht(t){return t&&t.__esModule?t:{default:t}}function un(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ae(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function fn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var cn=function(t){fn(e,t);function e(r,n){if(un(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(r))var a=ae(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,on.default)(r),n));else var a=ae(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n));return ae(a)}return e}(rn.default);de.default=cn;var se={};Object.defineProperty(se,"__esModule",{value:!0});var ln=function(){function t(e,r){for(var n=0;nn.width*10?n.width*10:n.fontSize,a.guardHeight=n.height+a.fontSize/2+n.textMargin,a}return zn(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(n,a){return this.text.substr(n,a)}},{key:"leftEncode",value:function(n,a){return(0,Ue.default)(n,a)}},{key:"rightText",value:function(n,a){return this.text.substr(n,a)}},{key:"rightEncode",value:function(n,a){return(0,Ue.default)(n,a)}},{key:"encodeGuarded",value:function(){var n={fontSize:this.fontSize},a={height:this.guardHeight};return[{data:S.SIDE_BIN,options:a},{data:this.leftEncode(),text:this.leftText(),options:n},{data:S.MIDDLE_BIN,options:a},{data:this.rightEncode(),text:this.rightText(),options:n},{data:S.SIDE_BIN,options:a}]}},{key:"encodeFlat",value:function(){var n=[S.SIDE_BIN,this.leftEncode(),S.MIDDLE_BIN,this.rightEncode(),S.SIDE_BIN];return{data:n.join(""),text:this.text}}}]),e}(Vn.default);V.default=Yn;Object.defineProperty(ge,"__esModule",{value:!0});var Zn=function(){function t(e,r){for(var n=0;nn.width*10?a.fontSize=n.width*10:a.fontSize=n.fontSize,a.guardHeight=n.height+a.fontSize/2+n.textMargin,a}return Br(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==fe(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var n="";return n+="101",n+=(0,x.default)(this.data.substr(0,6),"LLLLLL"),n+="01010",n+=(0,x.default)(this.data.substr(6,6),"RRRRRR"),n+="101",{data:n,text:this.text}}},{key:"guardedEncoding",value:function(){var n=[];return this.displayValue&&n.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),n.push({data:"101"+(0,x.default)(this.data[0],"L"),options:{height:this.guardHeight}}),n.push({data:(0,x.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),n.push({data:"01010",options:{height:this.guardHeight}}),n.push({data:(0,x.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),n.push({data:(0,x.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&n.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),n}}]),e}(Cr.default);function fe(t){var e=0,r;for(r=1;r<11;r+=2)e+=parseInt(t[r]);for(r=0;r<11;r+=2)e+=parseInt(t[r])*3;return(10-e%10)%10}L.default=Xr;var me={};Object.defineProperty(me,"__esModule",{value:!0});var zr=function(){function t(e,r){for(var n=0;nn.width*10?a.fontSize=n.width*10:a.fontSize=n.fontSize,a.guardHeight=n.height+a.fontSize/2+n.textMargin,a}return zr(e,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var n="";return n+="101",n+=this.encodeMiddleDigits(),n+="010101",{data:n,text:this.text}}},{key:"guardedEncoding",value:function(){var n=[];return this.displayValue&&n.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),n.push({data:"101",options:{height:this.guardHeight}}),n.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),n.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&n.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),n}},{key:"encodeMiddleDigits",value:function(){var n=this.upcA[0],a=this.upcA[this.upcA.length-1],i=Kr[parseInt(a)][parseInt(n)];return(0,qr.default)(this.middleDigits,i)}}]),e}(Jr.default);function Je(t,e){for(var r=parseInt(t[t.length-1]),n=Zr[r],a="",i=0,o=0;o=3&&this.number<=131070}}]),e}(ki.default);Q.pharmacode=Li;var W={};Object.defineProperty(W,"__esModule",{value:!0});W.codabar=void 0;var Ni=function(){function t(e,r){for(var n=0;n0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function Et(t,e,r){if(r.displayValue&&ee&&(e=t[r].height);return e}function Eo(t,e,r){var n;if(r)n=r;else if(typeof document<"u")n=document.createElement("canvas").getContext("2d");else return 0;n.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var a=n.measureText(t);if(!a)return 0;var i=a.width;return i}d.getMaximumHeightOfEncodings=Oo;d.getEncodingHeight=Ot;d.getBarcodePadding=Et;d.calculateEncodingAttributes=po;d.getTotalWidthOfEncodings=go;Object.defineProperty(Ie,"__esModule",{value:!0});var bo=function(){function t(e,r){for(var n=0;n0?(o=0,a.textAlign="left"):r.textAlign=="right"?(o=n.width-1,a.textAlign="right"):(o=n.width/2,a.textAlign="center"),a.fillText(n.text,o,u)}}},{key:"moveCanvasDrawing",value:function(r){var n=this.canvas.getContext("2d");n.translate(r.width,0)}},{key:"restoreCanvas",value:function(){var r=this.canvas.getContext("2d");r.restore()}}]),t}();Ie.default=xo;var De={};Object.defineProperty(De,"__esModule",{value:!0});var Ro=function(){function t(e,r){for(var n=0;n0&&(this.drawRect(y-n.width*u,o,n.width*u,n.height,r),u=0);u>0&&this.drawRect(y-n.width*(u-1),o,n.width*u,n.height,r)}},{key:"drawSVGText",value:function(r,n,a){var i=this.document.createElementNS(z,"text");if(n.displayValue){var o,u;i.setAttribute("style","font:"+n.fontOptions+" "+n.fontSize+"px "+n.font),n.textPosition=="top"?u=n.fontSize-n.textMargin:u=n.height+n.textMargin+n.fontSize,n.textAlign=="left"||a.barcodePadding>0?(o=0,i.setAttribute("text-anchor","start")):n.textAlign=="right"?(o=a.width-1,i.setAttribute("text-anchor","end")):(o=a.width/2,i.setAttribute("text-anchor","middle")),i.setAttribute("x",o),i.setAttribute("y",u),i.appendChild(this.document.createTextNode(a.text)),r.appendChild(i)}}},{key:"setSvgAttributes",value:function(r,n){var a=this.svg;a.setAttribute("width",r+"px"),a.setAttribute("height",n+"px"),a.setAttribute("x","0px"),a.setAttribute("y","0px"),a.setAttribute("viewBox","0 0 "+r+" "+n),a.setAttribute("xmlns",z),a.setAttribute("version","1.1"),a.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(r,n,a){var i=this.document.createElementNS(z,"g");return i.setAttribute("transform","translate("+r+", "+n+")"),a.appendChild(i),i}},{key:"setGroupOptions",value:function(r,n){r.setAttribute("style","fill:"+n.lineColor+";")}},{key:"drawRect",value:function(r,n,a,i,o){var u=this.document.createElementNS(z,"rect");return u.setAttribute("x",r),u.setAttribute("y",n),u.setAttribute("width",a),u.setAttribute("height",i),o.appendChild(u),u}}]),t}();De.default=ko;var je={};Object.defineProperty(je,"__esModule",{value:!0});var Io=function(){function t(e,r){for(var n=0;n"u"?"undefined":Uo(t))==="object"&&!t.nodeName)return{element:t,renderer:B.default.ObjectRenderer};throw new Jo.InvalidElementException}}function Qo(t){var e=document.querySelectorAll(t);if(e.length!==0){for(var r=[],n=0;n"u")throw Error("No element to render on was provided.");return a._renderProperties=(0,iu.default)(e),a._encodings=[],a._options=$t.default,a._errorHandler=new cu.default(a),typeof r<"u"&&(n=n||{},n.format||(n.format=xt()),a.options(n)[n.format](r,n).render()),a};ee.getModule=function(t){return E.default[t]};for(var tt in E.default)E.default.hasOwnProperty(tt)&&hu(E.default,tt);function hu(t,e){p.prototype[e]=p.prototype[e.toUpperCase()]=p.prototype[e.toLowerCase()]=function(r,n){var a=this;return a._errorHandler.wrapBarcodeCall(function(){n.text=typeof n.text>"u"?void 0:""+n.text;var i=(0,G.default)(a._options,n);i=(0,uu.default)(i);var o=t[e],u=St(r,o,i);return a._encodings.push(u),a})}}function St(t,e,r){t=""+t;var n=new e(t,r);if(!n.valid())throw new wt.InvalidInputException(n.constructor.name,t);var a=n.encode();a=(0,mt.default)(a);for(var i=0;i"u"&&(r=!0),c=C3(n),o=0,e=t.length;o=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1=56320&&i<=57343)){a+=encodeURIComponent(t[o]+t[o+1]),o++;continue}a+="%EF%BF%BD";continue}a+=encodeURIComponent(t[o])}return a}ln.defaultChars=";/?:@&=+$,-_.!~*'()#";ln.componentChars="-_.!~*'()";var w3=ln,Zn={};function A3(t){var n,r,o=Zn[t];if(o)return o;for(o=Zn[t]=[],n=0;n<128;n++)r=String.fromCharCode(n),o.push(r);for(n=0;n=55296&&u<=57343?p+="���":p+=String.fromCharCode(u),e+=6;continue}if((i&248)===240&&e+91114111?p+="����":(u-=65536,p+=String.fromCharCode(55296+(u>>10),56320+(u&1023))),e+=9;continue}p+="�"}return p})}un.defaultChars=";/?:@&=+$,#";un.componentChars="";var q3=un,D3=function(n){var r="";return r+=n.protocol||"",r+=n.slashes?"//":"",r+=n.auth?n.auth+"@":"",n.hostname&&n.hostname.indexOf(":")!==-1?r+="["+n.hostname+"]":r+=n.hostname||"",r+=n.port?":"+n.port:"",r+=n.pathname||"",r+=n.search||"",r+=n.hash||"",r};function cn(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var E3=/^([a-z0-9.+-]+:)/i,S3=/:[0-9]*$/,F3=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,T3=["<",">",'"',"`"," ","\r",` `," "],R3=["{","}","|","\\","^","`"].concat(T3),L3=["'"].concat(R3),Jn=["%","/","?",";","#"].concat(L3),Yn=["/","?","#"],z3=255,Wn=/^[+a-z0-9A-Z_-]{0,63}$/,I3=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Qn={javascript:!0,"javascript:":!0},Kn={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function B3(t,n){if(t&&t instanceof cn)return t;var r=new cn;return r.parse(t,n),r}cn.prototype.parse=function(t,n){var r,o,e,s,i,c=t;if(c=c.trim(),!n&&t.split("#").length===1){var a=F3.exec(c);if(a)return this.pathname=a[1],a[2]&&(this.search=a[2]),this}var l=E3.exec(c);if(l&&(l=l[0],e=l.toLowerCase(),this.protocol=l,c=c.substr(l.length)),(n||l||c.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=c.substr(0,2)==="//",i&&!(l&&Qn[l])&&(c=c.substr(2),this.slashes=!0)),!Qn[l]&&(i||l&&!Kn[l])){var u=-1;for(r=0;r127?k+="x":k+=x[d];if(!k.match(Wn)){var y=m.slice(0,r),C=m.slice(r+1),_=x.match(I3);_&&(y.push(_[1]),C.unshift(_[2])),C.length&&(c=C.join(".")+c),this.hostname=y.join(".");break}}}}this.hostname.length>z3&&(this.hostname=""),b&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var D=c.indexOf("#");D!==-1&&(this.hash=c.substr(D),c=c.slice(0,D));var F=c.indexOf("?");return F!==-1&&(this.search=c.substr(F),c=c.slice(0,F)),c&&(this.pathname=c),Kn[e]&&this.hostname&&!this.pathname&&(this.pathname=""),this};cn.prototype.parseHost=function(t){var n=S3.exec(t);n&&(n=n[0],n!==":"&&(this.port=n.substr(1)),t=t.substr(0,t.length-n.length)),t&&(this.hostname=t)};var M3=B3;J.encode=w3;J.decode=q3;J.format=D3;J.parse=M3;var O={},_n,Xn;function Tr(){return Xn||(Xn=1,_n=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),_n}var kn,nr;function Rr(){return nr||(nr=1,kn=/[\0-\x1F\x7F-\x9F]/),kn}var xn,rr;function N3(){return rr||(rr=1,xn=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),xn}var vn,tr;function Lr(){return tr||(tr=1,vn=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),vn}var or;function P3(){return or||(or=1,O.Any=Tr(),O.Cc=Rr(),O.Cf=N3(),O.P=zn,O.Z=Lr()),O}(function(t){function n(g){return Object.prototype.toString.call(g)}function r(g){return n(g)==="[object String]"}var o=Object.prototype.hasOwnProperty;function e(g,S){return o.call(g,S)}function s(g){var S=Array.prototype.slice.call(arguments,1);return S.forEach(function(A){if(A){if(typeof A!="object")throw new TypeError(A+"must be object");Object.keys(A).forEach(function(N){g[N]=A[N]})}}),g}function i(g,S,A){return[].concat(g.slice(0,S),A,g.slice(S+1))}function c(g){return!(g>=55296&&g<=57343||g>=64976&&g<=65007||(g&65535)===65535||(g&65535)===65534||g>=0&&g<=8||g===11||g>=14&&g<=31||g>=127&&g<=159||g>1114111)}function a(g){if(g>65535){g-=65536;var S=55296+(g>>10),A=56320+(g&1023);return String.fromCharCode(S,A)}return String.fromCharCode(g)}var l=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=/&([a-z#][a-z0-9]{1,31});/gi,p=new RegExp(l.source+"|"+u.source,"gi"),h=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,f=Fr;function b(g,S){var A=0;return e(f,S)?f[S]:S.charCodeAt(0)===35&&h.test(S)&&(A=S[1].toLowerCase()==="x"?parseInt(S.slice(2),16):parseInt(S.slice(1),10),c(A))?a(A):g}function m(g){return g.indexOf("\\")<0?g:g.replace(l,"$1")}function x(g){return g.indexOf("\\")<0&&g.indexOf("&")<0?g:g.replace(p,function(S,A,N){return A||b(S,N)})}var k=/[&<>"]/,d=/[&<>"]/g,v={"&":"&","<":"<",">":">",'"':"""};function y(g){return v[g]}function C(g){return k.test(g)?g.replace(d,y):g}var _=/[.?*+^$[\]\\(){}|-]/g;function D(g){return g.replace(_,"\\$&")}function F(g){switch(g){case 9:case 32:return!0}return!1}function $(g){if(g>=8192&&g<=8202)return!0;switch(g){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var w=zn;function E(g){return w.test(g)}function Q(g){switch(g){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function G(g){return g=g.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(g=g.replace(/ẞ/g,"ß")),g.toLowerCase().toUpperCase()}t.lib={},t.lib.mdurl=J,t.lib.ucmicro=P3(),t.assign=s,t.isString=r,t.has=e,t.unescapeMd=m,t.unescapeAll=x,t.isValidEntityCode=c,t.fromCodePoint=a,t.escapeHtml=C,t.arrayReplaceAt=i,t.isSpace=F,t.isWhiteSpace=$,t.isMdAsciiPunct=Q,t.isPunctChar=E,t.escapeRE=D,t.normalizeReference=G})(q);var pn={},O3=function(n,r,o){var e,s,i,c,a=-1,l=n.posMax,u=n.pos;for(n.pos=r+1,e=1;n.pos32))return a;if(e===41){if(s===0)break;s--}r++}return c===r||s!==0||(a.str=er(n.slice(c,r)),a.lines=i,a.pos=r,a.ok=!0),a},V3=q.unescapeAll,$3=function(n,r,o){var e,s,i=0,c=r,a={ok:!1,pos:0,lines:0,str:""};if(r>=o||(s=n.charCodeAt(r),s!==34&&s!==39&&s!==40))return a;for(r++,s===40&&(s=41);r"+V(t[n].content)+""};B.code_block=function(t,n,r,o,e){var s=t[n];return""+V(t[n].content)+` `};B.fence=function(t,n,r,o,e){var s=t[n],i=s.info?H3(s.info).trim():"",c="",a="",l,u,p,h,f;return i&&(p=i.split(/(\s+)/g),c=p[0],a=p.slice(2).join("")),r.highlight?l=r.highlight(s.content,c,a)||V(s.content):l=V(s.content),l.indexOf("dt in Ot?Wr(Ot,dt,{enumerable:!0,configurable:!0,writable:!0,value:Mt}):Ot[dt]=Mt;var ye=(Ot,dt,Mt)=>(Vr(Ot,typeof dt!="symbol"?dt+"":dt,Mt),Mt),hi=(Ot,dt,Mt)=>{if(!dt.has(Ot))throw TypeError("Cannot "+Mt)};var ot=(Ot,dt,Mt)=>(hi(Ot,dt,"read from private field"),Mt?Mt.call(Ot):dt.get(Ot)),_t=(Ot,dt,Mt)=>{if(dt.has(Ot))throw TypeError("Cannot add the same private member more than once");dt instanceof WeakSet?dt.add(Ot):dt.set(Ot,Mt)},Ht=(Ot,dt,Mt,ft)=>(hi(Ot,dt,"write to private field"),ft?ft.call(Ot,Mt):dt.set(Ot,Mt),Mt);var an=(Ot,dt,Mt,ft)=>({set _(At){Ht(Ot,dt,At,Mt)},get _(){return ot(Ot,dt,ft)}}),Lt=(Ot,dt,Mt)=>(hi(Ot,dt,"access private method"),Mt);import{V as getAugmentedNamespace,p as getDefaultExportFromCjs$1,s as commonjsRequire,r as reactExports,R as React,Z as warning,$ as PropTypes,j as jsx,f as jsxs,Q as themeable,Y as __read,a0 as Spinner$1,I as Icon,a1 as Input}from"./index-B4ouchdD.js";function _mergeNamespaces(Ot,dt){for(var Mt=0;Mtft[At]})}}}return Object.freeze(Object.defineProperty(Ot,Symbol.toStringTag,{value:"Module"}))}var pdf$1={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$5=getAugmentedNamespace(__viteBrowserExternal$1);(function(module,exports){(function(dt,Mt){module.exports=dt.pdfjsLib=Mt()})(globalThis,()=>(()=>{var __webpack_modules__=[,(Ot,dt)=>{var Tt;Object.defineProperty(dt,"__esModule",{value:!0}),dt.VerbosityLevel=dt.Util=dt.UnknownErrorException=dt.UnexpectedResponseException=dt.TextRenderingMode=dt.RenderingIntentFlag=dt.PromiseCapability=dt.PermissionFlag=dt.PasswordResponses=dt.PasswordException=dt.PageActionEventType=dt.OPS=dt.MissingPDFException=dt.MAX_IMAGE_SIZE_TO_CACHE=dt.LINE_FACTOR=dt.LINE_DESCENT_FACTOR=dt.InvalidPDFException=dt.ImageKind=dt.IDENTITY_MATRIX=dt.FormatError=dt.FeatureTest=dt.FONT_IDENTITY_MATRIX=dt.DocumentActionEventType=dt.CMapCompressionType=dt.BaseException=dt.BASELINE_FACTOR=dt.AnnotationType=dt.AnnotationReplyType=dt.AnnotationPrefix=dt.AnnotationMode=dt.AnnotationFlag=dt.AnnotationFieldFlag=dt.AnnotationEditorType=dt.AnnotationEditorPrefix=dt.AnnotationEditorParamsType=dt.AnnotationBorderStyleType=dt.AnnotationActionEventType=dt.AbortException=void 0,dt.assert=E,dt.bytesToString=B,dt.createValidAbsoluteUrl=q,dt.getModificationDate=at,dt.getUuid=yt,dt.getVerbosityLevel=R,dt.info=o,dt.isArrayBuffer=et,dt.isArrayEqual=nt,dt.isNodeJS=void 0,dt.normalizeUnicode=pt,dt.objectFromMap=X,dt.objectSize=st,dt.setVerbosityLevel=P,dt.shadow=W,dt.string32=it,dt.stringToBytes=tt,dt.stringToPDFString=Y,dt.stringToUTF8String=G,dt.unreachable=x,dt.utf8StringToString=K,dt.warn=g;const Mt=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser");dt.isNodeJS=Mt;const ft=[1,0,0,1,0,0];dt.IDENTITY_MATRIX=ft;const At=[.001,0,0,.001,0,0];dt.FONT_IDENTITY_MATRIX=At;const $t=1e7;dt.MAX_IMAGE_SIZE_TO_CACHE=$t;const vt=1.35;dt.LINE_FACTOR=vt;const M=.35;dt.LINE_DESCENT_FACTOR=M;const Z=M/vt;dt.BASELINE_FACTOR=Z;const n={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};dt.RenderingIntentFlag=n;const _={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};dt.AnnotationMode=_;const L="pdfjs_internal_editor_";dt.AnnotationEditorPrefix=L;const t={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15};dt.AnnotationEditorType=t;const e={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23};dt.AnnotationEditorParamsType=e;const a={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};dt.PermissionFlag=a;const v={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};dt.TextRenderingMode=v;const A={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};dt.ImageKind=A;const T={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};dt.AnnotationType=T;const d={GROUP:"Group",REPLY:"R"};dt.AnnotationReplyType=d;const i={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};dt.AnnotationFlag=i;const C={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};dt.AnnotationFieldFlag=C;const p={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};dt.AnnotationBorderStyleType=p;const b={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};dt.AnnotationActionEventType=b;const F={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};dt.DocumentActionEventType=F;const u={O:"PageOpen",C:"PageClose"};dt.PageActionEventType=u;const l={ERRORS:0,WARNINGS:1,INFOS:5};dt.VerbosityLevel=l;const y={NONE:0,BINARY:1};dt.CMapCompressionType=y;const N={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};dt.OPS=N;const U={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};dt.PasswordResponses=U;let $=l.WARNINGS;function P(xt){Number.isInteger(xt)&&($=xt)}function R(){return $}function o(xt){$>=l.INFOS&&console.log(`Info: ${xt}`)}function g(xt){$>=l.WARNINGS&&console.log(`Warning: ${xt}`)}function x(xt){throw new Error(xt)}function E(xt,wt){xt||x(wt)}function D(xt){switch(xt==null?void 0:xt.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function q(xt,wt=null,St=null){if(!xt)return null;try{if(St&&typeof xt=="string"){if(St.addDefaultProtocol&&xt.startsWith("www.")){const Ct=xt.match(/\./g);(Ct==null?void 0:Ct.length)>=2&&(xt=`http://${xt}`)}if(St.tryConvertEncoding)try{xt=G(xt)}catch{}}const Rt=wt?new URL(xt,wt):new URL(xt);if(D(Rt))return Rt}catch{}return null}function W(xt,wt,St,Rt=!1){return Object.defineProperty(xt,wt,{value:St,enumerable:!Rt,configurable:!0,writable:!1}),St}const w=function(){function wt(St,Rt){this.constructor===wt&&x("Cannot initialize BaseException."),this.message=St,this.name=Rt}return wt.prototype=new Error,wt.constructor=wt,wt}();dt.BaseException=w;class s extends w{constructor(wt,St){super(wt,"PasswordException"),this.code=St}}dt.PasswordException=s;class c extends w{constructor(wt,St){super(wt,"UnknownErrorException"),this.details=St}}dt.UnknownErrorException=c;class S extends w{constructor(wt){super(wt,"InvalidPDFException")}}dt.InvalidPDFException=S;class h extends w{constructor(wt){super(wt,"MissingPDFException")}}dt.MissingPDFException=h;class m extends w{constructor(wt,St){super(wt,"UnexpectedResponseException"),this.status=St}}dt.UnexpectedResponseException=m;class k extends w{constructor(wt){super(wt,"FormatError")}}dt.FormatError=k;class I extends w{constructor(wt){super(wt,"AbortException")}}dt.AbortException=I;function B(xt){(typeof xt!="object"||(xt==null?void 0:xt.length)===void 0)&&x("Invalid argument for bytesToString");const wt=xt.length,St=8192;if(wt>24&255,xt>>16&255,xt>>8&255,xt&255)}function st(xt){return Object.keys(xt).length}function X(xt){const wt=Object.create(null);for(const[St,Rt]of xt)wt[St]=Rt;return wt}function J(){const xt=new Uint8Array(4);return xt[0]=1,new Uint32Array(xt.buffer,0,1)[0]===1}function j(){try{return new Function(""),!0}catch{return!1}}class O{static get isLittleEndian(){return W(this,"isLittleEndian",J())}static get isEvalSupported(){return W(this,"isEvalSupported",j())}static get isOffscreenCanvasSupported(){return W(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator>"u"?W(this,"platform",{isWin:!1,isMac:!1}):W(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){var wt,St;return W(this,"isCSSRoundSupported",(St=(wt=globalThis.CSS)==null?void 0:wt.supports)==null?void 0:St.call(wt,"width: round(1.5px, 1px)"))}}dt.FeatureTest=O;const H=[...Array(256).keys()].map(xt=>xt.toString(16).padStart(2,"0"));class V{static makeHexColor(wt,St,Rt){return`#${H[wt]}${H[St]}${H[Rt]}`}static scaleMinMax(wt,St){let Rt;wt[0]?(wt[0]<0&&(Rt=St[0],St[0]=St[1],St[1]=Rt),St[0]*=wt[0],St[1]*=wt[0],wt[3]<0&&(Rt=St[2],St[2]=St[3],St[3]=Rt),St[2]*=wt[3],St[3]*=wt[3]):(Rt=St[0],St[0]=St[2],St[2]=Rt,Rt=St[1],St[1]=St[3],St[3]=Rt,wt[1]<0&&(Rt=St[2],St[2]=St[3],St[3]=Rt),St[2]*=wt[1],St[3]*=wt[1],wt[2]<0&&(Rt=St[0],St[0]=St[1],St[1]=Rt),St[0]*=wt[2],St[1]*=wt[2]),St[0]+=wt[4],St[1]+=wt[4],St[2]+=wt[5],St[3]+=wt[5]}static transform(wt,St){return[wt[0]*St[0]+wt[2]*St[1],wt[1]*St[0]+wt[3]*St[1],wt[0]*St[2]+wt[2]*St[3],wt[1]*St[2]+wt[3]*St[3],wt[0]*St[4]+wt[2]*St[5]+wt[4],wt[1]*St[4]+wt[3]*St[5]+wt[5]]}static applyTransform(wt,St){const Rt=wt[0]*St[0]+wt[1]*St[2]+St[4],Ct=wt[0]*St[1]+wt[1]*St[3]+St[5];return[Rt,Ct]}static applyInverseTransform(wt,St){const Rt=St[0]*St[3]-St[1]*St[2],Ct=(wt[0]*St[3]-wt[1]*St[2]+St[2]*St[5]-St[4]*St[3])/Rt,Gt=(-wt[0]*St[1]+wt[1]*St[0]+St[4]*St[1]-St[5]*St[0])/Rt;return[Ct,Gt]}static getAxialAlignedBoundingBox(wt,St){const Rt=this.applyTransform(wt,St),Ct=this.applyTransform(wt.slice(2,4),St),Gt=this.applyTransform([wt[0],wt[3]],St),Zt=this.applyTransform([wt[2],wt[1]],St);return[Math.min(Rt[0],Ct[0],Gt[0],Zt[0]),Math.min(Rt[1],Ct[1],Gt[1],Zt[1]),Math.max(Rt[0],Ct[0],Gt[0],Zt[0]),Math.max(Rt[1],Ct[1],Gt[1],Zt[1])]}static inverseTransform(wt){const St=wt[0]*wt[3]-wt[1]*wt[2];return[wt[3]/St,-wt[1]/St,-wt[2]/St,wt[0]/St,(wt[2]*wt[5]-wt[4]*wt[3])/St,(wt[4]*wt[1]-wt[5]*wt[0])/St]}static singularValueDecompose2dScale(wt){const St=[wt[0],wt[2],wt[1],wt[3]],Rt=wt[0]*St[0]+wt[1]*St[2],Ct=wt[0]*St[1]+wt[1]*St[3],Gt=wt[2]*St[0]+wt[3]*St[2],Zt=wt[2]*St[1]+wt[3]*St[3],Ft=(Rt+Zt)/2,Ut=Math.sqrt((Rt+Zt)**2-4*(Rt*Zt-Gt*Ct))/2,Vt=Ft+Ut||1,Wt=Ft-Ut||1;return[Math.sqrt(Vt),Math.sqrt(Wt)]}static normalizeRect(wt){const St=wt.slice(0);return wt[0]>wt[2]&&(St[0]=wt[2],St[2]=wt[0]),wt[1]>wt[3]&&(St[1]=wt[3],St[3]=wt[1]),St}static intersect(wt,St){const Rt=Math.max(Math.min(wt[0],wt[2]),Math.min(St[0],St[2])),Ct=Math.min(Math.max(wt[0],wt[2]),Math.max(St[0],St[2]));if(Rt>Ct)return null;const Gt=Math.max(Math.min(wt[1],wt[3]),Math.min(St[1],St[3])),Zt=Math.min(Math.max(wt[1],wt[3]),Math.max(St[1],St[3]));return Gt>Zt?null:[Rt,Gt,Ct,Zt]}static bezierBoundingBox(wt,St,Rt,Ct,Gt,Zt,Ft,Ut){const Vt=[],Wt=[[],[]];let Yt,re,Jt,Bt,Xt,jt,mt,rt;for(let Pt=0;Pt<2;++Pt){if(Pt===0?(re=6*wt-12*Rt+6*Gt,Yt=-3*wt+9*Rt-9*Gt+3*Ft,Jt=3*Rt-3*wt):(re=6*St-12*Ct+6*Zt,Yt=-3*St+9*Ct-9*Zt+3*Ut,Jt=3*Ct-3*St),Math.abs(Yt)<1e-12){if(Math.abs(re)<1e-12)continue;Bt=-Jt/re,0="ï"){let St;if(xt[0]==="þ"&&xt[1]==="ÿ"?St="utf-16be":xt[0]==="ÿ"&&xt[1]==="þ"?St="utf-16le":xt[0]==="ï"&&xt[1]==="»"&&xt[2]==="¿"&&(St="utf-8"),St)try{const Rt=new TextDecoder(St,{fatal:!0}),Ct=tt(xt);return Rt.decode(Ct)}catch(Rt){g(`stringToPDFString: "${Rt}".`)}}const wt=[];for(let St=0,Rt=xt.length;St{this.resolve=Rt=>{Ht(this,Tt,!0),wt(Rt)},this.reject=Rt=>{Ht(this,Tt,!0),St(Rt)}})}get settled(){return ot(this,Tt)}}Tt=new WeakMap,dt.PromiseCapability=Q;let lt=null,ut=null;function pt(xt){return lt||(lt=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,ut=new Map([["ſt","ſt"]])),xt.replaceAll(lt,(wt,St,Rt)=>St?St.normalize("NFKC"):ut.get(Rt))}function yt(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const xt=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(xt);else for(let wt=0;wt<32;wt++)xt[wt]=Math.floor(Math.random()*255);return B(xt)}const Et="pdfjs_internal_id_";dt.AnnotationPrefix=Et},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{var Ot,Mt,ft,At,Ge,vt,wn,Z,n,_,L,t,e,a,v,A,Sn,d,i,ui,p,b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,Object.defineProperty(exports,"SVGGraphics",{enumerable:!0,get:function(){return _displaySvg.SVGGraphics}}),exports.build=void 0,exports.getDocument=getDocument,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(3),_display_utils=__w_pdfjs_require__(6),_font_loader=__w_pdfjs_require__(9),_displayNode_utils=__w_pdfjs_require__(10),_canvas=__w_pdfjs_require__(11),_worker_options=__w_pdfjs_require__(14),_message_handler=__w_pdfjs_require__(15),_metadata=__w_pdfjs_require__(16),_optional_content_config=__w_pdfjs_require__(17),_transport_stream=__w_pdfjs_require__(18),_displayFetch_stream=__w_pdfjs_require__(19),_displayNetwork=__w_pdfjs_require__(22),_displayNode_stream=__w_pdfjs_require__(23),_displaySvg=__w_pdfjs_require__(24),_xfa_text=__w_pdfjs_require__(25);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=_util.isNodeJS?_displayNode_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;const DefaultCMapReaderFactory=_util.isNodeJS?_displayNode_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;const DefaultFilterFactory=_util.isNodeJS?_displayNode_utils.NodeFilterFactory:_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;const DefaultStandardFontDataFactory=_util.isNodeJS?_displayNode_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory;exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;function getDocument(u){if(typeof u=="string"||u instanceof URL?u={url:u}:(0,_util.isArrayBuffer)(u)&&(u={data:u}),typeof u!="object")throw new Error("Invalid parameter in getDocument, need parameter object.");if(!u.url&&!u.data&&!u.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const l=new PDFDocumentLoadingTask,{docId:y}=l,N=u.url?getUrlProp(u.url):null,U=u.data?getDataProp(u.data):null,$=u.httpHeaders||null,P=u.withCredentials===!0,R=u.password??null,o=u.range instanceof PDFDataRangeTransport?u.range:null,g=Number.isInteger(u.rangeChunkSize)&&u.rangeChunkSize>0?u.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let x=u.worker instanceof PDFWorker?u.worker:null;const E=u.verbosity,D=typeof u.docBaseUrl=="string"&&!(0,_display_utils.isDataScheme)(u.docBaseUrl)?u.docBaseUrl:null,q=typeof u.cMapUrl=="string"?u.cMapUrl:null,W=u.cMapPacked!==!1,w=u.CMapReaderFactory||DefaultCMapReaderFactory,s=typeof u.standardFontDataUrl=="string"?u.standardFontDataUrl:null,c=u.StandardFontDataFactory||DefaultStandardFontDataFactory,S=u.stopAtErrors!==!0,h=Number.isInteger(u.maxImageSize)&&u.maxImageSize>-1?u.maxImageSize:-1,m=u.isEvalSupported!==!1,k=typeof u.isOffscreenCanvasSupported=="boolean"?u.isOffscreenCanvasSupported:!_util.isNodeJS,I=Number.isInteger(u.canvasMaxAreaInBytes)?u.canvasMaxAreaInBytes:-1,B=typeof u.disableFontFace=="boolean"?u.disableFontFace:_util.isNodeJS,tt=u.fontExtraProperties===!0,it=u.enableXfa===!0,st=u.ownerDocument||globalThis.document,X=u.disableRange===!0,J=u.disableStream===!0,j=u.disableAutoFetch===!0,O=u.pdfBug===!0,H=o?o.length:u.length??NaN,V=typeof u.useSystemFonts=="boolean"?u.useSystemFonts:!_util.isNodeJS&&!B,z=typeof u.useWorkerFetch=="boolean"?u.useWorkerFetch:w===_display_utils.DOMCMapReaderFactory&&c===_display_utils.DOMStandardFontDataFactory&&q&&s&&(0,_display_utils.isValidFetchUrl)(q,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(s,document.baseURI),Y=u.canvasFactory||new DefaultCanvasFactory({ownerDocument:st}),G=u.filterFactory||new DefaultFilterFactory({docId:y,ownerDocument:st}),K=null;(0,_util.setVerbosityLevel)(E);const et={canvasFactory:Y,filterFactory:G};if(z||(et.cMapReaderFactory=new w({baseUrl:q,isCompressed:W}),et.standardFontDataFactory=new c({baseUrl:s})),!x){const Q={verbosity:E,port:_worker_options.GlobalWorkerOptions.workerPort};x=Q.port?PDFWorker.fromPort(Q):new PDFWorker(Q),l._worker=x}const nt={docId:y,apiVersion:"3.11.174",data:U,password:R,disableAutoFetch:j,rangeChunkSize:g,length:H,docBaseUrl:D,enableXfa:it,evaluatorOptions:{maxImageSize:h,disableFontFace:B,ignoreErrors:S,isEvalSupported:m,isOffscreenCanvasSupported:k,canvasMaxAreaInBytes:I,fontExtraProperties:tt,useSystemFonts:V,cMapUrl:z?q:null,standardFontDataUrl:z?s:null}},at={ignoreErrors:S,isEvalSupported:m,disableFontFace:B,fontExtraProperties:tt,enableXfa:it,ownerDocument:st,disableAutoFetch:j,pdfBug:O,styleElement:K};return x.promise.then(function(){if(l.destroyed)throw new Error("Loading aborted");const Q=_fetchDocument(x,nt),lt=new Promise(function(ut){let pt;o?pt=new _transport_stream.PDFDataTransportStream({length:H,initialData:o.initialData,progressiveDone:o.progressiveDone,contentDispositionFilename:o.contentDispositionFilename,disableRange:X,disableStream:J},o):U||(pt=(Et=>_util.isNodeJS?new _displayNode_stream.PDFNodeStream(Et):(0,_display_utils.isValidFetchUrl)(Et.url)?new _displayFetch_stream.PDFFetchStream(Et):new _displayNetwork.PDFNetworkStream(Et))({url:N,length:H,httpHeaders:$,withCredentials:P,rangeChunkSize:g,disableRange:X,disableStream:J})),ut(pt)});return Promise.all([Q,lt]).then(function([ut,pt]){if(l.destroyed)throw new Error("Loading aborted");const yt=new _message_handler.MessageHandler(y,ut,x.port),Et=new WorkerTransport(yt,l,pt,at,et);l._transport=Et,yt.send("Ready",null)})}).catch(l._capability.reject),l}async function _fetchDocument(u,l){if(u.destroyed)throw new Error("Worker was destroyed");const y=await u.messageHandler.sendWithPromise("GetDocRequest",l,l.data?[l.data.buffer]:null);if(u.destroyed)throw new Error("Worker was destroyed");return y}function getUrlProp(u){if(u instanceof URL)return u.href;try{return new URL(u,window.location).href}catch{if(_util.isNodeJS&&typeof u=="string")return u}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(u){if(_util.isNodeJS&&typeof Buffer<"u"&&u instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(u instanceof Uint8Array&&u.byteLength===u.buffer.byteLength)return u;if(typeof u=="string")return(0,_util.stringToBytes)(u);if(typeof u=="object"&&!isNaN(u==null?void 0:u.length)||(0,_util.isArrayBuffer)(u))return new Uint8Array(u);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}const dt=class dt{constructor(){this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId=`d${an(dt,Ot)._++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var l,y,N;this.destroyed=!0;try{(l=this._worker)!=null&&l.port&&(this._worker._pendingDestroy=!0),await((y=this._transport)==null?void 0:y.destroy())}catch(U){throw(N=this._worker)!=null&&N.port&&delete this._worker._pendingDestroy,U}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};Ot=new WeakMap,_t(dt,Ot,0);let PDFDocumentLoadingTask=dt;exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(l,y,N=!1,U=null){this.length=l,this.initialData=y,this.progressiveDone=N,this.contentDispositionFilename=U,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(l){this._rangeListeners.push(l)}addProgressListener(l){this._progressListeners.push(l)}addProgressiveReadListener(l){this._progressiveReadListeners.push(l)}addProgressiveDoneListener(l){this._progressiveDoneListeners.push(l)}onDataRange(l,y){for(const N of this._rangeListeners)N(l,y)}onDataProgress(l,y){this._readyCapability.promise.then(()=>{for(const N of this._progressListeners)N(l,y)})}onDataProgressiveRead(l){this._readyCapability.promise.then(()=>{for(const y of this._progressiveReadListeners)y(l)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const l of this._progressiveDoneListeners)l()})}transportReady(){this._readyCapability.resolve()}requestDataRange(l,y){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(l,y){this._pdfInfo=l,this._transport=y,Object.defineProperty(this,"getJavaScript",{value:()=>((0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead."),this.getJSActions().then(N=>{if(!N)return N;const U=[];for(const $ in N)U.push(...N[$]);return U}))})}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(l){return this._transport.getPage(l)}getPageIndex(l){return this._transport.getPageIndex(l)}getDestinations(){return this._transport.getDestinations()}getDestination(l){return this._transport.getDestination(l)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(l=!1){return this._transport.startCleanup(l||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(l,y,N,U=!1){_t(this,At);_t(this,vt);_t(this,Mt,null);_t(this,ft,!1);this._pageIndex=l,this._pageInfo=y,this._transport=N,this._stats=U?new _display_utils.StatTimer:null,this._pdfBug=U,this.commonObjs=N.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:l,rotation:y=this.rotate,offsetX:N=0,offsetY:U=0,dontFlip:$=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:l,rotation:y,offsetX:N,offsetY:U,dontFlip:$})}getAnnotations({intent:l="display"}={}){const y=this._transport.getRenderingIntent(l);return this._transport.getAnnotations(this._pageIndex,y.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var l;return((l=this._transport._htmlForXfa)==null?void 0:l.children[this._pageIndex])||null}render({canvasContext:l,viewport:y,intent:N="display",annotationMode:U=_util.AnnotationMode.ENABLE,transform:$=null,background:P=null,optionalContentConfigPromise:R=null,annotationCanvasMap:o=null,pageColors:g=null,printAnnotationStorage:x=null}){var c,S;(c=this._stats)==null||c.time("Overall");const E=this._transport.getRenderingIntent(N,U,x);Ht(this,ft,!1),Lt(this,vt,wn).call(this),R||(R=this._transport.getOptionalContentConfig());let D=this._intentStates.get(E.cacheKey);D||(D=Object.create(null),this._intentStates.set(E.cacheKey,D)),D.streamReaderCancelTimeout&&(clearTimeout(D.streamReaderCancelTimeout),D.streamReaderCancelTimeout=null);const q=!!(E.renderingIntent&_util.RenderingIntentFlag.PRINT);D.displayReadyCapability||(D.displayReadyCapability=new _util.PromiseCapability,D.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(S=this._stats)==null||S.time("Page Request"),this._pumpOperatorList(E));const W=h=>{var m,k;D.renderTasks.delete(w),(this._maybeCleanupAfterRender||q)&&Ht(this,ft,!0),Lt(this,At,Ge).call(this,!q),h?(w.capability.reject(h),this._abortOperatorList({intentState:D,reason:h instanceof Error?h:new Error(h)})):w.capability.resolve(),(m=this._stats)==null||m.timeEnd("Rendering"),(k=this._stats)==null||k.timeEnd("Overall")},w=new InternalRenderTask({callback:W,params:{canvasContext:l,viewport:y,transform:$,background:P},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:o,operatorList:D.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!q,pdfBug:this._pdfBug,pageColors:g});(D.renderTasks||(D.renderTasks=new Set)).add(w);const s=w.task;return Promise.all([D.displayReadyCapability.promise,R]).then(([h,m])=>{var k;if(this.destroyed){W();return}(k=this._stats)==null||k.time("Rendering"),w.initializeGraphics({transparency:h,optionalContentConfig:m}),w.operatorListChanged()}).catch(W),s}getOperatorList({intent:l="display",annotationMode:y=_util.AnnotationMode.ENABLE,printAnnotationStorage:N=null}={}){var o;function U(){P.operatorList.lastChunk&&(P.opListReadCapability.resolve(P.operatorList),P.renderTasks.delete(R))}const $=this._transport.getRenderingIntent(l,y,N,!0);let P=this._intentStates.get($.cacheKey);P||(P=Object.create(null),this._intentStates.set($.cacheKey,P));let R;return P.opListReadCapability||(R=Object.create(null),R.operatorListChanged=U,P.opListReadCapability=new _util.PromiseCapability,(P.renderTasks||(P.renderTasks=new Set)).add(R),P.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(o=this._stats)==null||o.time("Page Request"),this._pumpOperatorList($)),P.opListReadCapability.promise}streamTextContent({includeMarkedContent:l=!1,disableNormalization:y=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:l===!0,disableNormalization:y===!0},{highWaterMark:100,size(U){return U.items.length}})}getTextContent(l={}){if(this._transport._htmlForXfa)return this.getXfa().then(N=>_xfa_text.XfaText.textContent(N));const y=this.streamTextContent(l);return new Promise(function(N,U){function $(){P.read().then(function({value:o,done:g}){if(g){N(R);return}Object.assign(R.styles,o.styles),R.items.push(...o.items),$()},U)}const P=y.getReader(),R={items:[],styles:Object.create(null)};$()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const l=[];for(const y of this._intentStates.values())if(this._abortOperatorList({intentState:y,reason:new Error("Page was destroyed."),force:!0}),!y.opListReadCapability)for(const N of y.renderTasks)l.push(N.completed),N.cancel();return this.objs.clear(),Ht(this,ft,!1),Lt(this,vt,wn).call(this),Promise.all(l)}cleanup(l=!1){Ht(this,ft,!0);const y=Lt(this,At,Ge).call(this,!1);return l&&y&&this._stats&&(this._stats=new _display_utils.StatTimer),y}_startRenderPage(l,y){var U,$;const N=this._intentStates.get(y);N&&((U=this._stats)==null||U.timeEnd("Page Request"),($=N.displayReadyCapability)==null||$.resolve(l))}_renderPageChunk(l,y){for(let N=0,U=l.length;N{R.read().then(({value:x,done:E})=>{if(E){o.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(x,o),g())},x=>{if(o.streamReader=null,!this._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;for(const E of o.renderTasks)E.operatorListChanged();Lt(this,At,Ge).call(this,!0)}if(o.displayReadyCapability)o.displayReadyCapability.reject(x);else if(o.opListReadCapability)o.opListReadCapability.reject(x);else throw x}})};g()}_abortOperatorList({intentState:l,reason:y,force:N=!1}){if(l.streamReader){if(l.streamReaderCancelTimeout&&(clearTimeout(l.streamReaderCancelTimeout),l.streamReaderCancelTimeout=null),!N){if(l.renderTasks.size>0)return;if(y instanceof _display_utils.RenderingCancelledException){let U=RENDERING_CANCELLED_TIMEOUT;y.extraDelay>0&&y.extraDelay<1e3&&(U+=y.extraDelay),l.streamReaderCancelTimeout=setTimeout(()=>{l.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:l,reason:y,force:!0})},U);return}}if(l.streamReader.cancel(new _util.AbortException(y.message)).catch(()=>{}),l.streamReader=null,!this._transport.destroyed){for(const[U,$]of this._intentStates)if($===l){this._intentStates.delete(U);break}this.cleanup()}}}get stats(){return this._stats}}Mt=new WeakMap,ft=new WeakMap,At=new WeakSet,Ge=function(l=!1){if(Lt(this,vt,wn).call(this),!ot(this,ft)||this.destroyed)return!1;if(l)return Ht(this,Mt,setTimeout(()=>{Ht(this,Mt,null),Lt(this,At,Ge).call(this,!1)},DELAYED_CLEANUP_TIMEOUT)),!1;for(const{renderTasks:y,operatorList:N}of this._intentStates.values())if(y.size>0||!N.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),Ht(this,ft,!1),!0},vt=new WeakSet,wn=function(){ot(this,Mt)&&(clearTimeout(ot(this,Mt)),Ht(this,Mt,null))},exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){_t(this,Z,new Set);_t(this,n,Promise.resolve())}postMessage(l,y){const N={data:structuredClone(l,y?{transfer:y}:null)};ot(this,n).then(()=>{for(const U of ot(this,Z))U.call(this,N)})}addEventListener(l,y){ot(this,Z).add(y)}removeEventListener(l,y){ot(this,Z).delete(y)}terminate(){ot(this,Z).clear()}}Z=new WeakMap,n=new WeakMap,exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};exports.PDFWorkerUtil=PDFWorkerUtil;{if(_util.isNodeJS&&typeof commonjsRequire=="function")PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if(typeof document=="object"){const u=(_=document==null?void 0:document.currentScript)==null?void 0:_.src;u&&(PDFWorkerUtil.fallbackWorkerSrc=u.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(u,l){let y;try{if(y=new URL(u),!y.origin||y.origin==="null")return!1}catch{return!1}const N=new URL(l,y);return y.origin===N.origin},PDFWorkerUtil.createCDNWrapper=function(u){const l=`importScripts("${u}");`;return URL.createObjectURL(new Blob([l]))}}const _PDFWorker=class _PDFWorker{constructor({name:u=null,port:l=null,verbosity:y=(0,_util.getVerbosityLevel)()}={}){var N;if(this.name=u,this.destroyed=!1,this.verbosity=y,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,l){if((N=ot(_PDFWorker,L))!=null&&N.has(l))throw new Error("Cannot use more than one PDFWorker per port.");(ot(_PDFWorker,L)||Ht(_PDFWorker,L,new WeakMap)).set(l,this),this._initializeFromPort(l);return}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(u){this._port=u,this._messageHandler=new _message_handler.MessageHandler("main","worker",u),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!_PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:u}=_PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,u)||(u=PDFWorkerUtil.createCDNWrapper(new URL(u,window.location).href));const l=new Worker(u),y=new _message_handler.MessageHandler("main","worker",l),N=()=>{l.removeEventListener("error",U),y.destroy(),l.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},U=()=>{this._webWorker||N()};l.addEventListener("error",U),y.on("test",P=>{if(l.removeEventListener("error",U),this.destroyed){N();return}P?(this._messageHandler=y,this._port=l,this._webWorker=l,this._readyCapability.resolve(),y.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),y.destroy(),l.terminate())}),y.on("ready",P=>{if(l.removeEventListener("error",U),this.destroyed){N();return}try{$()}catch{this._setupFakeWorker()}});const $=()=>{const P=new Uint8Array;y.send("test",P,[P.buffer])};$();return}catch{(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),_PDFWorker._setupFakeWorkerGlobal.then(u=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const l=new LoopbackPort;this._port=l;const y=`fake${PDFWorkerUtil.fakeWorkerId++}`,N=new _message_handler.MessageHandler(y+"_worker",y,l);u.setup(N,l);const U=new _message_handler.MessageHandler(y,y+"_worker",l);this._messageHandler=U,this._readyCapability.resolve(),U.send("configure",{verbosity:this.verbosity})}).catch(u=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${u.message}".`))})}destroy(){var u;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(u=ot(_PDFWorker,L))==null||u.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(u){var y;if(!(u!=null&&u.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const l=(y=ot(this,L))==null?void 0:y.get(u.port);if(l){if(l._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return l}return new _PDFWorker(u)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(PDFWorkerUtil.fallbackWorkerSrc!==null)return _util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){var u;try{return((u=globalThis.pdfjsWorker)==null?void 0:u.WorkerMessageHandler)||null}catch{return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_util.isNodeJS&&typeof commonjsRequire=="function"){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}};L=new WeakMap,_t(_PDFWorker,L,void 0);let PDFWorker=_PDFWorker;exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(l,y,N,U,$){_t(this,A);_t(this,t,new Map);_t(this,e,new Map);_t(this,a,new Map);_t(this,v,null);this.messageHandler=l,this.loadingTask=y,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:U.ownerDocument,styleElement:U.styleElement}),this._params=U,this.canvasFactory=$.canvasFactory,this.filterFactory=$.filterFactory,this.cMapReaderFactory=$.cMapReaderFactory,this.standardFontDataFactory=$.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=N,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(l,y=_util.AnnotationMode.ENABLE,N=null,U=!1){let $=_util.RenderingIntentFlag.DISPLAY,P=_annotation_storage.SerializableEmpty;switch(l){case"any":$=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":$=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${l}`)}switch(y){case _util.AnnotationMode.DISABLE:$+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:$+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:$+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,P=($&_util.RenderingIntentFlag.PRINT&&N instanceof _annotation_storage.PrintAnnotationStorage?N:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${y}`)}return U&&($+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:$,cacheKey:`${$}_${P.hash}`,annotationStorageSerializable:P}}destroy(){var N;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,(N=ot(this,v))==null||N.reject(new Error("Worker was destroyed during onPassword callback"));const l=[];for(const U of ot(this,e).values())l.push(U._destroy());ot(this,e).clear(),ot(this,a).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const y=this.messageHandler.sendWithPromise("Terminate",null);return l.push(y),Promise.all(l).then(()=>{var U;this.commonObjs.clear(),this.fontLoader.clear(),ot(this,t).clear(),this.filterFactory.destroy(),(U=this._networkStream)==null||U.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:l,loadingTask:y}=this;l.on("GetReader",(N,U)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=$=>{this._lastProgress={loaded:$.loaded,total:$.total}},U.onPull=()=>{this._fullReader.read().then(function({value:$,done:P}){if(P){U.close();return}(0,_util.assert)($ instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),U.enqueue(new Uint8Array($),1,[$])}).catch($=>{U.error($)})},U.onCancel=$=>{this._fullReader.cancel($),U.ready.catch(P=>{if(!this.destroyed)throw P})}}),l.on("ReaderHeadersReady",N=>{const U=new _util.PromiseCapability,$=this._fullReader;return $.headersReady.then(()=>{var P;(!$.isStreamingSupported||!$.isRangeSupported)&&(this._lastProgress&&((P=y.onProgress)==null||P.call(y,this._lastProgress)),$.onProgress=R=>{var o;(o=y.onProgress)==null||o.call(y,{loaded:R.loaded,total:R.total})}),U.resolve({isStreamingSupported:$.isStreamingSupported,isRangeSupported:$.isRangeSupported,contentLength:$.contentLength})},U.reject),U.promise}),l.on("GetRangeReader",(N,U)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const $=this._networkStream.getRangeReader(N.begin,N.end);if(!$){U.close();return}U.onPull=()=>{$.read().then(function({value:P,done:R}){if(R){U.close();return}(0,_util.assert)(P instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),U.enqueue(new Uint8Array(P),1,[P])}).catch(P=>{U.error(P)})},U.onCancel=P=>{$.cancel(P),U.ready.catch(R=>{if(!this.destroyed)throw R})}}),l.on("GetDoc",({pdfInfo:N})=>{this._numPages=N.numPages,this._htmlForXfa=N.htmlForXfa,delete N.htmlForXfa,y._capability.resolve(new PDFDocumentProxy(N,this))}),l.on("DocException",function(N){let U;switch(N.name){case"PasswordException":U=new _util.PasswordException(N.message,N.code);break;case"InvalidPDFException":U=new _util.InvalidPDFException(N.message);break;case"MissingPDFException":U=new _util.MissingPDFException(N.message);break;case"UnexpectedResponseException":U=new _util.UnexpectedResponseException(N.message,N.status);break;case"UnknownErrorException":U=new _util.UnknownErrorException(N.message,N.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}y._capability.reject(U)}),l.on("PasswordRequest",N=>{if(Ht(this,v,new _util.PromiseCapability),y.onPassword){const U=$=>{$ instanceof Error?ot(this,v).reject($):ot(this,v).resolve({password:$})};try{y.onPassword(U,N.code)}catch($){ot(this,v).reject($)}}else ot(this,v).reject(new _util.PasswordException(N.message,N.code));return ot(this,v).promise}),l.on("DataLoaded",N=>{var U;(U=y.onProgress)==null||U.call(y,{loaded:N.length,total:N.length}),this.downloadInfoCapability.resolve(N)}),l.on("StartRenderPage",N=>{if(this.destroyed)return;ot(this,e).get(N.pageIndex)._startRenderPage(N.transparency,N.cacheKey)}),l.on("commonobj",([N,U,$])=>{var P;if(!this.destroyed&&!this.commonObjs.has(N))switch(U){case"Font":const R=this._params;if("error"in $){const x=$.error;(0,_util.warn)(`Error during font loading: ${x}`),this.commonObjs.resolve(N,x);break}const o=R.pdfBug&&((P=globalThis.FontInspector)!=null&&P.enabled)?(x,E)=>globalThis.FontInspector.fontAdded(x,E):null,g=new _font_loader.FontFaceObject($,{isEvalSupported:R.isEvalSupported,disableFontFace:R.disableFontFace,ignoreErrors:R.ignoreErrors,inspectFont:o});this.fontLoader.bind(g).catch(x=>l.sendWithPromise("FontFallback",{id:N})).finally(()=>{!R.fontExtraProperties&&g.data&&(g.data=null),this.commonObjs.resolve(N,g)});break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(N,$);break;default:throw new Error(`Got unknown common object type ${U}`)}}),l.on("obj",([N,U,$,P])=>{var o;if(this.destroyed)return;const R=ot(this,e).get(U);if(!R.objs.has(N))switch($){case"Image":if(R.objs.resolve(N,P),P){let g;if(P.bitmap){const{width:x,height:E}=P;g=x*E*4}else g=((o=P.data)==null?void 0:o.length)||0;g>_util.MAX_IMAGE_SIZE_TO_CACHE&&(R._maybeCleanupAfterRender=!0)}break;case"Pattern":R.objs.resolve(N,P);break;default:throw new Error(`Got unknown object type ${$}`)}}),l.on("DocProgress",N=>{var U;this.destroyed||(U=y.onProgress)==null||U.call(y,{loaded:N.loaded,total:N.total})}),l.on("FetchBuiltInCMap",N=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(N):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),l.on("FetchStandardFontData",N=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(N):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var N;this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:l,transfers:y}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:l,filename:((N=this._fullReader)==null?void 0:N.filename)??null},y).finally(()=>{this.annotationStorage.resetModified()})}getPage(l){if(!Number.isInteger(l)||l<=0||l>this._numPages)return Promise.reject(new Error("Invalid page request."));const y=l-1,N=ot(this,a).get(y);if(N)return N;const U=this.messageHandler.sendWithPromise("GetPage",{pageIndex:y}).then($=>{if(this.destroyed)throw new Error("Transport destroyed");const P=new PDFPageProxy(y,$,this,this._params.pdfBug);return ot(this,e).set(y,P),P});return ot(this,a).set(y,U),U}getPageIndex(l){return typeof l!="object"||l===null||!Number.isInteger(l.num)||l.num<0||!Number.isInteger(l.gen)||l.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:l.num,gen:l.gen})}getAnnotations(l,y){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:l,intent:y})}getFieldObjects(){return Lt(this,A,Sn).call(this,"GetFieldObjects")}hasJSActions(){return Lt(this,A,Sn).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(l){return typeof l!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:l})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return Lt(this,A,Sn).call(this,"GetDocJSActions")}getPageJSActions(l){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:l})}getStructTree(l){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:l})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(l=>new _optional_content_config.OptionalContentConfig(l))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const l="GetMetadata",y=ot(this,t).get(l);if(y)return y;const N=this.messageHandler.sendWithPromise(l,null).then(U=>{var $,P;return{info:U[0],metadata:U[1]?new _metadata.Metadata(U[1]):null,contentDispositionFilename:(($=this._fullReader)==null?void 0:$.filename)??null,contentLength:((P=this._fullReader)==null?void 0:P.contentLength)??null}});return ot(this,t).set(l,N),N}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(l=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const y of ot(this,e).values())if(!y.cleanup())throw new Error(`startCleanup: Page ${y.pageNumber} is currently rendering.`);this.commonObjs.clear(),l||this.fontLoader.clear(),ot(this,t).clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:l,enableXfa:y}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:l,enableXfa:y})}}t=new WeakMap,e=new WeakMap,a=new WeakMap,v=new WeakMap,A=new WeakSet,Sn=function(l,y=null){const N=ot(this,t).get(l);if(N)return N;const U=this.messageHandler.sendWithPromise(l,y);return ot(this,t).set(l,U),U};class PDFObjects{constructor(){_t(this,i);_t(this,d,Object.create(null))}get(l,y=null){if(y){const U=Lt(this,i,ui).call(this,l);return U.capability.promise.then(()=>y(U.data)),null}const N=ot(this,d)[l];if(!(N!=null&&N.capability.settled))throw new Error(`Requesting object that isn't resolved yet ${l}.`);return N.data}has(l){const y=ot(this,d)[l];return(y==null?void 0:y.capability.settled)||!1}resolve(l,y=null){const N=Lt(this,i,ui).call(this,l);N.data=y,N.capability.resolve()}clear(){var l;for(const y in ot(this,d)){const{data:N}=ot(this,d)[y];(l=N==null?void 0:N.bitmap)==null||l.close()}Ht(this,d,Object.create(null))}}d=new WeakMap,i=new WeakSet,ui=function(l){var y;return(y=ot(this,d))[l]||(y[l]={capability:new _util.PromiseCapability,data:null})};class RenderTask{constructor(l){_t(this,p,null);Ht(this,p,l),this.onContinue=null}get promise(){return ot(this,p).capability.promise}cancel(l=0){ot(this,p).cancel(null,l)}get separateAnnots(){const{separateAnnots:l}=ot(this,p).operatorList;if(!l)return!1;const{annotationCanvasMap:y}=ot(this,p);return l.form||l.canvas&&(y==null?void 0:y.size)>0}}p=new WeakMap,exports.RenderTask=RenderTask;const F=class F{constructor({callback:l,params:y,objs:N,commonObjs:U,annotationCanvasMap:$,operatorList:P,pageIndex:R,canvasFactory:o,filterFactory:g,useRequestAnimationFrame:x=!1,pdfBug:E=!1,pageColors:D=null}){this.callback=l,this.params=y,this.objs=N,this.commonObjs=U,this.annotationCanvasMap=$,this.operatorListIdx=null,this.operatorList=P,this._pageIndex=R,this.canvasFactory=o,this.filterFactory=g,this._pdfBug=E,this.pageColors=D,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=x===!0&&typeof window<"u",this.cancelled=!1,this.capability=new _util.PromiseCapability,this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=y.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:l=!1,optionalContentConfig:y}){var R,o;if(this.cancelled)return;if(this._canvas){if(ot(F,b).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");ot(F,b).add(this._canvas)}this._pdfBug&&((R=globalThis.StepperManager)!=null&&R.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:N,viewport:U,transform:$,background:P}=this.params;this.gfx=new _canvas.CanvasGraphics(N,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:y},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:$,viewport:U,transparency:l,background:P}),this.operatorListIdx=0,this.graphicsReady=!0,(o=this.graphicsReadyCallback)==null||o.call(this)}cancel(l=null,y=0){var N;this.running=!1,this.cancelled=!0,(N=this.gfx)==null||N.endDrawing(),ot(F,b).delete(this._canvas),this.callback(l||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,y))}operatorListChanged(){var l;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(l=this.stepper)==null||l.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame(()=>{this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),ot(F,b).delete(this._canvas),this.callback())))}};b=new WeakMap,_t(F,b,new WeakSet);let InternalRenderTask=F;const version="3.11.174";exports.version=version;const build="ce8716743";exports.build=build},(Ot,dt,Mt)=>{var n,_,L,tr,e;Object.defineProperty(dt,"__esModule",{value:!0}),dt.SerializableEmpty=dt.PrintAnnotationStorage=dt.AnnotationStorage=void 0;var ft=Mt(1),At=Mt(4),$t=Mt(8);const vt=Object.freeze({map:null,hash:"",transfers:void 0});dt.SerializableEmpty=vt;class M{constructor(){_t(this,L);_t(this,n,!1);_t(this,_,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(v,A){const T=ot(this,_).get(v);return T===void 0?A:Object.assign(A,T)}getRawValue(v){return ot(this,_).get(v)}remove(v){if(ot(this,_).delete(v),ot(this,_).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const A of ot(this,_).values())if(A instanceof At.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(v,A){const T=ot(this,_).get(v);let d=!1;if(T!==void 0)for(const[i,C]of Object.entries(A))T[i]!==C&&(d=!0,T[i]=C);else d=!0,ot(this,_).set(v,A);d&&Lt(this,L,tr).call(this),A instanceof At.AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(A.constructor._type)}has(v){return ot(this,_).has(v)}getAll(){return ot(this,_).size>0?(0,ft.objectFromMap)(ot(this,_)):null}setAll(v){for(const[A,T]of Object.entries(v))this.setValue(A,T)}get size(){return ot(this,_).size}resetModified(){ot(this,n)&&(Ht(this,n,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new Z(this)}get serializable(){if(ot(this,_).size===0)return vt;const v=new Map,A=new $t.MurmurHash3_64,T=[],d=Object.create(null);let i=!1;for(const[C,p]of ot(this,_)){const b=p instanceof At.AnnotationEditor?p.serialize(!1,d):p;b&&(v.set(C,b),A.update(`${C}:${JSON.stringify(b)}`),i||(i=!!b.bitmap))}if(i)for(const C of v.values())C.bitmap&&T.push(C.bitmap);return v.size>0?{map:v,hash:A.hexdigest(),transfers:T}:vt}}n=new WeakMap,_=new WeakMap,L=new WeakSet,tr=function(){ot(this,n)||(Ht(this,n,!0),typeof this.onSetModified=="function"&&this.onSetModified())},dt.AnnotationStorage=M;class Z extends M{constructor(A){super();_t(this,e,void 0);const{map:T,hash:d,transfers:i}=A.serializable,C=structuredClone(T,i?{transfer:i}:null);Ht(this,e,{map:C,hash:d,transfers:i})}get print(){(0,ft.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return ot(this,e)}}e=new WeakMap,dt.PrintAnnotationStorage=Z},(Ot,dt,Mt)=>{var Z,n,_,L,t,e,a,v,A,T,d,i,C,p,b,di,u,fi,y,pi,U,gi,P,er,o,nr,x,ir,D,mi,W,rr;Object.defineProperty(dt,"__esModule",{value:!0}),dt.AnnotationEditor=void 0;var ft=Mt(5),At=Mt(1),$t=Mt(6);const s=class s{constructor(S){_t(this,b);_t(this,u);_t(this,U);_t(this,P);_t(this,o);_t(this,x);_t(this,D);_t(this,W);_t(this,Z,"");_t(this,n,!1);_t(this,_,null);_t(this,L,null);_t(this,t,null);_t(this,e,!1);_t(this,a,null);_t(this,v,this.focusin.bind(this));_t(this,A,this.focusout.bind(this));_t(this,T,!1);_t(this,d,!1);_t(this,i,!1);ye(this,"_initialOptions",Object.create(null));ye(this,"_uiManager",null);ye(this,"_focusEventsAllowed",!0);ye(this,"_l10nPromise",null);_t(this,C,!1);_t(this,p,s._zIndex++);this.constructor===s&&(0,At.unreachable)("Cannot initialize AnnotationEditor."),this.parent=S.parent,this.id=S.id,this.width=this.height=null,this.pageIndex=S.parent.pageIndex,this.name=S.name,this.div=null,this._uiManager=S.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=S.isCentered,this._structTreeParentId=null;const{rotation:h,rawDims:{pageWidth:m,pageHeight:k,pageX:I,pageY:B}}=this.parent.viewport;this.rotation=h,this.pageRotation=(360+h-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[m,k],this.pageTranslation=[I,B];const[tt,it]=this.parentDimensions;this.x=S.x/tt,this.y=S.y/it,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return(0,At.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(S){const h=new M({id:S.parent.getNextId(),parent:S.parent,uiManager:S._uiManager});h.annotationElementId=S.annotationElementId,h.deleted=!0,h._uiManager.addToAnnotationStorage(h)}static initialize(S,h=null){if(s._l10nPromise||(s._l10nPromise=new Map(["editor_alt_text_button_label","editor_alt_text_edit_button_label","editor_alt_text_decorative_tooltip"].map(k=>[k,S.get(k)]))),h!=null&&h.strings)for(const k of h.strings)s._l10nPromise.set(k,S.get(k));if(s._borderLineWidth!==-1)return;const m=getComputedStyle(document.documentElement);s._borderLineWidth=parseFloat(m.getPropertyValue("--outline-width"))||0}static updateDefaultParams(S,h){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(S){return!1}static paste(S,h){(0,At.unreachable)("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return ot(this,C)}set _isDraggable(S){var h;Ht(this,C,S),(h=this.div)==null||h.classList.toggle("draggable",S)}center(){const[S,h]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*h/(S*2),this.y+=this.width*S/(h*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*h/(S*2),this.y-=this.width*S/(h*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(S){this._uiManager.addCommands(S)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=ot(this,p)}setParent(S){S!==null&&(this.pageIndex=S.pageIndex,this.pageDimensions=S.pageDimensions),this.parent=S}focusin(S){this._focusEventsAllowed&&(ot(this,T)?Ht(this,T,!1):this.parent.setSelected(this))}focusout(S){var m;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const h=S.relatedTarget;h!=null&&h.closest(`#${this.id}`)||(S.preventDefault(),(m=this.parent)!=null&&m.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(S,h,m,k){const[I,B]=this.parentDimensions;[m,k]=this.screenToPageTranslation(m,k),this.x=(S+m)/I,this.y=(h+k)/B,this.fixAndSetPosition()}translate(S,h){Lt(this,b,di).call(this,this.parentDimensions,S,h)}translateInPage(S,h){Lt(this,b,di).call(this,this.pageDimensions,S,h),this.div.scrollIntoView({block:"nearest"})}drag(S,h){const[m,k]=this.parentDimensions;if(this.x+=S/m,this.y+=h/k,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:st,y:X}=this.div.getBoundingClientRect();this.parent.findNewParent(this,st,X)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:I,y:B}=this;const[tt,it]=Lt(this,u,fi).call(this);I+=tt,B+=it,this.div.style.left=`${(100*I).toFixed(2)}%`,this.div.style.top=`${(100*B).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}fixAndSetPosition(){const[S,h]=this.pageDimensions;let{x:m,y:k,width:I,height:B}=this;switch(I*=S,B*=h,m*=S,k*=h,this.rotation){case 0:m=Math.max(0,Math.min(S-I,m)),k=Math.max(0,Math.min(h-B,k));break;case 90:m=Math.max(0,Math.min(S-B,m)),k=Math.min(h,Math.max(I,k));break;case 180:m=Math.min(S,Math.max(I,m)),k=Math.min(h,Math.max(B,k));break;case 270:m=Math.min(S,Math.max(B,m)),k=Math.max(0,Math.min(h-I,k));break}this.x=m/=S,this.y=k/=h;const[tt,it]=Lt(this,u,fi).call(this);m+=tt,k+=it;const{style:st}=this.div;st.left=`${(100*m).toFixed(2)}%`,st.top=`${(100*k).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(S,h){var m;return Lt(m=s,y,pi).call(m,S,h,this.parentRotation)}pageTranslationToScreen(S,h){var m;return Lt(m=s,y,pi).call(m,S,h,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:S,pageDimensions:[h,m]}=this,k=h*S,I=m*S;return At.FeatureTest.isCSSRoundSupported?[Math.round(k),Math.round(I)]:[k,I]}setDims(S,h){var I;const[m,k]=this.parentDimensions;this.div.style.width=`${(100*S/m).toFixed(2)}%`,ot(this,e)||(this.div.style.height=`${(100*h/k).toFixed(2)}%`),(I=ot(this,_))==null||I.classList.toggle("small",Sm.stopPropagation()),S.addEventListener("click",m=>{m.preventDefault(),this._uiManager.editAltText(this)},{capture:!0}),S.addEventListener("keydown",m=>{m.target===S&&m.key==="Enter"&&(m.preventDefault(),this._uiManager.editAltText(this))}),Lt(this,D,mi).call(this),this.div.append(S),s.SMALL_EDITOR_SIZE||(s.SMALL_EDITOR_SIZE=Math.min(128,Math.round(S.getBoundingClientRect().width*1.4)))}getClientDimensions(){return this.div.getBoundingClientRect()}get altTextData(){return{altText:ot(this,Z),decorative:ot(this,n)}}set altTextData({altText:S,decorative:h}){ot(this,Z)===S&&ot(this,n)===h||(Ht(this,Z,S),Ht(this,n,h),Lt(this,D,mi).call(this))}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",ot(this,v)),this.div.addEventListener("focusout",ot(this,A));const[S,h]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*h/S).toFixed(2)}%`,this.div.style.maxHeight=`${(100*S/h).toFixed(2)}%`);const[m,k]=this.getInitialTranslation();return this.translate(m,k),(0,ft.bindEvents)(this,this.div,["pointerdown"]),this.div}pointerdown(S){const{isMac:h}=At.FeatureTest.platform;if(S.button!==0||S.ctrlKey&&h){S.preventDefault();return}Ht(this,T,!0),Lt(this,W,rr).call(this,S)}moveInDOM(){var S;(S=this.parent)==null||S.moveEditorInDOM(this)}_setParentAndPosition(S,h,m){S.changeParent(this),this.x=h,this.y=m,this.fixAndSetPosition()}getRect(S,h){const m=this.parentScale,[k,I]=this.pageDimensions,[B,tt]=this.pageTranslation,it=S/m,st=h/m,X=this.x*k,J=this.y*I,j=this.width*k,O=this.height*I;switch(this.rotation){case 0:return[X+it+B,I-J-st-O+tt,X+it+j+B,I-J-st+tt];case 90:return[X+st+B,I-J+it+tt,X+st+O+B,I-J+it+j+tt];case 180:return[X-it-j+B,I-J+st+tt,X-it+B,I-J+st+O+tt];case 270:return[X-st-O+B,I-J-it-j+tt,X-st+B,I-J-it+tt];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(S,h){const[m,k,I,B]=S,tt=I-m,it=B-k;switch(this.rotation){case 0:return[m,h-B,tt,it];case 90:return[m,h-k,it,tt];case 180:return[I,h-k,tt,it];case 270:return[I,h-B,it,tt];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){Ht(this,i,!0)}disableEditMode(){Ht(this,i,!1)}isInEditMode(){return ot(this,i)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var S,h;(S=this.div)==null||S.addEventListener("focusin",ot(this,v)),(h=this.div)==null||h.addEventListener("focusout",ot(this,A))}serialize(S=!1,h=null){(0,At.unreachable)("An editor must be serializable")}static deserialize(S,h,m){const k=new this.prototype.constructor({parent:h,id:h.getNextId(),uiManager:m});k.rotation=S.rotation;const[I,B]=k.pageDimensions,[tt,it,st,X]=k.getRectInCurrentCoords(S.rect,B);return k.x=tt/I,k.y=it/B,k.width=st/I,k.height=X/B,k}remove(){var S;this.div.removeEventListener("focusin",ot(this,v)),this.div.removeEventListener("focusout",ot(this,A)),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),(S=ot(this,_))==null||S.remove(),Ht(this,_,null),Ht(this,L,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(Lt(this,P,er).call(this),ot(this,a).classList.remove("hidden"))}select(){var S;this.makeResizable(),(S=this.div)==null||S.classList.add("selectedEditor")}unselect(){var S,h,m;(S=ot(this,a))==null||S.classList.add("hidden"),(h=this.div)==null||h.classList.remove("selectedEditor"),(m=this.div)!=null&&m.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}updateParams(S,h){}disableEditing(){ot(this,_)&&(ot(this,_).hidden=!0)}enableEditing(){ot(this,_)&&(ot(this,_).hidden=!1)}enterInEditMode(){}get contentDiv(){return this.div}get isEditing(){return ot(this,d)}set isEditing(S){Ht(this,d,S),this.parent&&(S?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(S,h){Ht(this,e,!0);const m=S/h,{style:k}=this.div;k.aspectRatio=m,k.height="auto"}static get MIN_SIZE(){return 16}};Z=new WeakMap,n=new WeakMap,_=new WeakMap,L=new WeakMap,t=new WeakMap,e=new WeakMap,a=new WeakMap,v=new WeakMap,A=new WeakMap,T=new WeakMap,d=new WeakMap,i=new WeakMap,C=new WeakMap,p=new WeakMap,b=new WeakSet,di=function([S,h],m,k){[m,k]=this.screenToPageTranslation(m,k),this.x+=m/S,this.y+=k/h,this.fixAndSetPosition()},u=new WeakSet,fi=function(){const[S,h]=this.parentDimensions,{_borderLineWidth:m}=s,k=m/S,I=m/h;switch(this.rotation){case 90:return[-k,I];case 180:return[k,I];case 270:return[k,-I];default:return[-k,-I]}},y=new WeakSet,pi=function(S,h,m){switch(m){case 90:return[h,-S];case 180:return[-S,-h];case 270:return[-h,S];default:return[S,h]}},U=new WeakSet,gi=function(S){switch(S){case 90:{const[h,m]=this.pageDimensions;return[0,-h/m,m/h,0]}case 180:return[-1,0,0,-1];case 270:{const[h,m]=this.pageDimensions;return[0,h/m,-m/h,0]}default:return[1,0,0,1]}},P=new WeakSet,er=function(){if(ot(this,a))return;Ht(this,a,document.createElement("div")),ot(this,a).classList.add("resizers");const S=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||S.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(const h of S){const m=document.createElement("div");ot(this,a).append(m),m.classList.add("resizer",h),m.addEventListener("pointerdown",Lt(this,o,nr).bind(this,h)),m.addEventListener("contextmenu",$t.noContextMenu)}this.div.prepend(ot(this,a))},o=new WeakSet,nr=function(S,h){h.preventDefault();const{isMac:m}=At.FeatureTest.platform;if(h.button!==0||h.ctrlKey&&m)return;const k=Lt(this,x,ir).bind(this,S),I=this._isDraggable;this._isDraggable=!1;const B={passive:!0,capture:!0};window.addEventListener("pointermove",k,B);const tt=this.x,it=this.y,st=this.width,X=this.height,J=this.parent.div.style.cursor,j=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(h.target).cursor;const O=()=>{this._isDraggable=I,window.removeEventListener("pointerup",O),window.removeEventListener("blur",O),window.removeEventListener("pointermove",k,B),this.parent.div.style.cursor=J,this.div.style.cursor=j;const H=this.x,V=this.y,z=this.width,Y=this.height;H===tt&&V===it&&z===st&&Y===X||this.addCommands({cmd:()=>{this.width=z,this.height=Y,this.x=H,this.y=V;const[G,K]=this.parentDimensions;this.setDims(G*z,K*Y),this.fixAndSetPosition()},undo:()=>{this.width=st,this.height=X,this.x=tt,this.y=it;const[G,K]=this.parentDimensions;this.setDims(G*st,K*X),this.fixAndSetPosition()},mustExec:!0})};window.addEventListener("pointerup",O),window.addEventListener("blur",O)},x=new WeakSet,ir=function(S,h){const[m,k]=this.parentDimensions,I=this.x,B=this.y,tt=this.width,it=this.height,st=s.MIN_SIZE/m,X=s.MIN_SIZE/k,J=Rt=>Math.round(Rt*1e4)/1e4,j=Lt(this,U,gi).call(this,this.rotation),O=(Rt,Ct)=>[j[0]*Rt+j[2]*Ct,j[1]*Rt+j[3]*Ct],H=Lt(this,U,gi).call(this,360-this.rotation),V=(Rt,Ct)=>[H[0]*Rt+H[2]*Ct,H[1]*Rt+H[3]*Ct];let z,Y,G=!1,K=!1;switch(S){case"topLeft":G=!0,z=(Rt,Ct)=>[0,0],Y=(Rt,Ct)=>[Rt,Ct];break;case"topMiddle":z=(Rt,Ct)=>[Rt/2,0],Y=(Rt,Ct)=>[Rt/2,Ct];break;case"topRight":G=!0,z=(Rt,Ct)=>[Rt,0],Y=(Rt,Ct)=>[0,Ct];break;case"middleRight":K=!0,z=(Rt,Ct)=>[Rt,Ct/2],Y=(Rt,Ct)=>[0,Ct/2];break;case"bottomRight":G=!0,z=(Rt,Ct)=>[Rt,Ct],Y=(Rt,Ct)=>[0,0];break;case"bottomMiddle":z=(Rt,Ct)=>[Rt/2,Ct],Y=(Rt,Ct)=>[Rt/2,0];break;case"bottomLeft":G=!0,z=(Rt,Ct)=>[0,Ct],Y=(Rt,Ct)=>[Rt,0];break;case"middleLeft":K=!0,z=(Rt,Ct)=>[0,Ct/2],Y=(Rt,Ct)=>[Rt,Ct/2];break}const et=z(tt,it),nt=Y(tt,it);let at=O(...nt);const Q=J(I+at[0]),lt=J(B+at[1]);let ut=1,pt=1,[yt,Et]=this.screenToPageTranslation(h.movementX,h.movementY);if([yt,Et]=V(yt/m,Et/k),G){const Rt=Math.hypot(tt,it);ut=pt=Math.max(Math.min(Math.hypot(nt[0]-et[0]-yt,nt[1]-et[1]-Et)/Rt,1/tt,1/it),st/tt,X/it)}else K?ut=Math.max(st,Math.min(1,Math.abs(nt[0]-et[0]-yt)))/tt:pt=Math.max(X,Math.min(1,Math.abs(nt[1]-et[1]-Et)))/it;const Tt=J(tt*ut),xt=J(it*pt);at=O(...Y(Tt,xt));const wt=Q-at[0],St=lt-at[1];this.width=Tt,this.height=xt,this.x=wt,this.y=St,this.setDims(m*Tt,k*xt),this.fixAndSetPosition()},D=new WeakSet,mi=async function(){var m;const S=ot(this,_);if(!S)return;if(!ot(this,Z)&&!ot(this,n)){S.classList.remove("done"),(m=ot(this,L))==null||m.remove();return}s._l10nPromise.get("editor_alt_text_edit_button_label").then(k=>{S.setAttribute("aria-label",k)});let h=ot(this,L);if(!h){Ht(this,L,h=document.createElement("span")),h.className="tooltip",h.setAttribute("role","tooltip");const k=h.id=`alt-text-tooltip-${this.id}`;S.setAttribute("aria-describedby",k);const I=100;S.addEventListener("mouseenter",()=>{Ht(this,t,setTimeout(()=>{Ht(this,t,null),ot(this,L).classList.add("show"),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"alt_text_tooltip"}}})},I))}),S.addEventListener("mouseleave",()=>{var B;clearTimeout(ot(this,t)),Ht(this,t,null),(B=ot(this,L))==null||B.classList.remove("show")})}S.classList.add("done"),h.innerText=ot(this,n)?await s._l10nPromise.get("editor_alt_text_decorative_tooltip"):ot(this,Z),h.parentNode||S.append(h)},W=new WeakSet,rr=function(S){if(!this._isDraggable)return;const h=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let m,k;h&&(m={passive:!0,capture:!0},k=B=>{const[tt,it]=this.screenToPageTranslation(B.movementX,B.movementY);this._uiManager.dragSelectedEditors(tt,it)},window.addEventListener("pointermove",k,m));const I=()=>{if(window.removeEventListener("pointerup",I),window.removeEventListener("blur",I),h&&window.removeEventListener("pointermove",k,m),Ht(this,T,!1),!this._uiManager.endDragSession()){const{isMac:B}=At.FeatureTest.platform;S.ctrlKey&&!B||S.shiftKey||S.metaKey&&B?this.parent.toggleSelected(this):this.parent.setSelected(this)}};window.addEventListener("pointerup",I),window.addEventListener("blur",I)},_t(s,y),ye(s,"_borderLineWidth",-1),ye(s,"_colorManager",new ft.ColorManager),ye(s,"_zIndex",1),ye(s,"SMALL_EDITOR_SIZE",0);let vt=s;dt.AnnotationEditor=vt;class M extends vt{constructor(S){super(S),this.annotationElementId=S.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}},(Ot,dt,Mt)=>{var e,a,v,A,T,bi,C,p,b,F,u,ar,N,U,$,P,R,o,g,x,E,D,q,W,w,s,c,S,h,m,k,I,B,tt,it,st,X,J,j,O,H,V,z,Y,G,K,et,sr,at,yi,lt,wi,pt,An,Et,Si,xt,Ai,St,Me,Ct,sn,Zt,or,Ut,cr,Wt,xi,re,on,Bt,vi;Object.defineProperty(dt,"__esModule",{value:!0}),dt.KeyboardManager=dt.CommandManager=dt.ColorManager=dt.AnnotationEditorUIManager=void 0,dt.bindEvents=$t,dt.opacityToHex=vt;var ft=Mt(1),At=Mt(6);function $t(mt,rt,ht){for(const gt of ht)rt.addEventListener(gt,mt[gt].bind(mt))}function vt(mt){return Math.round(Math.min(255,Math.max(1,255*mt))).toString(16).padStart(2,"0")}class M{constructor(){_t(this,e,0)}getId(){return`${ft.AnnotationEditorPrefix}${an(this,e)._++}`}}e=new WeakMap;const i=class i{constructor(){_t(this,T);_t(this,a,(0,ft.getUuid)());_t(this,v,0);_t(this,A,null)}static get _isSVGFittingCanvas(){const rt='data:image/svg+xml;charset=UTF-8,',gt=new OffscreenCanvas(1,3).getContext("2d"),bt=new Image;bt.src=rt;const Pt=bt.decode().then(()=>(gt.drawImage(bt,0,0,1,1,0,0,1,3),new Uint32Array(gt.getImageData(0,0,1,1).data.buffer)[0]===0));return(0,ft.shadow)(this,"_isSVGFittingCanvas",Pt)}async getFromFile(rt){const{lastModified:ht,name:gt,size:bt,type:Pt}=rt;return Lt(this,T,bi).call(this,`${ht}_${gt}_${bt}_${Pt}`,rt)}async getFromUrl(rt){return Lt(this,T,bi).call(this,rt,rt)}async getFromId(rt){ot(this,A)||Ht(this,A,new Map);const ht=ot(this,A).get(rt);return ht?ht.bitmap?(ht.refCounter+=1,ht):ht.file?this.getFromFile(ht.file):this.getFromUrl(ht.url):null}getSvgUrl(rt){const ht=ot(this,A).get(rt);return ht!=null&&ht.isSvg?ht.svgUrl:null}deleteId(rt){ot(this,A)||Ht(this,A,new Map);const ht=ot(this,A).get(rt);ht&&(ht.refCounter-=1,ht.refCounter===0&&(ht.bitmap=null))}isValidId(rt){return rt.startsWith(`image_${ot(this,a)}_`)}};a=new WeakMap,v=new WeakMap,A=new WeakMap,T=new WeakSet,bi=async function(rt,ht){ot(this,A)||Ht(this,A,new Map);let gt=ot(this,A).get(rt);if(gt===null)return null;if(gt!=null&>.bitmap)return gt.refCounter+=1,gt;try{gt||(gt={bitmap:null,id:`image_${ot(this,a)}_${an(this,v)._++}`,refCounter:0,isSvg:!1});let bt;if(typeof ht=="string"){gt.url=ht;const Pt=await fetch(ht);if(!Pt.ok)throw new Error(Pt.statusText);bt=await Pt.blob()}else bt=gt.file=ht;if(bt.type==="image/svg+xml"){const Pt=i._isSVGFittingCanvas,It=new FileReader,Nt=new Image,Kt=new Promise((Qt,ne)=>{Nt.onload=()=>{gt.bitmap=Nt,gt.isSvg=!0,Qt()},It.onload=async()=>{const ee=gt.svgUrl=It.result;Nt.src=await Pt?`${ee}#svgView(preserveAspectRatio(none))`:ee},Nt.onerror=It.onerror=ne});It.readAsDataURL(bt),await Kt}else gt.bitmap=await createImageBitmap(bt);gt.refCounter=1}catch(bt){console.error(bt),gt=null}return ot(this,A).set(rt,gt),gt&&ot(this,A).set(gt.id,gt),gt};let Z=i;class n{constructor(rt=128){_t(this,C,[]);_t(this,p,!1);_t(this,b,void 0);_t(this,F,-1);Ht(this,b,rt)}add({cmd:rt,undo:ht,mustExec:gt,type:bt=NaN,overwriteIfSameType:Pt=!1,keepUndo:It=!1}){if(gt&&rt(),ot(this,p))return;const Nt={cmd:rt,undo:ht,type:bt};if(ot(this,F)===-1){ot(this,C).length>0&&(ot(this,C).length=0),Ht(this,F,0),ot(this,C).push(Nt);return}if(Pt&&ot(this,C)[ot(this,F)].type===bt){It&&(Nt.undo=ot(this,C)[ot(this,F)].undo),ot(this,C)[ot(this,F)]=Nt;return}const Kt=ot(this,F)+1;Kt===ot(this,b)?ot(this,C).splice(0,1):(Ht(this,F,Kt),KtPt===ht[It]))return y._colorsMapping.get(gt);return ht}getHexCode(rt){const ht=this._colors.get(rt);return ht?ft.Util.makeHexColor(...ht):rt}};ye(y,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let L=y;dt.ColorManager=L;const jt=class jt{constructor(rt,ht,gt,bt,Pt,It){_t(this,et);_t(this,at);_t(this,lt);_t(this,pt);_t(this,Et);_t(this,xt);_t(this,St);_t(this,Ct);_t(this,Zt);_t(this,Ut);_t(this,Wt);_t(this,re);_t(this,Bt);_t(this,N,null);_t(this,U,new Map);_t(this,$,new Map);_t(this,P,null);_t(this,R,null);_t(this,o,new n);_t(this,g,0);_t(this,x,new Set);_t(this,E,null);_t(this,D,null);_t(this,q,new Set);_t(this,W,null);_t(this,w,new M);_t(this,s,!1);_t(this,c,!1);_t(this,S,null);_t(this,h,ft.AnnotationEditorType.NONE);_t(this,m,new Set);_t(this,k,null);_t(this,I,this.blur.bind(this));_t(this,B,this.focus.bind(this));_t(this,tt,this.copy.bind(this));_t(this,it,this.cut.bind(this));_t(this,st,this.paste.bind(this));_t(this,X,this.keydown.bind(this));_t(this,J,this.onEditingAction.bind(this));_t(this,j,this.onPageChanging.bind(this));_t(this,O,this.onScaleChanging.bind(this));_t(this,H,this.onRotationChanging.bind(this));_t(this,V,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1});_t(this,z,[0,0]);_t(this,Y,null);_t(this,G,null);_t(this,K,null);Ht(this,G,rt),Ht(this,K,ht),Ht(this,P,gt),this._eventBus=bt,this._eventBus._on("editingaction",ot(this,J)),this._eventBus._on("pagechanging",ot(this,j)),this._eventBus._on("scalechanging",ot(this,O)),this._eventBus._on("rotationchanging",ot(this,H)),Ht(this,R,Pt.annotationStorage),Ht(this,W,Pt.filterFactory),Ht(this,k,It),this.viewParameters={realScale:At.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}static get _keyboardManager(){const rt=jt.prototype,ht=Pt=>{const{activeElement:It}=document;return It&&ot(Pt,G).contains(It)&&Pt.hasSomethingToControl()},gt=this.TRANSLATE_SMALL,bt=this.TRANSLATE_BIG;return(0,ft.shadow)(this,"_keyboardManager",new _([[["ctrl+a","mac+meta+a"],rt.selectAll],[["ctrl+z","mac+meta+z"],rt.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],rt.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],rt.delete],[["Escape","mac+Escape"],rt.unselectAll],[["ArrowLeft","mac+ArrowLeft"],rt.translateSelectedEditors,{args:[-gt,0],checker:ht}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],rt.translateSelectedEditors,{args:[-bt,0],checker:ht}],[["ArrowRight","mac+ArrowRight"],rt.translateSelectedEditors,{args:[gt,0],checker:ht}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],rt.translateSelectedEditors,{args:[bt,0],checker:ht}],[["ArrowUp","mac+ArrowUp"],rt.translateSelectedEditors,{args:[0,-gt],checker:ht}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],rt.translateSelectedEditors,{args:[0,-bt],checker:ht}],[["ArrowDown","mac+ArrowDown"],rt.translateSelectedEditors,{args:[0,gt],checker:ht}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],rt.translateSelectedEditors,{args:[0,bt],checker:ht}]]))}destroy(){Lt(this,pt,An).call(this),Lt(this,at,yi).call(this),this._eventBus._off("editingaction",ot(this,J)),this._eventBus._off("pagechanging",ot(this,j)),this._eventBus._off("scalechanging",ot(this,O)),this._eventBus._off("rotationchanging",ot(this,H));for(const rt of ot(this,$).values())rt.destroy();ot(this,$).clear(),ot(this,U).clear(),ot(this,q).clear(),Ht(this,N,null),ot(this,m).clear(),ot(this,o).destroy(),ot(this,P).destroy()}get hcmFilter(){return(0,ft.shadow)(this,"hcmFilter",ot(this,k)?ot(this,W).addHCMFilter(ot(this,k).foreground,ot(this,k).background):"none")}get direction(){return(0,ft.shadow)(this,"direction",getComputedStyle(ot(this,G)).direction)}editAltText(rt){var ht;(ht=ot(this,P))==null||ht.editAltText(this,rt)}onPageChanging({pageNumber:rt}){Ht(this,g,rt-1)}focusMainContainer(){ot(this,G).focus()}findParent(rt,ht){for(const gt of ot(this,$).values()){const{x:bt,y:Pt,width:It,height:Nt}=gt.div.getBoundingClientRect();if(rt>=bt&&rt<=bt+It&&ht>=Pt&&ht<=Pt+Nt)return gt}return null}disableUserSelect(rt=!1){ot(this,K).classList.toggle("noUserSelect",rt)}addShouldRescale(rt){ot(this,q).add(rt)}removeShouldRescale(rt){ot(this,q).delete(rt)}onScaleChanging({scale:rt}){this.commitOrRemove(),this.viewParameters.realScale=rt*At.PixelsPerInch.PDF_TO_CSS_UNITS;for(const ht of ot(this,q))ht.onScaleChanging()}onRotationChanging({pagesRotation:rt}){this.commitOrRemove(),this.viewParameters.rotation=rt}addToAnnotationStorage(rt){!rt.isEmpty()&&ot(this,R)&&!ot(this,R).has(rt.id)&&ot(this,R).setValue(rt.id,rt)}blur(){if(!this.hasSelection)return;const{activeElement:rt}=document;for(const ht of ot(this,m))if(ht.div.contains(rt)){Ht(this,S,[ht,rt]),ht._focusEventsAllowed=!1;break}}focus(){if(!ot(this,S))return;const[rt,ht]=ot(this,S);Ht(this,S,null),ht.addEventListener("focusin",()=>{rt._focusEventsAllowed=!0},{once:!0}),ht.focus()}addEditListeners(){Lt(this,lt,wi).call(this),Lt(this,Et,Si).call(this)}removeEditListeners(){Lt(this,pt,An).call(this),Lt(this,xt,Ai).call(this)}copy(rt){var gt;if(rt.preventDefault(),(gt=ot(this,N))==null||gt.commitOrRemove(),!this.hasSelection)return;const ht=[];for(const bt of ot(this,m)){const Pt=bt.serialize(!0);Pt&&ht.push(Pt)}ht.length!==0&&rt.clipboardData.setData("application/pdfjs",JSON.stringify(ht))}cut(rt){this.copy(rt),this.delete()}paste(rt){rt.preventDefault();const{clipboardData:ht}=rt;for(const Pt of ht.items)for(const It of ot(this,D))if(It.isHandlingMimeForPasting(Pt.type)){It.paste(Pt,this.currentLayer);return}let gt=ht.getData("application/pdfjs");if(!gt)return;try{gt=JSON.parse(gt)}catch(Pt){(0,ft.warn)(`paste: "${Pt.message}".`);return}if(!Array.isArray(gt))return;this.unselectAll();const bt=this.currentLayer;try{const Pt=[];for(const Kt of gt){const Qt=bt.deserialize(Kt);if(!Qt)return;Pt.push(Qt)}const It=()=>{for(const Kt of Pt)Lt(this,Wt,xi).call(this,Kt);Lt(this,Bt,vi).call(this,Pt)},Nt=()=>{for(const Kt of Pt)Kt.remove()};this.addCommands({cmd:It,undo:Nt,mustExec:!0})}catch(Pt){(0,ft.warn)(`paste: "${Pt.message}".`)}}keydown(rt){var ht;(ht=this.getActive())!=null&&ht.shouldGetKeyboardEvents()||jt._keyboardManager.exec(this,rt)}onEditingAction(rt){["undo","redo","delete","selectAll"].includes(rt.name)&&this[rt.name]()}setEditingState(rt){rt?(Lt(this,et,sr).call(this),Lt(this,lt,wi).call(this),Lt(this,Et,Si).call(this),Lt(this,St,Me).call(this,{isEditing:ot(this,h)!==ft.AnnotationEditorType.NONE,isEmpty:Lt(this,re,on).call(this),hasSomethingToUndo:ot(this,o).hasSomethingToUndo(),hasSomethingToRedo:ot(this,o).hasSomethingToRedo(),hasSelectedEditor:!1})):(Lt(this,at,yi).call(this),Lt(this,pt,An).call(this),Lt(this,xt,Ai).call(this),Lt(this,St,Me).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(rt){if(!ot(this,D)){Ht(this,D,rt);for(const ht of ot(this,D))Lt(this,Ct,sn).call(this,ht.defaultPropertiesToUpdate)}}getId(){return ot(this,w).getId()}get currentLayer(){return ot(this,$).get(ot(this,g))}getLayer(rt){return ot(this,$).get(rt)}get currentPageIndex(){return ot(this,g)}addLayer(rt){ot(this,$).set(rt.pageIndex,rt),ot(this,s)?rt.enable():rt.disable()}removeLayer(rt){ot(this,$).delete(rt.pageIndex)}updateMode(rt,ht=null){if(ot(this,h)!==rt){if(Ht(this,h,rt),rt===ft.AnnotationEditorType.NONE){this.setEditingState(!1),Lt(this,Ut,cr).call(this);return}this.setEditingState(!0),Lt(this,Zt,or).call(this),this.unselectAll();for(const gt of ot(this,$).values())gt.updateMode(rt);if(ht){for(const gt of ot(this,U).values())if(gt.annotationElementId===ht){this.setSelected(gt),gt.enterInEditMode();break}}}}updateToolbar(rt){rt!==ot(this,h)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:rt})}updateParams(rt,ht){if(ot(this,D)){if(rt===ft.AnnotationEditorParamsType.CREATE){this.currentLayer.addNewEditor(rt);return}for(const gt of ot(this,m))gt.updateParams(rt,ht);for(const gt of ot(this,D))gt.updateDefaultParams(rt,ht)}}enableWaiting(rt=!1){if(ot(this,c)!==rt){Ht(this,c,rt);for(const ht of ot(this,$).values())rt?ht.disableClick():ht.enableClick(),ht.div.classList.toggle("waiting",rt)}}getEditors(rt){const ht=[];for(const gt of ot(this,U).values())gt.pageIndex===rt&&ht.push(gt);return ht}getEditor(rt){return ot(this,U).get(rt)}addEditor(rt){ot(this,U).set(rt.id,rt)}removeEditor(rt){var ht;ot(this,U).delete(rt.id),this.unselect(rt),(!rt.annotationElementId||!ot(this,x).has(rt.annotationElementId))&&((ht=ot(this,R))==null||ht.remove(rt.id))}addDeletedAnnotationElement(rt){ot(this,x).add(rt.annotationElementId),rt.deleted=!0}isDeletedAnnotationElement(rt){return ot(this,x).has(rt)}removeDeletedAnnotationElement(rt){ot(this,x).delete(rt.annotationElementId),rt.deleted=!1}setActiveEditor(rt){ot(this,N)!==rt&&(Ht(this,N,rt),rt&&Lt(this,Ct,sn).call(this,rt.propertiesToUpdate))}toggleSelected(rt){if(ot(this,m).has(rt)){ot(this,m).delete(rt),rt.unselect(),Lt(this,St,Me).call(this,{hasSelectedEditor:this.hasSelection});return}ot(this,m).add(rt),rt.select(),Lt(this,Ct,sn).call(this,rt.propertiesToUpdate),Lt(this,St,Me).call(this,{hasSelectedEditor:!0})}setSelected(rt){for(const ht of ot(this,m))ht!==rt&&ht.unselect();ot(this,m).clear(),ot(this,m).add(rt),rt.select(),Lt(this,Ct,sn).call(this,rt.propertiesToUpdate),Lt(this,St,Me).call(this,{hasSelectedEditor:!0})}isSelected(rt){return ot(this,m).has(rt)}unselect(rt){rt.unselect(),ot(this,m).delete(rt),Lt(this,St,Me).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return ot(this,m).size!==0}undo(){ot(this,o).undo(),Lt(this,St,Me).call(this,{hasSomethingToUndo:ot(this,o).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:Lt(this,re,on).call(this)})}redo(){ot(this,o).redo(),Lt(this,St,Me).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:ot(this,o).hasSomethingToRedo(),isEmpty:Lt(this,re,on).call(this)})}addCommands(rt){ot(this,o).add(rt),Lt(this,St,Me).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:Lt(this,re,on).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const rt=[...ot(this,m)],ht=()=>{for(const bt of rt)bt.remove()},gt=()=>{for(const bt of rt)Lt(this,Wt,xi).call(this,bt)};this.addCommands({cmd:ht,undo:gt,mustExec:!0})}commitOrRemove(){var rt;(rt=ot(this,N))==null||rt.commitOrRemove()}hasSomethingToControl(){return ot(this,N)||this.hasSelection}selectAll(){for(const rt of ot(this,m))rt.commit();Lt(this,Bt,vi).call(this,ot(this,U).values())}unselectAll(){if(ot(this,N)){ot(this,N).commitOrRemove();return}if(this.hasSelection){for(const rt of ot(this,m))rt.unselect();ot(this,m).clear(),Lt(this,St,Me).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(rt,ht,gt=!1){if(gt||this.commitOrRemove(),!this.hasSelection)return;ot(this,z)[0]+=rt,ot(this,z)[1]+=ht;const[bt,Pt]=ot(this,z),It=[...ot(this,m)],Nt=1e3;ot(this,Y)&&clearTimeout(ot(this,Y)),Ht(this,Y,setTimeout(()=>{Ht(this,Y,null),ot(this,z)[0]=ot(this,z)[1]=0,this.addCommands({cmd:()=>{for(const Kt of It)ot(this,U).has(Kt.id)&&Kt.translateInPage(bt,Pt)},undo:()=>{for(const Kt of It)ot(this,U).has(Kt.id)&&Kt.translateInPage(-bt,-Pt)},mustExec:!1})},Nt));for(const Kt of It)Kt.translateInPage(rt,ht)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),Ht(this,E,new Map);for(const rt of ot(this,m))ot(this,E).set(rt,{savedX:rt.x,savedY:rt.y,savedPageIndex:rt.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!ot(this,E))return!1;this.disableUserSelect(!1);const rt=ot(this,E);Ht(this,E,null);let ht=!1;for(const[{x:bt,y:Pt,pageIndex:It},Nt]of rt)Nt.newX=bt,Nt.newY=Pt,Nt.newPageIndex=It,ht||(ht=bt!==Nt.savedX||Pt!==Nt.savedY||It!==Nt.savedPageIndex);if(!ht)return!1;const gt=(bt,Pt,It,Nt)=>{if(ot(this,U).has(bt.id)){const Kt=ot(this,$).get(Nt);Kt?bt._setParentAndPosition(Kt,Pt,It):(bt.pageIndex=Nt,bt.x=Pt,bt.y=It)}};return this.addCommands({cmd:()=>{for(const[bt,{newX:Pt,newY:It,newPageIndex:Nt}]of rt)gt(bt,Pt,It,Nt)},undo:()=>{for(const[bt,{savedX:Pt,savedY:It,savedPageIndex:Nt}]of rt)gt(bt,Pt,It,Nt)},mustExec:!0}),!0}dragSelectedEditors(rt,ht){if(ot(this,E))for(const gt of ot(this,E).keys())gt.drag(rt,ht)}rebuild(rt){if(rt.parent===null){const ht=this.getLayer(rt.pageIndex);ht?(ht.changeParent(rt),ht.addOrRebuild(rt)):(this.addEditor(rt),this.addToAnnotationStorage(rt),rt.rebuild())}else rt.parent.addOrRebuild(rt)}isActive(rt){return ot(this,N)===rt}getActive(){return ot(this,N)}getMode(){return ot(this,h)}get imageManager(){return(0,ft.shadow)(this,"imageManager",new Z)}};N=new WeakMap,U=new WeakMap,$=new WeakMap,P=new WeakMap,R=new WeakMap,o=new WeakMap,g=new WeakMap,x=new WeakMap,E=new WeakMap,D=new WeakMap,q=new WeakMap,W=new WeakMap,w=new WeakMap,s=new WeakMap,c=new WeakMap,S=new WeakMap,h=new WeakMap,m=new WeakMap,k=new WeakMap,I=new WeakMap,B=new WeakMap,tt=new WeakMap,it=new WeakMap,st=new WeakMap,X=new WeakMap,J=new WeakMap,j=new WeakMap,O=new WeakMap,H=new WeakMap,V=new WeakMap,z=new WeakMap,Y=new WeakMap,G=new WeakMap,K=new WeakMap,et=new WeakSet,sr=function(){window.addEventListener("focus",ot(this,B)),window.addEventListener("blur",ot(this,I))},at=new WeakSet,yi=function(){window.removeEventListener("focus",ot(this,B)),window.removeEventListener("blur",ot(this,I))},lt=new WeakSet,wi=function(){window.addEventListener("keydown",ot(this,X),{capture:!0})},pt=new WeakSet,An=function(){window.removeEventListener("keydown",ot(this,X),{capture:!0})},Et=new WeakSet,Si=function(){document.addEventListener("copy",ot(this,tt)),document.addEventListener("cut",ot(this,it)),document.addEventListener("paste",ot(this,st))},xt=new WeakSet,Ai=function(){document.removeEventListener("copy",ot(this,tt)),document.removeEventListener("cut",ot(this,it)),document.removeEventListener("paste",ot(this,st))},St=new WeakSet,Me=function(rt){Object.entries(rt).some(([gt,bt])=>ot(this,V)[gt]!==bt)&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(ot(this,V),rt)})},Ct=new WeakSet,sn=function(rt){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:rt})},Zt=new WeakSet,or=function(){if(!ot(this,s)){Ht(this,s,!0);for(const rt of ot(this,$).values())rt.enable()}},Ut=new WeakSet,cr=function(){if(this.unselectAll(),ot(this,s)){Ht(this,s,!1);for(const rt of ot(this,$).values())rt.disable()}},Wt=new WeakSet,xi=function(rt){const ht=ot(this,$).get(rt.pageIndex);ht?ht.addOrRebuild(rt):this.addEditor(rt)},re=new WeakSet,on=function(){if(ot(this,U).size===0)return!0;if(ot(this,U).size===1)for(const rt of ot(this,U).values())return rt.isEmpty();return!1},Bt=new WeakSet,vi=function(rt){ot(this,m).clear();for(const ht of rt)ht.isEmpty()||(ot(this,m).add(ht),ht.select());Lt(this,St,Me).call(this,{hasSelectedEditor:!0})},ye(jt,"TRANSLATE_SMALL",1),ye(jt,"TRANSLATE_BIG",10);let t=jt;dt.AnnotationEditorUIManager=t},(Ot,dt,Mt)=>{var g,x,E,D,q,W,w,s,c,S,h,m,We,I,Ve,tt,Ci,st,xn,J,vn,O,cn,V,ln;Object.defineProperty(dt,"__esModule",{value:!0}),dt.StatTimer=dt.RenderingCancelledException=dt.PixelsPerInch=dt.PageViewport=dt.PDFDateString=dt.DOMStandardFontDataFactory=dt.DOMSVGFactory=dt.DOMFilterFactory=dt.DOMCanvasFactory=dt.DOMCMapReaderFactory=void 0,dt.deprecated=F,dt.getColorValues=U,dt.getCurrentTransform=$,dt.getCurrentTransformInverse=P,dt.getFilenameFromUrl=T,dt.getPdfFilenameFromUrl=d,dt.getRGB=N,dt.getXfaPageViewport=y,dt.isDataScheme=v,dt.isPdfFile=A,dt.isValidFetchUrl=C,dt.loadScript=b,dt.noContextMenu=p,dt.setLayerDimensions=R;var ft=Mt(7),At=Mt(1);const $t="http://www.w3.org/2000/svg",o=class o{};ye(o,"CSS",96),ye(o,"PDF",72),ye(o,"PDF_TO_CSS_UNITS",o.CSS/o.PDF);let vt=o;dt.PixelsPerInch=vt;class M extends ft.BaseFilterFactory{constructor({docId:K,ownerDocument:et=globalThis.document}={}){super();_t(this,m);_t(this,I);_t(this,tt);_t(this,st);_t(this,J);_t(this,O);_t(this,V);_t(this,g,void 0);_t(this,x,void 0);_t(this,E,void 0);_t(this,D,void 0);_t(this,q,void 0);_t(this,W,void 0);_t(this,w,void 0);_t(this,s,void 0);_t(this,c,void 0);_t(this,S,void 0);_t(this,h,0);Ht(this,E,K),Ht(this,D,et)}addFilter(K){if(!K)return"none";let et=ot(this,m,We).get(K);if(et)return et;let nt,at,Q,lt;if(K.length===1){const Et=K[0],Tt=new Array(256);for(let xt=0;xt<256;xt++)Tt[xt]=Et[xt]/255;lt=nt=at=Q=Tt.join(",")}else{const[Et,Tt,xt]=K,wt=new Array(256),St=new Array(256),Rt=new Array(256);for(let Ct=0;Ct<256;Ct++)wt[Ct]=Et[Ct]/255,St[Ct]=Tt[Ct]/255,Rt[Ct]=xt[Ct]/255;nt=wt.join(","),at=St.join(","),Q=Rt.join(","),lt=`${nt}${at}${Q}`}if(et=ot(this,m,We).get(lt),et)return ot(this,m,We).set(K,et),et;const ut=`g_${ot(this,E)}_transfer_map_${an(this,h)._++}`,pt=`url(#${ut})`;ot(this,m,We).set(K,pt),ot(this,m,We).set(lt,pt);const yt=Lt(this,st,xn).call(this,ut);return Lt(this,O,cn).call(this,nt,at,Q,yt),pt}addHCMFilter(K,et){var Tt;const nt=`${K}-${et}`;if(ot(this,W)===nt)return ot(this,w);if(Ht(this,W,nt),Ht(this,w,"none"),(Tt=ot(this,q))==null||Tt.remove(),!K||!et)return ot(this,w);const at=Lt(this,V,ln).call(this,K);K=At.Util.makeHexColor(...at);const Q=Lt(this,V,ln).call(this,et);if(et=At.Util.makeHexColor(...Q),ot(this,I,Ve).style.color="",K==="#000000"&&et==="#ffffff"||K===et)return ot(this,w);const lt=new Array(256);for(let xt=0;xt<=255;xt++){const wt=xt/255;lt[xt]=wt<=.03928?wt/12.92:((wt+.055)/1.055)**2.4}const ut=lt.join(","),pt=`g_${ot(this,E)}_hcm_filter`,yt=Ht(this,s,Lt(this,st,xn).call(this,pt));Lt(this,O,cn).call(this,ut,ut,ut,yt),Lt(this,tt,Ci).call(this,yt);const Et=(xt,wt)=>{const St=at[xt]/255,Rt=Q[xt]/255,Ct=new Array(wt+1);for(let Gt=0;Gt<=wt;Gt++)Ct[Gt]=St+Gt/wt*(Rt-St);return Ct.join(",")};return Lt(this,O,cn).call(this,Et(0,5),Et(1,5),Et(2,5),yt),Ht(this,w,`url(#${pt})`),ot(this,w)}addHighlightHCMFilter(K,et,nt,at){var Rt;const Q=`${K}-${et}-${nt}-${at}`;if(ot(this,c)===Q)return ot(this,S);if(Ht(this,c,Q),Ht(this,S,"none"),(Rt=ot(this,s))==null||Rt.remove(),!K||!et)return ot(this,S);const[lt,ut]=[K,et].map(Lt(this,V,ln).bind(this));let pt=Math.round(.2126*lt[0]+.7152*lt[1]+.0722*lt[2]),yt=Math.round(.2126*ut[0]+.7152*ut[1]+.0722*ut[2]),[Et,Tt]=[nt,at].map(Lt(this,V,ln).bind(this));yt{const Ft=new Array(256),Ut=(yt-pt)/Zt,Vt=Ct/255,Wt=(Gt-Ct)/(255*Zt);let Yt=0;for(let re=0;re<=Zt;re++){const Jt=Math.round(pt+re*Ut),Bt=Vt+re*Wt;for(let Xt=Yt;Xt<=Jt;Xt++)Ft[Xt]=Bt;Yt=Jt+1}for(let re=Yt;re<256;re++)Ft[re]=Ft[Yt-1];return Ft.join(",")},wt=`g_${ot(this,E)}_hcm_highlight_filter`,St=Ht(this,s,Lt(this,st,xn).call(this,wt));return Lt(this,tt,Ci).call(this,St),Lt(this,O,cn).call(this,xt(Et[0],Tt[0],5),xt(Et[1],Tt[1],5),xt(Et[2],Tt[2],5),St),Ht(this,S,`url(#${wt})`),ot(this,S)}destroy(K=!1){K&&(ot(this,w)||ot(this,S))||(ot(this,x)&&(ot(this,x).parentNode.parentNode.remove(),Ht(this,x,null)),ot(this,g)&&(ot(this,g).clear(),Ht(this,g,null)),Ht(this,h,0))}}g=new WeakMap,x=new WeakMap,E=new WeakMap,D=new WeakMap,q=new WeakMap,W=new WeakMap,w=new WeakMap,s=new WeakMap,c=new WeakMap,S=new WeakMap,h=new WeakMap,m=new WeakSet,We=function(){return ot(this,g)||Ht(this,g,new Map)},I=new WeakSet,Ve=function(){if(!ot(this,x)){const K=ot(this,D).createElement("div"),{style:et}=K;et.visibility="hidden",et.contain="strict",et.width=et.height=0,et.position="absolute",et.top=et.left=0,et.zIndex=-1;const nt=ot(this,D).createElementNS($t,"svg");nt.setAttribute("width",0),nt.setAttribute("height",0),Ht(this,x,ot(this,D).createElementNS($t,"defs")),K.append(nt),nt.append(ot(this,x)),ot(this,D).body.append(K)}return ot(this,x)},tt=new WeakSet,Ci=function(K){const et=ot(this,D).createElementNS($t,"feColorMatrix");et.setAttribute("type","matrix"),et.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),K.append(et)},st=new WeakSet,xn=function(K){const et=ot(this,D).createElementNS($t,"filter");return et.setAttribute("color-interpolation-filters","sRGB"),et.setAttribute("id",K),ot(this,I,Ve).append(et),et},J=new WeakSet,vn=function(K,et,nt){const at=ot(this,D).createElementNS($t,et);at.setAttribute("type","discrete"),at.setAttribute("tableValues",nt),K.append(at)},O=new WeakSet,cn=function(K,et,nt,at){const Q=ot(this,D).createElementNS($t,"feComponentTransfer");at.append(Q),Lt(this,J,vn).call(this,Q,"feFuncR",K),Lt(this,J,vn).call(this,Q,"feFuncG",et),Lt(this,J,vn).call(this,Q,"feFuncB",nt)},V=new WeakSet,ln=function(K){return ot(this,I,Ve).style.color=K,N(getComputedStyle(ot(this,I,Ve)).getPropertyValue("color"))},dt.DOMFilterFactory=M;class Z extends ft.BaseCanvasFactory{constructor({ownerDocument:G=globalThis.document}={}){super(),this._document=G}_createCanvas(G,K){const et=this._document.createElement("canvas");return et.width=G,et.height=K,et}}dt.DOMCanvasFactory=Z;async function n(Y,G=!1){if(C(Y,document.baseURI)){const K=await fetch(Y);if(!K.ok)throw new Error(K.statusText);return G?new Uint8Array(await K.arrayBuffer()):(0,At.stringToBytes)(await K.text())}return new Promise((K,et)=>{const nt=new XMLHttpRequest;nt.open("GET",Y,!0),G&&(nt.responseType="arraybuffer"),nt.onreadystatechange=()=>{if(nt.readyState===XMLHttpRequest.DONE){if(nt.status===200||nt.status===0){let at;if(G&&nt.response?at=new Uint8Array(nt.response):!G&&nt.responseText&&(at=(0,At.stringToBytes)(nt.responseText)),at){K(at);return}}et(new Error(nt.statusText))}},nt.send(null)})}class _ extends ft.BaseCMapReaderFactory{_fetchData(G,K){return n(G,this.isCompressed).then(et=>({cMapData:et,compressionType:K}))}}dt.DOMCMapReaderFactory=_;class L extends ft.BaseStandardFontDataFactory{_fetchData(G){return n(G,!0)}}dt.DOMStandardFontDataFactory=L;class t extends ft.BaseSVGFactory{_createSVG(G){return document.createElementNS($t,G)}}dt.DOMSVGFactory=t;class e{constructor({viewBox:G,scale:K,rotation:et,offsetX:nt=0,offsetY:at=0,dontFlip:Q=!1}){this.viewBox=G,this.scale=K,this.rotation=et,this.offsetX=nt,this.offsetY=at;const lt=(G[2]+G[0])/2,ut=(G[3]+G[1])/2;let pt,yt,Et,Tt;switch(et%=360,et<0&&(et+=360),et){case 180:pt=-1,yt=0,Et=0,Tt=1;break;case 90:pt=0,yt=1,Et=1,Tt=0;break;case 270:pt=0,yt=-1,Et=-1,Tt=0;break;case 0:pt=1,yt=0,Et=0,Tt=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}Q&&(Et=-Et,Tt=-Tt);let xt,wt,St,Rt;pt===0?(xt=Math.abs(ut-G[1])*K+nt,wt=Math.abs(lt-G[0])*K+at,St=(G[3]-G[1])*K,Rt=(G[2]-G[0])*K):(xt=Math.abs(lt-G[0])*K+nt,wt=Math.abs(ut-G[1])*K+at,St=(G[2]-G[0])*K,Rt=(G[3]-G[1])*K),this.transform=[pt*K,yt*K,Et*K,Tt*K,xt-pt*K*lt-Et*K*ut,wt-yt*K*lt-Tt*K*ut],this.width=St,this.height=Rt}get rawDims(){const{viewBox:G}=this;return(0,At.shadow)(this,"rawDims",{pageWidth:G[2]-G[0],pageHeight:G[3]-G[1],pageX:G[0],pageY:G[1]})}clone({scale:G=this.scale,rotation:K=this.rotation,offsetX:et=this.offsetX,offsetY:nt=this.offsetY,dontFlip:at=!1}={}){return new e({viewBox:this.viewBox.slice(),scale:G,rotation:K,offsetX:et,offsetY:nt,dontFlip:at})}convertToViewportPoint(G,K){return At.Util.applyTransform([G,K],this.transform)}convertToViewportRectangle(G){const K=At.Util.applyTransform([G[0],G[1]],this.transform),et=At.Util.applyTransform([G[2],G[3]],this.transform);return[K[0],K[1],et[0],et[1]]}convertToPdfPoint(G,K){return At.Util.applyInverseTransform([G,K],this.transform)}}dt.PageViewport=e;class a extends At.BaseException{constructor(G,K=0){super(G,"RenderingCancelledException"),this.extraDelay=K}}dt.RenderingCancelledException=a;function v(Y){const G=Y.length;let K=0;for(;Kdt in Ot?Wr(Ot,dt,{enumerable:!0,configurable:!0,writable:!0,value:Mt}):Ot[dt]=Mt;var ye=(Ot,dt,Mt)=>(Vr(Ot,typeof dt!="symbol"?dt+"":dt,Mt),Mt),hi=(Ot,dt,Mt)=>{if(!dt.has(Ot))throw TypeError("Cannot "+Mt)};var ot=(Ot,dt,Mt)=>(hi(Ot,dt,"read from private field"),Mt?Mt.call(Ot):dt.get(Ot)),_t=(Ot,dt,Mt)=>{if(dt.has(Ot))throw TypeError("Cannot add the same private member more than once");dt instanceof WeakSet?dt.add(Ot):dt.set(Ot,Mt)},Ht=(Ot,dt,Mt,ft)=>(hi(Ot,dt,"write to private field"),ft?ft.call(Ot,Mt):dt.set(Ot,Mt),Mt);var an=(Ot,dt,Mt,ft)=>({set _(At){Ht(Ot,dt,At,Mt)},get _(){return ot(Ot,dt,ft)}}),Lt=(Ot,dt,Mt)=>(hi(Ot,dt,"access private method"),Mt);import{V as getAugmentedNamespace,p as getDefaultExportFromCjs$1,s as commonjsRequire,r as reactExports,R as React,Z as warning,$ as PropTypes,j as jsx,f as jsxs,Q as themeable,Y as __read,a0 as Spinner$1,I as Icon,a1 as Input}from"./index-5zY5TMAp.js";function _mergeNamespaces(Ot,dt){for(var Mt=0;Mtft[At]})}}}return Object.freeze(Object.defineProperty(Ot,Symbol.toStringTag,{value:"Module"}))}var pdf$1={exports:{}};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$5=getAugmentedNamespace(__viteBrowserExternal$1);(function(module,exports){(function(dt,Mt){module.exports=dt.pdfjsLib=Mt()})(globalThis,()=>(()=>{var __webpack_modules__=[,(Ot,dt)=>{var Tt;Object.defineProperty(dt,"__esModule",{value:!0}),dt.VerbosityLevel=dt.Util=dt.UnknownErrorException=dt.UnexpectedResponseException=dt.TextRenderingMode=dt.RenderingIntentFlag=dt.PromiseCapability=dt.PermissionFlag=dt.PasswordResponses=dt.PasswordException=dt.PageActionEventType=dt.OPS=dt.MissingPDFException=dt.MAX_IMAGE_SIZE_TO_CACHE=dt.LINE_FACTOR=dt.LINE_DESCENT_FACTOR=dt.InvalidPDFException=dt.ImageKind=dt.IDENTITY_MATRIX=dt.FormatError=dt.FeatureTest=dt.FONT_IDENTITY_MATRIX=dt.DocumentActionEventType=dt.CMapCompressionType=dt.BaseException=dt.BASELINE_FACTOR=dt.AnnotationType=dt.AnnotationReplyType=dt.AnnotationPrefix=dt.AnnotationMode=dt.AnnotationFlag=dt.AnnotationFieldFlag=dt.AnnotationEditorType=dt.AnnotationEditorPrefix=dt.AnnotationEditorParamsType=dt.AnnotationBorderStyleType=dt.AnnotationActionEventType=dt.AbortException=void 0,dt.assert=E,dt.bytesToString=B,dt.createValidAbsoluteUrl=q,dt.getModificationDate=at,dt.getUuid=yt,dt.getVerbosityLevel=R,dt.info=o,dt.isArrayBuffer=et,dt.isArrayEqual=nt,dt.isNodeJS=void 0,dt.normalizeUnicode=pt,dt.objectFromMap=X,dt.objectSize=st,dt.setVerbosityLevel=P,dt.shadow=W,dt.string32=it,dt.stringToBytes=tt,dt.stringToPDFString=Y,dt.stringToUTF8String=G,dt.unreachable=x,dt.utf8StringToString=K,dt.warn=g;const Mt=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser");dt.isNodeJS=Mt;const ft=[1,0,0,1,0,0];dt.IDENTITY_MATRIX=ft;const At=[.001,0,0,.001,0,0];dt.FONT_IDENTITY_MATRIX=At;const $t=1e7;dt.MAX_IMAGE_SIZE_TO_CACHE=$t;const vt=1.35;dt.LINE_FACTOR=vt;const M=.35;dt.LINE_DESCENT_FACTOR=M;const Z=M/vt;dt.BASELINE_FACTOR=Z;const n={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256};dt.RenderingIntentFlag=n;const _={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3};dt.AnnotationMode=_;const L="pdfjs_internal_editor_";dt.AnnotationEditorPrefix=L;const t={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15};dt.AnnotationEditorType=t;const e={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23};dt.AnnotationEditorParamsType=e;const a={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};dt.PermissionFlag=a;const v={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4};dt.TextRenderingMode=v;const A={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};dt.ImageKind=A;const T={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26};dt.AnnotationType=T;const d={GROUP:"Group",REPLY:"R"};dt.AnnotationReplyType=d;const i={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};dt.AnnotationFlag=i;const C={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};dt.AnnotationFieldFlag=C;const p={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};dt.AnnotationBorderStyleType=p;const b={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"};dt.AnnotationActionEventType=b;const F={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};dt.DocumentActionEventType=F;const u={O:"PageOpen",C:"PageClose"};dt.PageActionEventType=u;const l={ERRORS:0,WARNINGS:1,INFOS:5};dt.VerbosityLevel=l;const y={NONE:0,BINARY:1};dt.CMapCompressionType=y;const N={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};dt.OPS=N;const U={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};dt.PasswordResponses=U;let $=l.WARNINGS;function P(xt){Number.isInteger(xt)&&($=xt)}function R(){return $}function o(xt){$>=l.INFOS&&console.log(`Info: ${xt}`)}function g(xt){$>=l.WARNINGS&&console.log(`Warning: ${xt}`)}function x(xt){throw new Error(xt)}function E(xt,wt){xt||x(wt)}function D(xt){switch(xt==null?void 0:xt.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function q(xt,wt=null,St=null){if(!xt)return null;try{if(St&&typeof xt=="string"){if(St.addDefaultProtocol&&xt.startsWith("www.")){const Ct=xt.match(/\./g);(Ct==null?void 0:Ct.length)>=2&&(xt=`http://${xt}`)}if(St.tryConvertEncoding)try{xt=G(xt)}catch{}}const Rt=wt?new URL(xt,wt):new URL(xt);if(D(Rt))return Rt}catch{}return null}function W(xt,wt,St,Rt=!1){return Object.defineProperty(xt,wt,{value:St,enumerable:!Rt,configurable:!0,writable:!1}),St}const w=function(){function wt(St,Rt){this.constructor===wt&&x("Cannot initialize BaseException."),this.message=St,this.name=Rt}return wt.prototype=new Error,wt.constructor=wt,wt}();dt.BaseException=w;class s extends w{constructor(wt,St){super(wt,"PasswordException"),this.code=St}}dt.PasswordException=s;class c extends w{constructor(wt,St){super(wt,"UnknownErrorException"),this.details=St}}dt.UnknownErrorException=c;class S extends w{constructor(wt){super(wt,"InvalidPDFException")}}dt.InvalidPDFException=S;class h extends w{constructor(wt){super(wt,"MissingPDFException")}}dt.MissingPDFException=h;class m extends w{constructor(wt,St){super(wt,"UnexpectedResponseException"),this.status=St}}dt.UnexpectedResponseException=m;class k extends w{constructor(wt){super(wt,"FormatError")}}dt.FormatError=k;class I extends w{constructor(wt){super(wt,"AbortException")}}dt.AbortException=I;function B(xt){(typeof xt!="object"||(xt==null?void 0:xt.length)===void 0)&&x("Invalid argument for bytesToString");const wt=xt.length,St=8192;if(wt>24&255,xt>>16&255,xt>>8&255,xt&255)}function st(xt){return Object.keys(xt).length}function X(xt){const wt=Object.create(null);for(const[St,Rt]of xt)wt[St]=Rt;return wt}function J(){const xt=new Uint8Array(4);return xt[0]=1,new Uint32Array(xt.buffer,0,1)[0]===1}function j(){try{return new Function(""),!0}catch{return!1}}class O{static get isLittleEndian(){return W(this,"isLittleEndian",J())}static get isEvalSupported(){return W(this,"isEvalSupported",j())}static get isOffscreenCanvasSupported(){return W(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get platform(){return typeof navigator>"u"?W(this,"platform",{isWin:!1,isMac:!1}):W(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){var wt,St;return W(this,"isCSSRoundSupported",(St=(wt=globalThis.CSS)==null?void 0:wt.supports)==null?void 0:St.call(wt,"width: round(1.5px, 1px)"))}}dt.FeatureTest=O;const H=[...Array(256).keys()].map(xt=>xt.toString(16).padStart(2,"0"));class V{static makeHexColor(wt,St,Rt){return`#${H[wt]}${H[St]}${H[Rt]}`}static scaleMinMax(wt,St){let Rt;wt[0]?(wt[0]<0&&(Rt=St[0],St[0]=St[1],St[1]=Rt),St[0]*=wt[0],St[1]*=wt[0],wt[3]<0&&(Rt=St[2],St[2]=St[3],St[3]=Rt),St[2]*=wt[3],St[3]*=wt[3]):(Rt=St[0],St[0]=St[2],St[2]=Rt,Rt=St[1],St[1]=St[3],St[3]=Rt,wt[1]<0&&(Rt=St[2],St[2]=St[3],St[3]=Rt),St[2]*=wt[1],St[3]*=wt[1],wt[2]<0&&(Rt=St[0],St[0]=St[1],St[1]=Rt),St[0]*=wt[2],St[1]*=wt[2]),St[0]+=wt[4],St[1]+=wt[4],St[2]+=wt[5],St[3]+=wt[5]}static transform(wt,St){return[wt[0]*St[0]+wt[2]*St[1],wt[1]*St[0]+wt[3]*St[1],wt[0]*St[2]+wt[2]*St[3],wt[1]*St[2]+wt[3]*St[3],wt[0]*St[4]+wt[2]*St[5]+wt[4],wt[1]*St[4]+wt[3]*St[5]+wt[5]]}static applyTransform(wt,St){const Rt=wt[0]*St[0]+wt[1]*St[2]+St[4],Ct=wt[0]*St[1]+wt[1]*St[3]+St[5];return[Rt,Ct]}static applyInverseTransform(wt,St){const Rt=St[0]*St[3]-St[1]*St[2],Ct=(wt[0]*St[3]-wt[1]*St[2]+St[2]*St[5]-St[4]*St[3])/Rt,Gt=(-wt[0]*St[1]+wt[1]*St[0]+St[4]*St[1]-St[5]*St[0])/Rt;return[Ct,Gt]}static getAxialAlignedBoundingBox(wt,St){const Rt=this.applyTransform(wt,St),Ct=this.applyTransform(wt.slice(2,4),St),Gt=this.applyTransform([wt[0],wt[3]],St),Zt=this.applyTransform([wt[2],wt[1]],St);return[Math.min(Rt[0],Ct[0],Gt[0],Zt[0]),Math.min(Rt[1],Ct[1],Gt[1],Zt[1]),Math.max(Rt[0],Ct[0],Gt[0],Zt[0]),Math.max(Rt[1],Ct[1],Gt[1],Zt[1])]}static inverseTransform(wt){const St=wt[0]*wt[3]-wt[1]*wt[2];return[wt[3]/St,-wt[1]/St,-wt[2]/St,wt[0]/St,(wt[2]*wt[5]-wt[4]*wt[3])/St,(wt[4]*wt[1]-wt[5]*wt[0])/St]}static singularValueDecompose2dScale(wt){const St=[wt[0],wt[2],wt[1],wt[3]],Rt=wt[0]*St[0]+wt[1]*St[2],Ct=wt[0]*St[1]+wt[1]*St[3],Gt=wt[2]*St[0]+wt[3]*St[2],Zt=wt[2]*St[1]+wt[3]*St[3],Ft=(Rt+Zt)/2,Ut=Math.sqrt((Rt+Zt)**2-4*(Rt*Zt-Gt*Ct))/2,Vt=Ft+Ut||1,Wt=Ft-Ut||1;return[Math.sqrt(Vt),Math.sqrt(Wt)]}static normalizeRect(wt){const St=wt.slice(0);return wt[0]>wt[2]&&(St[0]=wt[2],St[2]=wt[0]),wt[1]>wt[3]&&(St[1]=wt[3],St[3]=wt[1]),St}static intersect(wt,St){const Rt=Math.max(Math.min(wt[0],wt[2]),Math.min(St[0],St[2])),Ct=Math.min(Math.max(wt[0],wt[2]),Math.max(St[0],St[2]));if(Rt>Ct)return null;const Gt=Math.max(Math.min(wt[1],wt[3]),Math.min(St[1],St[3])),Zt=Math.min(Math.max(wt[1],wt[3]),Math.max(St[1],St[3]));return Gt>Zt?null:[Rt,Gt,Ct,Zt]}static bezierBoundingBox(wt,St,Rt,Ct,Gt,Zt,Ft,Ut){const Vt=[],Wt=[[],[]];let Yt,re,Jt,Bt,Xt,jt,mt,rt;for(let Pt=0;Pt<2;++Pt){if(Pt===0?(re=6*wt-12*Rt+6*Gt,Yt=-3*wt+9*Rt-9*Gt+3*Ft,Jt=3*Rt-3*wt):(re=6*St-12*Ct+6*Zt,Yt=-3*St+9*Ct-9*Zt+3*Ut,Jt=3*Ct-3*St),Math.abs(Yt)<1e-12){if(Math.abs(re)<1e-12)continue;Bt=-Jt/re,0="ï"){let St;if(xt[0]==="þ"&&xt[1]==="ÿ"?St="utf-16be":xt[0]==="ÿ"&&xt[1]==="þ"?St="utf-16le":xt[0]==="ï"&&xt[1]==="»"&&xt[2]==="¿"&&(St="utf-8"),St)try{const Rt=new TextDecoder(St,{fatal:!0}),Ct=tt(xt);return Rt.decode(Ct)}catch(Rt){g(`stringToPDFString: "${Rt}".`)}}const wt=[];for(let St=0,Rt=xt.length;St{this.resolve=Rt=>{Ht(this,Tt,!0),wt(Rt)},this.reject=Rt=>{Ht(this,Tt,!0),St(Rt)}})}get settled(){return ot(this,Tt)}}Tt=new WeakMap,dt.PromiseCapability=Q;let lt=null,ut=null;function pt(xt){return lt||(lt=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,ut=new Map([["ſt","ſt"]])),xt.replaceAll(lt,(wt,St,Rt)=>St?St.normalize("NFKC"):ut.get(Rt))}function yt(){if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.randomUUID)=="function")return crypto.randomUUID();const xt=new Uint8Array(32);if(typeof crypto<"u"&&typeof(crypto==null?void 0:crypto.getRandomValues)=="function")crypto.getRandomValues(xt);else for(let wt=0;wt<32;wt++)xt[wt]=Math.floor(Math.random()*255);return B(xt)}const Et="pdfjs_internal_id_";dt.AnnotationPrefix=Et},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{var Ot,Mt,ft,At,Ge,vt,wn,Z,n,_,L,t,e,a,v,A,Sn,d,i,ui,p,b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,Object.defineProperty(exports,"SVGGraphics",{enumerable:!0,get:function(){return _displaySvg.SVGGraphics}}),exports.build=void 0,exports.getDocument=getDocument,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(3),_display_utils=__w_pdfjs_require__(6),_font_loader=__w_pdfjs_require__(9),_displayNode_utils=__w_pdfjs_require__(10),_canvas=__w_pdfjs_require__(11),_worker_options=__w_pdfjs_require__(14),_message_handler=__w_pdfjs_require__(15),_metadata=__w_pdfjs_require__(16),_optional_content_config=__w_pdfjs_require__(17),_transport_stream=__w_pdfjs_require__(18),_displayFetch_stream=__w_pdfjs_require__(19),_displayNetwork=__w_pdfjs_require__(22),_displayNode_stream=__w_pdfjs_require__(23),_displaySvg=__w_pdfjs_require__(24),_xfa_text=__w_pdfjs_require__(25);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=_util.isNodeJS?_displayNode_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;const DefaultCMapReaderFactory=_util.isNodeJS?_displayNode_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;const DefaultFilterFactory=_util.isNodeJS?_displayNode_utils.NodeFilterFactory:_display_utils.DOMFilterFactory;exports.DefaultFilterFactory=DefaultFilterFactory;const DefaultStandardFontDataFactory=_util.isNodeJS?_displayNode_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory;exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;function getDocument(u){if(typeof u=="string"||u instanceof URL?u={url:u}:(0,_util.isArrayBuffer)(u)&&(u={data:u}),typeof u!="object")throw new Error("Invalid parameter in getDocument, need parameter object.");if(!u.url&&!u.data&&!u.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const l=new PDFDocumentLoadingTask,{docId:y}=l,N=u.url?getUrlProp(u.url):null,U=u.data?getDataProp(u.data):null,$=u.httpHeaders||null,P=u.withCredentials===!0,R=u.password??null,o=u.range instanceof PDFDataRangeTransport?u.range:null,g=Number.isInteger(u.rangeChunkSize)&&u.rangeChunkSize>0?u.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let x=u.worker instanceof PDFWorker?u.worker:null;const E=u.verbosity,D=typeof u.docBaseUrl=="string"&&!(0,_display_utils.isDataScheme)(u.docBaseUrl)?u.docBaseUrl:null,q=typeof u.cMapUrl=="string"?u.cMapUrl:null,W=u.cMapPacked!==!1,w=u.CMapReaderFactory||DefaultCMapReaderFactory,s=typeof u.standardFontDataUrl=="string"?u.standardFontDataUrl:null,c=u.StandardFontDataFactory||DefaultStandardFontDataFactory,S=u.stopAtErrors!==!0,h=Number.isInteger(u.maxImageSize)&&u.maxImageSize>-1?u.maxImageSize:-1,m=u.isEvalSupported!==!1,k=typeof u.isOffscreenCanvasSupported=="boolean"?u.isOffscreenCanvasSupported:!_util.isNodeJS,I=Number.isInteger(u.canvasMaxAreaInBytes)?u.canvasMaxAreaInBytes:-1,B=typeof u.disableFontFace=="boolean"?u.disableFontFace:_util.isNodeJS,tt=u.fontExtraProperties===!0,it=u.enableXfa===!0,st=u.ownerDocument||globalThis.document,X=u.disableRange===!0,J=u.disableStream===!0,j=u.disableAutoFetch===!0,O=u.pdfBug===!0,H=o?o.length:u.length??NaN,V=typeof u.useSystemFonts=="boolean"?u.useSystemFonts:!_util.isNodeJS&&!B,z=typeof u.useWorkerFetch=="boolean"?u.useWorkerFetch:w===_display_utils.DOMCMapReaderFactory&&c===_display_utils.DOMStandardFontDataFactory&&q&&s&&(0,_display_utils.isValidFetchUrl)(q,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(s,document.baseURI),Y=u.canvasFactory||new DefaultCanvasFactory({ownerDocument:st}),G=u.filterFactory||new DefaultFilterFactory({docId:y,ownerDocument:st}),K=null;(0,_util.setVerbosityLevel)(E);const et={canvasFactory:Y,filterFactory:G};if(z||(et.cMapReaderFactory=new w({baseUrl:q,isCompressed:W}),et.standardFontDataFactory=new c({baseUrl:s})),!x){const Q={verbosity:E,port:_worker_options.GlobalWorkerOptions.workerPort};x=Q.port?PDFWorker.fromPort(Q):new PDFWorker(Q),l._worker=x}const nt={docId:y,apiVersion:"3.11.174",data:U,password:R,disableAutoFetch:j,rangeChunkSize:g,length:H,docBaseUrl:D,enableXfa:it,evaluatorOptions:{maxImageSize:h,disableFontFace:B,ignoreErrors:S,isEvalSupported:m,isOffscreenCanvasSupported:k,canvasMaxAreaInBytes:I,fontExtraProperties:tt,useSystemFonts:V,cMapUrl:z?q:null,standardFontDataUrl:z?s:null}},at={ignoreErrors:S,isEvalSupported:m,disableFontFace:B,fontExtraProperties:tt,enableXfa:it,ownerDocument:st,disableAutoFetch:j,pdfBug:O,styleElement:K};return x.promise.then(function(){if(l.destroyed)throw new Error("Loading aborted");const Q=_fetchDocument(x,nt),lt=new Promise(function(ut){let pt;o?pt=new _transport_stream.PDFDataTransportStream({length:H,initialData:o.initialData,progressiveDone:o.progressiveDone,contentDispositionFilename:o.contentDispositionFilename,disableRange:X,disableStream:J},o):U||(pt=(Et=>_util.isNodeJS?new _displayNode_stream.PDFNodeStream(Et):(0,_display_utils.isValidFetchUrl)(Et.url)?new _displayFetch_stream.PDFFetchStream(Et):new _displayNetwork.PDFNetworkStream(Et))({url:N,length:H,httpHeaders:$,withCredentials:P,rangeChunkSize:g,disableRange:X,disableStream:J})),ut(pt)});return Promise.all([Q,lt]).then(function([ut,pt]){if(l.destroyed)throw new Error("Loading aborted");const yt=new _message_handler.MessageHandler(y,ut,x.port),Et=new WorkerTransport(yt,l,pt,at,et);l._transport=Et,yt.send("Ready",null)})}).catch(l._capability.reject),l}async function _fetchDocument(u,l){if(u.destroyed)throw new Error("Worker was destroyed");const y=await u.messageHandler.sendWithPromise("GetDocRequest",l,l.data?[l.data.buffer]:null);if(u.destroyed)throw new Error("Worker was destroyed");return y}function getUrlProp(u){if(u instanceof URL)return u.href;try{return new URL(u,window.location).href}catch{if(_util.isNodeJS&&typeof u=="string")return u}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(u){if(_util.isNodeJS&&typeof Buffer<"u"&&u instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(u instanceof Uint8Array&&u.byteLength===u.buffer.byteLength)return u;if(typeof u=="string")return(0,_util.stringToBytes)(u);if(typeof u=="object"&&!isNaN(u==null?void 0:u.length)||(0,_util.isArrayBuffer)(u))return new Uint8Array(u);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}const dt=class dt{constructor(){this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId=`d${an(dt,Ot)._++}`,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){var l,y,N;this.destroyed=!0;try{(l=this._worker)!=null&&l.port&&(this._worker._pendingDestroy=!0),await((y=this._transport)==null?void 0:y.destroy())}catch(U){throw(N=this._worker)!=null&&N.port&&delete this._worker._pendingDestroy,U}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}};Ot=new WeakMap,_t(dt,Ot,0);let PDFDocumentLoadingTask=dt;exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(l,y,N=!1,U=null){this.length=l,this.initialData=y,this.progressiveDone=N,this.contentDispositionFilename=U,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(l){this._rangeListeners.push(l)}addProgressListener(l){this._progressListeners.push(l)}addProgressiveReadListener(l){this._progressiveReadListeners.push(l)}addProgressiveDoneListener(l){this._progressiveDoneListeners.push(l)}onDataRange(l,y){for(const N of this._rangeListeners)N(l,y)}onDataProgress(l,y){this._readyCapability.promise.then(()=>{for(const N of this._progressListeners)N(l,y)})}onDataProgressiveRead(l){this._readyCapability.promise.then(()=>{for(const y of this._progressiveReadListeners)y(l)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const l of this._progressiveDoneListeners)l()})}transportReady(){this._readyCapability.resolve()}requestDataRange(l,y){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(l,y){this._pdfInfo=l,this._transport=y,Object.defineProperty(this,"getJavaScript",{value:()=>((0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead."),this.getJSActions().then(N=>{if(!N)return N;const U=[];for(const $ in N)U.push(...N[$]);return U}))})}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(l){return this._transport.getPage(l)}getPageIndex(l){return this._transport.getPageIndex(l)}getDestinations(){return this._transport.getDestinations()}getDestination(l){return this._transport.getDestination(l)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(l=!1){return this._transport.startCleanup(l||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(l,y,N,U=!1){_t(this,At);_t(this,vt);_t(this,Mt,null);_t(this,ft,!1);this._pageIndex=l,this._pageInfo=y,this._transport=N,this._stats=U?new _display_utils.StatTimer:null,this._pdfBug=U,this.commonObjs=N.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:l,rotation:y=this.rotate,offsetX:N=0,offsetY:U=0,dontFlip:$=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:l,rotation:y,offsetX:N,offsetY:U,dontFlip:$})}getAnnotations({intent:l="display"}={}){const y=this._transport.getRenderingIntent(l);return this._transport.getAnnotations(this._pageIndex,y.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){var l;return((l=this._transport._htmlForXfa)==null?void 0:l.children[this._pageIndex])||null}render({canvasContext:l,viewport:y,intent:N="display",annotationMode:U=_util.AnnotationMode.ENABLE,transform:$=null,background:P=null,optionalContentConfigPromise:R=null,annotationCanvasMap:o=null,pageColors:g=null,printAnnotationStorage:x=null}){var c,S;(c=this._stats)==null||c.time("Overall");const E=this._transport.getRenderingIntent(N,U,x);Ht(this,ft,!1),Lt(this,vt,wn).call(this),R||(R=this._transport.getOptionalContentConfig());let D=this._intentStates.get(E.cacheKey);D||(D=Object.create(null),this._intentStates.set(E.cacheKey,D)),D.streamReaderCancelTimeout&&(clearTimeout(D.streamReaderCancelTimeout),D.streamReaderCancelTimeout=null);const q=!!(E.renderingIntent&_util.RenderingIntentFlag.PRINT);D.displayReadyCapability||(D.displayReadyCapability=new _util.PromiseCapability,D.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(S=this._stats)==null||S.time("Page Request"),this._pumpOperatorList(E));const W=h=>{var m,k;D.renderTasks.delete(w),(this._maybeCleanupAfterRender||q)&&Ht(this,ft,!0),Lt(this,At,Ge).call(this,!q),h?(w.capability.reject(h),this._abortOperatorList({intentState:D,reason:h instanceof Error?h:new Error(h)})):w.capability.resolve(),(m=this._stats)==null||m.timeEnd("Rendering"),(k=this._stats)==null||k.timeEnd("Overall")},w=new InternalRenderTask({callback:W,params:{canvasContext:l,viewport:y,transform:$,background:P},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:o,operatorList:D.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!q,pdfBug:this._pdfBug,pageColors:g});(D.renderTasks||(D.renderTasks=new Set)).add(w);const s=w.task;return Promise.all([D.displayReadyCapability.promise,R]).then(([h,m])=>{var k;if(this.destroyed){W();return}(k=this._stats)==null||k.time("Rendering"),w.initializeGraphics({transparency:h,optionalContentConfig:m}),w.operatorListChanged()}).catch(W),s}getOperatorList({intent:l="display",annotationMode:y=_util.AnnotationMode.ENABLE,printAnnotationStorage:N=null}={}){var o;function U(){P.operatorList.lastChunk&&(P.opListReadCapability.resolve(P.operatorList),P.renderTasks.delete(R))}const $=this._transport.getRenderingIntent(l,y,N,!0);let P=this._intentStates.get($.cacheKey);P||(P=Object.create(null),this._intentStates.set($.cacheKey,P));let R;return P.opListReadCapability||(R=Object.create(null),R.operatorListChanged=U,P.opListReadCapability=new _util.PromiseCapability,(P.renderTasks||(P.renderTasks=new Set)).add(R),P.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},(o=this._stats)==null||o.time("Page Request"),this._pumpOperatorList($)),P.opListReadCapability.promise}streamTextContent({includeMarkedContent:l=!1,disableNormalization:y=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:l===!0,disableNormalization:y===!0},{highWaterMark:100,size(U){return U.items.length}})}getTextContent(l={}){if(this._transport._htmlForXfa)return this.getXfa().then(N=>_xfa_text.XfaText.textContent(N));const y=this.streamTextContent(l);return new Promise(function(N,U){function $(){P.read().then(function({value:o,done:g}){if(g){N(R);return}Object.assign(R.styles,o.styles),R.items.push(...o.items),$()},U)}const P=y.getReader(),R={items:[],styles:Object.create(null)};$()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const l=[];for(const y of this._intentStates.values())if(this._abortOperatorList({intentState:y,reason:new Error("Page was destroyed."),force:!0}),!y.opListReadCapability)for(const N of y.renderTasks)l.push(N.completed),N.cancel();return this.objs.clear(),Ht(this,ft,!1),Lt(this,vt,wn).call(this),Promise.all(l)}cleanup(l=!1){Ht(this,ft,!0);const y=Lt(this,At,Ge).call(this,!1);return l&&y&&this._stats&&(this._stats=new _display_utils.StatTimer),y}_startRenderPage(l,y){var U,$;const N=this._intentStates.get(y);N&&((U=this._stats)==null||U.timeEnd("Page Request"),($=N.displayReadyCapability)==null||$.resolve(l))}_renderPageChunk(l,y){for(let N=0,U=l.length;N{R.read().then(({value:x,done:E})=>{if(E){o.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(x,o),g())},x=>{if(o.streamReader=null,!this._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;for(const E of o.renderTasks)E.operatorListChanged();Lt(this,At,Ge).call(this,!0)}if(o.displayReadyCapability)o.displayReadyCapability.reject(x);else if(o.opListReadCapability)o.opListReadCapability.reject(x);else throw x}})};g()}_abortOperatorList({intentState:l,reason:y,force:N=!1}){if(l.streamReader){if(l.streamReaderCancelTimeout&&(clearTimeout(l.streamReaderCancelTimeout),l.streamReaderCancelTimeout=null),!N){if(l.renderTasks.size>0)return;if(y instanceof _display_utils.RenderingCancelledException){let U=RENDERING_CANCELLED_TIMEOUT;y.extraDelay>0&&y.extraDelay<1e3&&(U+=y.extraDelay),l.streamReaderCancelTimeout=setTimeout(()=>{l.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:l,reason:y,force:!0})},U);return}}if(l.streamReader.cancel(new _util.AbortException(y.message)).catch(()=>{}),l.streamReader=null,!this._transport.destroyed){for(const[U,$]of this._intentStates)if($===l){this._intentStates.delete(U);break}this.cleanup()}}}get stats(){return this._stats}}Mt=new WeakMap,ft=new WeakMap,At=new WeakSet,Ge=function(l=!1){if(Lt(this,vt,wn).call(this),!ot(this,ft)||this.destroyed)return!1;if(l)return Ht(this,Mt,setTimeout(()=>{Ht(this,Mt,null),Lt(this,At,Ge).call(this,!1)},DELAYED_CLEANUP_TIMEOUT)),!1;for(const{renderTasks:y,operatorList:N}of this._intentStates.values())if(y.size>0||!N.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),Ht(this,ft,!1),!0},vt=new WeakSet,wn=function(){ot(this,Mt)&&(clearTimeout(ot(this,Mt)),Ht(this,Mt,null))},exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{constructor(){_t(this,Z,new Set);_t(this,n,Promise.resolve())}postMessage(l,y){const N={data:structuredClone(l,y?{transfer:y}:null)};ot(this,n).then(()=>{for(const U of ot(this,Z))U.call(this,N)})}addEventListener(l,y){ot(this,Z).add(y)}removeEventListener(l,y){ot(this,Z).delete(y)}terminate(){ot(this,Z).clear()}}Z=new WeakMap,n=new WeakMap,exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};exports.PDFWorkerUtil=PDFWorkerUtil;{if(_util.isNodeJS&&typeof commonjsRequire=="function")PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if(typeof document=="object"){const u=(_=document==null?void 0:document.currentScript)==null?void 0:_.src;u&&(PDFWorkerUtil.fallbackWorkerSrc=u.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(u,l){let y;try{if(y=new URL(u),!y.origin||y.origin==="null")return!1}catch{return!1}const N=new URL(l,y);return y.origin===N.origin},PDFWorkerUtil.createCDNWrapper=function(u){const l=`importScripts("${u}");`;return URL.createObjectURL(new Blob([l]))}}const _PDFWorker=class _PDFWorker{constructor({name:u=null,port:l=null,verbosity:y=(0,_util.getVerbosityLevel)()}={}){var N;if(this.name=u,this.destroyed=!1,this.verbosity=y,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,l){if((N=ot(_PDFWorker,L))!=null&&N.has(l))throw new Error("Cannot use more than one PDFWorker per port.");(ot(_PDFWorker,L)||Ht(_PDFWorker,L,new WeakMap)).set(l,this),this._initializeFromPort(l);return}this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(u){this._port=u,this._messageHandler=new _message_handler.MessageHandler("main","worker",u),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!_PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:u}=_PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,u)||(u=PDFWorkerUtil.createCDNWrapper(new URL(u,window.location).href));const l=new Worker(u),y=new _message_handler.MessageHandler("main","worker",l),N=()=>{l.removeEventListener("error",U),y.destroy(),l.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},U=()=>{this._webWorker||N()};l.addEventListener("error",U),y.on("test",P=>{if(l.removeEventListener("error",U),this.destroyed){N();return}P?(this._messageHandler=y,this._port=l,this._webWorker=l,this._readyCapability.resolve(),y.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),y.destroy(),l.terminate())}),y.on("ready",P=>{if(l.removeEventListener("error",U),this.destroyed){N();return}try{$()}catch{this._setupFakeWorker()}});const $=()=>{const P=new Uint8Array;y.send("test",P,[P.buffer])};$();return}catch{(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),_PDFWorker._setupFakeWorkerGlobal.then(u=>{if(this.destroyed){this._readyCapability.reject(new Error("Worker was destroyed"));return}const l=new LoopbackPort;this._port=l;const y=`fake${PDFWorkerUtil.fakeWorkerId++}`,N=new _message_handler.MessageHandler(y+"_worker",y,l);u.setup(N,l);const U=new _message_handler.MessageHandler(y,y+"_worker",l);this._messageHandler=U,this._readyCapability.resolve(),U.send("configure",{verbosity:this.verbosity})}).catch(u=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${u.message}".`))})}destroy(){var u;this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),(u=ot(_PDFWorker,L))==null||u.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(u){var y;if(!(u!=null&&u.port))throw new Error("PDFWorker.fromPort - invalid method signature.");const l=(y=ot(this,L))==null?void 0:y.get(u.port);if(l){if(l._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return l}return new _PDFWorker(u)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(PDFWorkerUtil.fallbackWorkerSrc!==null)return _util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){var u;try{return((u=globalThis.pdfjsWorker)==null?void 0:u.WorkerMessageHandler)||null}catch{return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_util.isNodeJS&&typeof commonjsRequire=="function"){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}};L=new WeakMap,_t(_PDFWorker,L,void 0);let PDFWorker=_PDFWorker;exports.PDFWorker=PDFWorker;class WorkerTransport{constructor(l,y,N,U,$){_t(this,A);_t(this,t,new Map);_t(this,e,new Map);_t(this,a,new Map);_t(this,v,null);this.messageHandler=l,this.loadingTask=y,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:U.ownerDocument,styleElement:U.styleElement}),this._params=U,this.canvasFactory=$.canvasFactory,this.filterFactory=$.filterFactory,this.cMapReaderFactory=$.cMapReaderFactory,this.standardFontDataFactory=$.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=N,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(l,y=_util.AnnotationMode.ENABLE,N=null,U=!1){let $=_util.RenderingIntentFlag.DISPLAY,P=_annotation_storage.SerializableEmpty;switch(l){case"any":$=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":$=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${l}`)}switch(y){case _util.AnnotationMode.DISABLE:$+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:$+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:$+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,P=($&_util.RenderingIntentFlag.PRINT&&N instanceof _annotation_storage.PrintAnnotationStorage?N:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${y}`)}return U&&($+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:$,cacheKey:`${$}_${P.hash}`,annotationStorageSerializable:P}}destroy(){var N;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,(N=ot(this,v))==null||N.reject(new Error("Worker was destroyed during onPassword callback"));const l=[];for(const U of ot(this,e).values())l.push(U._destroy());ot(this,e).clear(),ot(this,a).clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const y=this.messageHandler.sendWithPromise("Terminate",null);return l.push(y),Promise.all(l).then(()=>{var U;this.commonObjs.clear(),this.fontLoader.clear(),ot(this,t).clear(),this.filterFactory.destroy(),(U=this._networkStream)==null||U.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:l,loadingTask:y}=this;l.on("GetReader",(N,U)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=$=>{this._lastProgress={loaded:$.loaded,total:$.total}},U.onPull=()=>{this._fullReader.read().then(function({value:$,done:P}){if(P){U.close();return}(0,_util.assert)($ instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),U.enqueue(new Uint8Array($),1,[$])}).catch($=>{U.error($)})},U.onCancel=$=>{this._fullReader.cancel($),U.ready.catch(P=>{if(!this.destroyed)throw P})}}),l.on("ReaderHeadersReady",N=>{const U=new _util.PromiseCapability,$=this._fullReader;return $.headersReady.then(()=>{var P;(!$.isStreamingSupported||!$.isRangeSupported)&&(this._lastProgress&&((P=y.onProgress)==null||P.call(y,this._lastProgress)),$.onProgress=R=>{var o;(o=y.onProgress)==null||o.call(y,{loaded:R.loaded,total:R.total})}),U.resolve({isStreamingSupported:$.isStreamingSupported,isRangeSupported:$.isRangeSupported,contentLength:$.contentLength})},U.reject),U.promise}),l.on("GetRangeReader",(N,U)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const $=this._networkStream.getRangeReader(N.begin,N.end);if(!$){U.close();return}U.onPull=()=>{$.read().then(function({value:P,done:R}){if(R){U.close();return}(0,_util.assert)(P instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),U.enqueue(new Uint8Array(P),1,[P])}).catch(P=>{U.error(P)})},U.onCancel=P=>{$.cancel(P),U.ready.catch(R=>{if(!this.destroyed)throw R})}}),l.on("GetDoc",({pdfInfo:N})=>{this._numPages=N.numPages,this._htmlForXfa=N.htmlForXfa,delete N.htmlForXfa,y._capability.resolve(new PDFDocumentProxy(N,this))}),l.on("DocException",function(N){let U;switch(N.name){case"PasswordException":U=new _util.PasswordException(N.message,N.code);break;case"InvalidPDFException":U=new _util.InvalidPDFException(N.message);break;case"MissingPDFException":U=new _util.MissingPDFException(N.message);break;case"UnexpectedResponseException":U=new _util.UnexpectedResponseException(N.message,N.status);break;case"UnknownErrorException":U=new _util.UnknownErrorException(N.message,N.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}y._capability.reject(U)}),l.on("PasswordRequest",N=>{if(Ht(this,v,new _util.PromiseCapability),y.onPassword){const U=$=>{$ instanceof Error?ot(this,v).reject($):ot(this,v).resolve({password:$})};try{y.onPassword(U,N.code)}catch($){ot(this,v).reject($)}}else ot(this,v).reject(new _util.PasswordException(N.message,N.code));return ot(this,v).promise}),l.on("DataLoaded",N=>{var U;(U=y.onProgress)==null||U.call(y,{loaded:N.length,total:N.length}),this.downloadInfoCapability.resolve(N)}),l.on("StartRenderPage",N=>{if(this.destroyed)return;ot(this,e).get(N.pageIndex)._startRenderPage(N.transparency,N.cacheKey)}),l.on("commonobj",([N,U,$])=>{var P;if(!this.destroyed&&!this.commonObjs.has(N))switch(U){case"Font":const R=this._params;if("error"in $){const x=$.error;(0,_util.warn)(`Error during font loading: ${x}`),this.commonObjs.resolve(N,x);break}const o=R.pdfBug&&((P=globalThis.FontInspector)!=null&&P.enabled)?(x,E)=>globalThis.FontInspector.fontAdded(x,E):null,g=new _font_loader.FontFaceObject($,{isEvalSupported:R.isEvalSupported,disableFontFace:R.disableFontFace,ignoreErrors:R.ignoreErrors,inspectFont:o});this.fontLoader.bind(g).catch(x=>l.sendWithPromise("FontFallback",{id:N})).finally(()=>{!R.fontExtraProperties&&g.data&&(g.data=null),this.commonObjs.resolve(N,g)});break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(N,$);break;default:throw new Error(`Got unknown common object type ${U}`)}}),l.on("obj",([N,U,$,P])=>{var o;if(this.destroyed)return;const R=ot(this,e).get(U);if(!R.objs.has(N))switch($){case"Image":if(R.objs.resolve(N,P),P){let g;if(P.bitmap){const{width:x,height:E}=P;g=x*E*4}else g=((o=P.data)==null?void 0:o.length)||0;g>_util.MAX_IMAGE_SIZE_TO_CACHE&&(R._maybeCleanupAfterRender=!0)}break;case"Pattern":R.objs.resolve(N,P);break;default:throw new Error(`Got unknown object type ${$}`)}}),l.on("DocProgress",N=>{var U;this.destroyed||(U=y.onProgress)==null||U.call(y,{loaded:N.loaded,total:N.total})}),l.on("FetchBuiltInCMap",N=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(N):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),l.on("FetchStandardFontData",N=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(N):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){var N;this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:l,transfers:y}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:l,filename:((N=this._fullReader)==null?void 0:N.filename)??null},y).finally(()=>{this.annotationStorage.resetModified()})}getPage(l){if(!Number.isInteger(l)||l<=0||l>this._numPages)return Promise.reject(new Error("Invalid page request."));const y=l-1,N=ot(this,a).get(y);if(N)return N;const U=this.messageHandler.sendWithPromise("GetPage",{pageIndex:y}).then($=>{if(this.destroyed)throw new Error("Transport destroyed");const P=new PDFPageProxy(y,$,this,this._params.pdfBug);return ot(this,e).set(y,P),P});return ot(this,a).set(y,U),U}getPageIndex(l){return typeof l!="object"||l===null||!Number.isInteger(l.num)||l.num<0||!Number.isInteger(l.gen)||l.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:l.num,gen:l.gen})}getAnnotations(l,y){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:l,intent:y})}getFieldObjects(){return Lt(this,A,Sn).call(this,"GetFieldObjects")}hasJSActions(){return Lt(this,A,Sn).call(this,"HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(l){return typeof l!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:l})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return Lt(this,A,Sn).call(this,"GetDocJSActions")}getPageJSActions(l){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:l})}getStructTree(l){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:l})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(l=>new _optional_content_config.OptionalContentConfig(l))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const l="GetMetadata",y=ot(this,t).get(l);if(y)return y;const N=this.messageHandler.sendWithPromise(l,null).then(U=>{var $,P;return{info:U[0],metadata:U[1]?new _metadata.Metadata(U[1]):null,contentDispositionFilename:(($=this._fullReader)==null?void 0:$.filename)??null,contentLength:((P=this._fullReader)==null?void 0:P.contentLength)??null}});return ot(this,t).set(l,N),N}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(l=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const y of ot(this,e).values())if(!y.cleanup())throw new Error(`startCleanup: Page ${y.pageNumber} is currently rendering.`);this.commonObjs.clear(),l||this.fontLoader.clear(),ot(this,t).clear(),this.filterFactory.destroy(!0)}}get loadingParams(){const{disableAutoFetch:l,enableXfa:y}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:l,enableXfa:y})}}t=new WeakMap,e=new WeakMap,a=new WeakMap,v=new WeakMap,A=new WeakSet,Sn=function(l,y=null){const N=ot(this,t).get(l);if(N)return N;const U=this.messageHandler.sendWithPromise(l,y);return ot(this,t).set(l,U),U};class PDFObjects{constructor(){_t(this,i);_t(this,d,Object.create(null))}get(l,y=null){if(y){const U=Lt(this,i,ui).call(this,l);return U.capability.promise.then(()=>y(U.data)),null}const N=ot(this,d)[l];if(!(N!=null&&N.capability.settled))throw new Error(`Requesting object that isn't resolved yet ${l}.`);return N.data}has(l){const y=ot(this,d)[l];return(y==null?void 0:y.capability.settled)||!1}resolve(l,y=null){const N=Lt(this,i,ui).call(this,l);N.data=y,N.capability.resolve()}clear(){var l;for(const y in ot(this,d)){const{data:N}=ot(this,d)[y];(l=N==null?void 0:N.bitmap)==null||l.close()}Ht(this,d,Object.create(null))}}d=new WeakMap,i=new WeakSet,ui=function(l){var y;return(y=ot(this,d))[l]||(y[l]={capability:new _util.PromiseCapability,data:null})};class RenderTask{constructor(l){_t(this,p,null);Ht(this,p,l),this.onContinue=null}get promise(){return ot(this,p).capability.promise}cancel(l=0){ot(this,p).cancel(null,l)}get separateAnnots(){const{separateAnnots:l}=ot(this,p).operatorList;if(!l)return!1;const{annotationCanvasMap:y}=ot(this,p);return l.form||l.canvas&&(y==null?void 0:y.size)>0}}p=new WeakMap,exports.RenderTask=RenderTask;const F=class F{constructor({callback:l,params:y,objs:N,commonObjs:U,annotationCanvasMap:$,operatorList:P,pageIndex:R,canvasFactory:o,filterFactory:g,useRequestAnimationFrame:x=!1,pdfBug:E=!1,pageColors:D=null}){this.callback=l,this.params=y,this.objs=N,this.commonObjs=U,this.annotationCanvasMap=$,this.operatorListIdx=null,this.operatorList=P,this._pageIndex=R,this.canvasFactory=o,this.filterFactory=g,this._pdfBug=E,this.pageColors=D,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=x===!0&&typeof window<"u",this.cancelled=!1,this.capability=new _util.PromiseCapability,this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=y.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency:l=!1,optionalContentConfig:y}){var R,o;if(this.cancelled)return;if(this._canvas){if(ot(F,b).has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");ot(F,b).add(this._canvas)}this._pdfBug&&((R=globalThis.StepperManager)!=null&&R.enabled)&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:N,viewport:U,transform:$,background:P}=this.params;this.gfx=new _canvas.CanvasGraphics(N,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:y},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:$,viewport:U,transparency:l,background:P}),this.operatorListIdx=0,this.graphicsReady=!0,(o=this.graphicsReadyCallback)==null||o.call(this)}cancel(l=null,y=0){var N;this.running=!1,this.cancelled=!0,(N=this.gfx)==null||N.endDrawing(),ot(F,b).delete(this._canvas),this.callback(l||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,y))}operatorListChanged(){var l;if(!this.graphicsReady){this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound);return}(l=this.stepper)==null||l.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame(()=>{this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),ot(F,b).delete(this._canvas),this.callback())))}};b=new WeakMap,_t(F,b,new WeakSet);let InternalRenderTask=F;const version="3.11.174";exports.version=version;const build="ce8716743";exports.build=build},(Ot,dt,Mt)=>{var n,_,L,tr,e;Object.defineProperty(dt,"__esModule",{value:!0}),dt.SerializableEmpty=dt.PrintAnnotationStorage=dt.AnnotationStorage=void 0;var ft=Mt(1),At=Mt(4),$t=Mt(8);const vt=Object.freeze({map:null,hash:"",transfers:void 0});dt.SerializableEmpty=vt;class M{constructor(){_t(this,L);_t(this,n,!1);_t(this,_,new Map);this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(v,A){const T=ot(this,_).get(v);return T===void 0?A:Object.assign(A,T)}getRawValue(v){return ot(this,_).get(v)}remove(v){if(ot(this,_).delete(v),ot(this,_).size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const A of ot(this,_).values())if(A instanceof At.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(v,A){const T=ot(this,_).get(v);let d=!1;if(T!==void 0)for(const[i,C]of Object.entries(A))T[i]!==C&&(d=!0,T[i]=C);else d=!0,ot(this,_).set(v,A);d&&Lt(this,L,tr).call(this),A instanceof At.AnnotationEditor&&typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(A.constructor._type)}has(v){return ot(this,_).has(v)}getAll(){return ot(this,_).size>0?(0,ft.objectFromMap)(ot(this,_)):null}setAll(v){for(const[A,T]of Object.entries(v))this.setValue(A,T)}get size(){return ot(this,_).size}resetModified(){ot(this,n)&&(Ht(this,n,!1),typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new Z(this)}get serializable(){if(ot(this,_).size===0)return vt;const v=new Map,A=new $t.MurmurHash3_64,T=[],d=Object.create(null);let i=!1;for(const[C,p]of ot(this,_)){const b=p instanceof At.AnnotationEditor?p.serialize(!1,d):p;b&&(v.set(C,b),A.update(`${C}:${JSON.stringify(b)}`),i||(i=!!b.bitmap))}if(i)for(const C of v.values())C.bitmap&&T.push(C.bitmap);return v.size>0?{map:v,hash:A.hexdigest(),transfers:T}:vt}}n=new WeakMap,_=new WeakMap,L=new WeakSet,tr=function(){ot(this,n)||(Ht(this,n,!0),typeof this.onSetModified=="function"&&this.onSetModified())},dt.AnnotationStorage=M;class Z extends M{constructor(A){super();_t(this,e,void 0);const{map:T,hash:d,transfers:i}=A.serializable,C=structuredClone(T,i?{transfer:i}:null);Ht(this,e,{map:C,hash:d,transfers:i})}get print(){(0,ft.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return ot(this,e)}}e=new WeakMap,dt.PrintAnnotationStorage=Z},(Ot,dt,Mt)=>{var Z,n,_,L,t,e,a,v,A,T,d,i,C,p,b,di,u,fi,y,pi,U,gi,P,er,o,nr,x,ir,D,mi,W,rr;Object.defineProperty(dt,"__esModule",{value:!0}),dt.AnnotationEditor=void 0;var ft=Mt(5),At=Mt(1),$t=Mt(6);const s=class s{constructor(S){_t(this,b);_t(this,u);_t(this,U);_t(this,P);_t(this,o);_t(this,x);_t(this,D);_t(this,W);_t(this,Z,"");_t(this,n,!1);_t(this,_,null);_t(this,L,null);_t(this,t,null);_t(this,e,!1);_t(this,a,null);_t(this,v,this.focusin.bind(this));_t(this,A,this.focusout.bind(this));_t(this,T,!1);_t(this,d,!1);_t(this,i,!1);ye(this,"_initialOptions",Object.create(null));ye(this,"_uiManager",null);ye(this,"_focusEventsAllowed",!0);ye(this,"_l10nPromise",null);_t(this,C,!1);_t(this,p,s._zIndex++);this.constructor===s&&(0,At.unreachable)("Cannot initialize AnnotationEditor."),this.parent=S.parent,this.id=S.id,this.width=this.height=null,this.pageIndex=S.parent.pageIndex,this.name=S.name,this.div=null,this._uiManager=S.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=S.isCentered,this._structTreeParentId=null;const{rotation:h,rawDims:{pageWidth:m,pageHeight:k,pageX:I,pageY:B}}=this.parent.viewport;this.rotation=h,this.pageRotation=(360+h-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[m,k],this.pageTranslation=[I,B];const[tt,it]=this.parentDimensions;this.x=S.x/tt,this.y=S.y/it,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return(0,At.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(S){const h=new M({id:S.parent.getNextId(),parent:S.parent,uiManager:S._uiManager});h.annotationElementId=S.annotationElementId,h.deleted=!0,h._uiManager.addToAnnotationStorage(h)}static initialize(S,h=null){if(s._l10nPromise||(s._l10nPromise=new Map(["editor_alt_text_button_label","editor_alt_text_edit_button_label","editor_alt_text_decorative_tooltip"].map(k=>[k,S.get(k)]))),h!=null&&h.strings)for(const k of h.strings)s._l10nPromise.set(k,S.get(k));if(s._borderLineWidth!==-1)return;const m=getComputedStyle(document.documentElement);s._borderLineWidth=parseFloat(m.getPropertyValue("--outline-width"))||0}static updateDefaultParams(S,h){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(S){return!1}static paste(S,h){(0,At.unreachable)("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return ot(this,C)}set _isDraggable(S){var h;Ht(this,C,S),(h=this.div)==null||h.classList.toggle("draggable",S)}center(){const[S,h]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*h/(S*2),this.y+=this.width*S/(h*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*h/(S*2),this.y-=this.width*S/(h*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(S){this._uiManager.addCommands(S)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=ot(this,p)}setParent(S){S!==null&&(this.pageIndex=S.pageIndex,this.pageDimensions=S.pageDimensions),this.parent=S}focusin(S){this._focusEventsAllowed&&(ot(this,T)?Ht(this,T,!1):this.parent.setSelected(this))}focusout(S){var m;if(!this._focusEventsAllowed||!this.isAttachedToDOM)return;const h=S.relatedTarget;h!=null&&h.closest(`#${this.id}`)||(S.preventDefault(),(m=this.parent)!=null&&m.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(S,h,m,k){const[I,B]=this.parentDimensions;[m,k]=this.screenToPageTranslation(m,k),this.x=(S+m)/I,this.y=(h+k)/B,this.fixAndSetPosition()}translate(S,h){Lt(this,b,di).call(this,this.parentDimensions,S,h)}translateInPage(S,h){Lt(this,b,di).call(this,this.pageDimensions,S,h),this.div.scrollIntoView({block:"nearest"})}drag(S,h){const[m,k]=this.parentDimensions;if(this.x+=S/m,this.y+=h/k,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:st,y:X}=this.div.getBoundingClientRect();this.parent.findNewParent(this,st,X)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x:I,y:B}=this;const[tt,it]=Lt(this,u,fi).call(this);I+=tt,B+=it,this.div.style.left=`${(100*I).toFixed(2)}%`,this.div.style.top=`${(100*B).toFixed(2)}%`,this.div.scrollIntoView({block:"nearest"})}fixAndSetPosition(){const[S,h]=this.pageDimensions;let{x:m,y:k,width:I,height:B}=this;switch(I*=S,B*=h,m*=S,k*=h,this.rotation){case 0:m=Math.max(0,Math.min(S-I,m)),k=Math.max(0,Math.min(h-B,k));break;case 90:m=Math.max(0,Math.min(S-B,m)),k=Math.min(h,Math.max(I,k));break;case 180:m=Math.min(S,Math.max(I,m)),k=Math.min(h,Math.max(B,k));break;case 270:m=Math.min(S,Math.max(B,m)),k=Math.max(0,Math.min(h-I,k));break}this.x=m/=S,this.y=k/=h;const[tt,it]=Lt(this,u,fi).call(this);m+=tt,k+=it;const{style:st}=this.div;st.left=`${(100*m).toFixed(2)}%`,st.top=`${(100*k).toFixed(2)}%`,this.moveInDOM()}screenToPageTranslation(S,h){var m;return Lt(m=s,y,pi).call(m,S,h,this.parentRotation)}pageTranslationToScreen(S,h){var m;return Lt(m=s,y,pi).call(m,S,h,360-this.parentRotation)}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale:S,pageDimensions:[h,m]}=this,k=h*S,I=m*S;return At.FeatureTest.isCSSRoundSupported?[Math.round(k),Math.round(I)]:[k,I]}setDims(S,h){var I;const[m,k]=this.parentDimensions;this.div.style.width=`${(100*S/m).toFixed(2)}%`,ot(this,e)||(this.div.style.height=`${(100*h/k).toFixed(2)}%`),(I=ot(this,_))==null||I.classList.toggle("small",Sm.stopPropagation()),S.addEventListener("click",m=>{m.preventDefault(),this._uiManager.editAltText(this)},{capture:!0}),S.addEventListener("keydown",m=>{m.target===S&&m.key==="Enter"&&(m.preventDefault(),this._uiManager.editAltText(this))}),Lt(this,D,mi).call(this),this.div.append(S),s.SMALL_EDITOR_SIZE||(s.SMALL_EDITOR_SIZE=Math.min(128,Math.round(S.getBoundingClientRect().width*1.4)))}getClientDimensions(){return this.div.getBoundingClientRect()}get altTextData(){return{altText:ot(this,Z),decorative:ot(this,n)}}set altTextData({altText:S,decorative:h}){ot(this,Z)===S&&ot(this,n)===h||(Ht(this,Z,S),Ht(this,n,h),Lt(this,D,mi).call(this))}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",ot(this,v)),this.div.addEventListener("focusout",ot(this,A));const[S,h]=this.parentDimensions;this.parentRotation%180!==0&&(this.div.style.maxWidth=`${(100*h/S).toFixed(2)}%`,this.div.style.maxHeight=`${(100*S/h).toFixed(2)}%`);const[m,k]=this.getInitialTranslation();return this.translate(m,k),(0,ft.bindEvents)(this,this.div,["pointerdown"]),this.div}pointerdown(S){const{isMac:h}=At.FeatureTest.platform;if(S.button!==0||S.ctrlKey&&h){S.preventDefault();return}Ht(this,T,!0),Lt(this,W,rr).call(this,S)}moveInDOM(){var S;(S=this.parent)==null||S.moveEditorInDOM(this)}_setParentAndPosition(S,h,m){S.changeParent(this),this.x=h,this.y=m,this.fixAndSetPosition()}getRect(S,h){const m=this.parentScale,[k,I]=this.pageDimensions,[B,tt]=this.pageTranslation,it=S/m,st=h/m,X=this.x*k,J=this.y*I,j=this.width*k,O=this.height*I;switch(this.rotation){case 0:return[X+it+B,I-J-st-O+tt,X+it+j+B,I-J-st+tt];case 90:return[X+st+B,I-J+it+tt,X+st+O+B,I-J+it+j+tt];case 180:return[X-it-j+B,I-J+st+tt,X-it+B,I-J+st+O+tt];case 270:return[X-st-O+B,I-J-it-j+tt,X-st+B,I-J-it+tt];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(S,h){const[m,k,I,B]=S,tt=I-m,it=B-k;switch(this.rotation){case 0:return[m,h-B,tt,it];case 90:return[m,h-k,it,tt];case 180:return[I,h-k,tt,it];case 270:return[I,h-B,it,tt];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){Ht(this,i,!0)}disableEditMode(){Ht(this,i,!1)}isInEditMode(){return ot(this,i)}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){var S,h;(S=this.div)==null||S.addEventListener("focusin",ot(this,v)),(h=this.div)==null||h.addEventListener("focusout",ot(this,A))}serialize(S=!1,h=null){(0,At.unreachable)("An editor must be serializable")}static deserialize(S,h,m){const k=new this.prototype.constructor({parent:h,id:h.getNextId(),uiManager:m});k.rotation=S.rotation;const[I,B]=k.pageDimensions,[tt,it,st,X]=k.getRectInCurrentCoords(S.rect,B);return k.x=tt/I,k.y=it/B,k.width=st/I,k.height=X/B,k}remove(){var S;this.div.removeEventListener("focusin",ot(this,v)),this.div.removeEventListener("focusout",ot(this,A)),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),(S=ot(this,_))==null||S.remove(),Ht(this,_,null),Ht(this,L,null)}get isResizable(){return!1}makeResizable(){this.isResizable&&(Lt(this,P,er).call(this),ot(this,a).classList.remove("hidden"))}select(){var S;this.makeResizable(),(S=this.div)==null||S.classList.add("selectedEditor")}unselect(){var S,h,m;(S=ot(this,a))==null||S.classList.add("hidden"),(h=this.div)==null||h.classList.remove("selectedEditor"),(m=this.div)!=null&&m.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}updateParams(S,h){}disableEditing(){ot(this,_)&&(ot(this,_).hidden=!0)}enableEditing(){ot(this,_)&&(ot(this,_).hidden=!1)}enterInEditMode(){}get contentDiv(){return this.div}get isEditing(){return ot(this,d)}set isEditing(S){Ht(this,d,S),this.parent&&(S?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(S,h){Ht(this,e,!0);const m=S/h,{style:k}=this.div;k.aspectRatio=m,k.height="auto"}static get MIN_SIZE(){return 16}};Z=new WeakMap,n=new WeakMap,_=new WeakMap,L=new WeakMap,t=new WeakMap,e=new WeakMap,a=new WeakMap,v=new WeakMap,A=new WeakMap,T=new WeakMap,d=new WeakMap,i=new WeakMap,C=new WeakMap,p=new WeakMap,b=new WeakSet,di=function([S,h],m,k){[m,k]=this.screenToPageTranslation(m,k),this.x+=m/S,this.y+=k/h,this.fixAndSetPosition()},u=new WeakSet,fi=function(){const[S,h]=this.parentDimensions,{_borderLineWidth:m}=s,k=m/S,I=m/h;switch(this.rotation){case 90:return[-k,I];case 180:return[k,I];case 270:return[k,-I];default:return[-k,-I]}},y=new WeakSet,pi=function(S,h,m){switch(m){case 90:return[h,-S];case 180:return[-S,-h];case 270:return[-h,S];default:return[S,h]}},U=new WeakSet,gi=function(S){switch(S){case 90:{const[h,m]=this.pageDimensions;return[0,-h/m,m/h,0]}case 180:return[-1,0,0,-1];case 270:{const[h,m]=this.pageDimensions;return[0,h/m,-m/h,0]}default:return[1,0,0,1]}},P=new WeakSet,er=function(){if(ot(this,a))return;Ht(this,a,document.createElement("div")),ot(this,a).classList.add("resizers");const S=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||S.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(const h of S){const m=document.createElement("div");ot(this,a).append(m),m.classList.add("resizer",h),m.addEventListener("pointerdown",Lt(this,o,nr).bind(this,h)),m.addEventListener("contextmenu",$t.noContextMenu)}this.div.prepend(ot(this,a))},o=new WeakSet,nr=function(S,h){h.preventDefault();const{isMac:m}=At.FeatureTest.platform;if(h.button!==0||h.ctrlKey&&m)return;const k=Lt(this,x,ir).bind(this,S),I=this._isDraggable;this._isDraggable=!1;const B={passive:!0,capture:!0};window.addEventListener("pointermove",k,B);const tt=this.x,it=this.y,st=this.width,X=this.height,J=this.parent.div.style.cursor,j=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(h.target).cursor;const O=()=>{this._isDraggable=I,window.removeEventListener("pointerup",O),window.removeEventListener("blur",O),window.removeEventListener("pointermove",k,B),this.parent.div.style.cursor=J,this.div.style.cursor=j;const H=this.x,V=this.y,z=this.width,Y=this.height;H===tt&&V===it&&z===st&&Y===X||this.addCommands({cmd:()=>{this.width=z,this.height=Y,this.x=H,this.y=V;const[G,K]=this.parentDimensions;this.setDims(G*z,K*Y),this.fixAndSetPosition()},undo:()=>{this.width=st,this.height=X,this.x=tt,this.y=it;const[G,K]=this.parentDimensions;this.setDims(G*st,K*X),this.fixAndSetPosition()},mustExec:!0})};window.addEventListener("pointerup",O),window.addEventListener("blur",O)},x=new WeakSet,ir=function(S,h){const[m,k]=this.parentDimensions,I=this.x,B=this.y,tt=this.width,it=this.height,st=s.MIN_SIZE/m,X=s.MIN_SIZE/k,J=Rt=>Math.round(Rt*1e4)/1e4,j=Lt(this,U,gi).call(this,this.rotation),O=(Rt,Ct)=>[j[0]*Rt+j[2]*Ct,j[1]*Rt+j[3]*Ct],H=Lt(this,U,gi).call(this,360-this.rotation),V=(Rt,Ct)=>[H[0]*Rt+H[2]*Ct,H[1]*Rt+H[3]*Ct];let z,Y,G=!1,K=!1;switch(S){case"topLeft":G=!0,z=(Rt,Ct)=>[0,0],Y=(Rt,Ct)=>[Rt,Ct];break;case"topMiddle":z=(Rt,Ct)=>[Rt/2,0],Y=(Rt,Ct)=>[Rt/2,Ct];break;case"topRight":G=!0,z=(Rt,Ct)=>[Rt,0],Y=(Rt,Ct)=>[0,Ct];break;case"middleRight":K=!0,z=(Rt,Ct)=>[Rt,Ct/2],Y=(Rt,Ct)=>[0,Ct/2];break;case"bottomRight":G=!0,z=(Rt,Ct)=>[Rt,Ct],Y=(Rt,Ct)=>[0,0];break;case"bottomMiddle":z=(Rt,Ct)=>[Rt/2,Ct],Y=(Rt,Ct)=>[Rt/2,0];break;case"bottomLeft":G=!0,z=(Rt,Ct)=>[0,Ct],Y=(Rt,Ct)=>[Rt,0];break;case"middleLeft":K=!0,z=(Rt,Ct)=>[0,Ct/2],Y=(Rt,Ct)=>[Rt,Ct/2];break}const et=z(tt,it),nt=Y(tt,it);let at=O(...nt);const Q=J(I+at[0]),lt=J(B+at[1]);let ut=1,pt=1,[yt,Et]=this.screenToPageTranslation(h.movementX,h.movementY);if([yt,Et]=V(yt/m,Et/k),G){const Rt=Math.hypot(tt,it);ut=pt=Math.max(Math.min(Math.hypot(nt[0]-et[0]-yt,nt[1]-et[1]-Et)/Rt,1/tt,1/it),st/tt,X/it)}else K?ut=Math.max(st,Math.min(1,Math.abs(nt[0]-et[0]-yt)))/tt:pt=Math.max(X,Math.min(1,Math.abs(nt[1]-et[1]-Et)))/it;const Tt=J(tt*ut),xt=J(it*pt);at=O(...Y(Tt,xt));const wt=Q-at[0],St=lt-at[1];this.width=Tt,this.height=xt,this.x=wt,this.y=St,this.setDims(m*Tt,k*xt),this.fixAndSetPosition()},D=new WeakSet,mi=async function(){var m;const S=ot(this,_);if(!S)return;if(!ot(this,Z)&&!ot(this,n)){S.classList.remove("done"),(m=ot(this,L))==null||m.remove();return}s._l10nPromise.get("editor_alt_text_edit_button_label").then(k=>{S.setAttribute("aria-label",k)});let h=ot(this,L);if(!h){Ht(this,L,h=document.createElement("span")),h.className="tooltip",h.setAttribute("role","tooltip");const k=h.id=`alt-text-tooltip-${this.id}`;S.setAttribute("aria-describedby",k);const I=100;S.addEventListener("mouseenter",()=>{Ht(this,t,setTimeout(()=>{Ht(this,t,null),ot(this,L).classList.add("show"),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"alt_text_tooltip"}}})},I))}),S.addEventListener("mouseleave",()=>{var B;clearTimeout(ot(this,t)),Ht(this,t,null),(B=ot(this,L))==null||B.classList.remove("show")})}S.classList.add("done"),h.innerText=ot(this,n)?await s._l10nPromise.get("editor_alt_text_decorative_tooltip"):ot(this,Z),h.parentNode||S.append(h)},W=new WeakSet,rr=function(S){if(!this._isDraggable)return;const h=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let m,k;h&&(m={passive:!0,capture:!0},k=B=>{const[tt,it]=this.screenToPageTranslation(B.movementX,B.movementY);this._uiManager.dragSelectedEditors(tt,it)},window.addEventListener("pointermove",k,m));const I=()=>{if(window.removeEventListener("pointerup",I),window.removeEventListener("blur",I),h&&window.removeEventListener("pointermove",k,m),Ht(this,T,!1),!this._uiManager.endDragSession()){const{isMac:B}=At.FeatureTest.platform;S.ctrlKey&&!B||S.shiftKey||S.metaKey&&B?this.parent.toggleSelected(this):this.parent.setSelected(this)}};window.addEventListener("pointerup",I),window.addEventListener("blur",I)},_t(s,y),ye(s,"_borderLineWidth",-1),ye(s,"_colorManager",new ft.ColorManager),ye(s,"_zIndex",1),ye(s,"SMALL_EDITOR_SIZE",0);let vt=s;dt.AnnotationEditor=vt;class M extends vt{constructor(S){super(S),this.annotationElementId=S.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}},(Ot,dt,Mt)=>{var e,a,v,A,T,bi,C,p,b,F,u,ar,N,U,$,P,R,o,g,x,E,D,q,W,w,s,c,S,h,m,k,I,B,tt,it,st,X,J,j,O,H,V,z,Y,G,K,et,sr,at,yi,lt,wi,pt,An,Et,Si,xt,Ai,St,Me,Ct,sn,Zt,or,Ut,cr,Wt,xi,re,on,Bt,vi;Object.defineProperty(dt,"__esModule",{value:!0}),dt.KeyboardManager=dt.CommandManager=dt.ColorManager=dt.AnnotationEditorUIManager=void 0,dt.bindEvents=$t,dt.opacityToHex=vt;var ft=Mt(1),At=Mt(6);function $t(mt,rt,ht){for(const gt of ht)rt.addEventListener(gt,mt[gt].bind(mt))}function vt(mt){return Math.round(Math.min(255,Math.max(1,255*mt))).toString(16).padStart(2,"0")}class M{constructor(){_t(this,e,0)}getId(){return`${ft.AnnotationEditorPrefix}${an(this,e)._++}`}}e=new WeakMap;const i=class i{constructor(){_t(this,T);_t(this,a,(0,ft.getUuid)());_t(this,v,0);_t(this,A,null)}static get _isSVGFittingCanvas(){const rt='data:image/svg+xml;charset=UTF-8,',gt=new OffscreenCanvas(1,3).getContext("2d"),bt=new Image;bt.src=rt;const Pt=bt.decode().then(()=>(gt.drawImage(bt,0,0,1,1,0,0,1,3),new Uint32Array(gt.getImageData(0,0,1,1).data.buffer)[0]===0));return(0,ft.shadow)(this,"_isSVGFittingCanvas",Pt)}async getFromFile(rt){const{lastModified:ht,name:gt,size:bt,type:Pt}=rt;return Lt(this,T,bi).call(this,`${ht}_${gt}_${bt}_${Pt}`,rt)}async getFromUrl(rt){return Lt(this,T,bi).call(this,rt,rt)}async getFromId(rt){ot(this,A)||Ht(this,A,new Map);const ht=ot(this,A).get(rt);return ht?ht.bitmap?(ht.refCounter+=1,ht):ht.file?this.getFromFile(ht.file):this.getFromUrl(ht.url):null}getSvgUrl(rt){const ht=ot(this,A).get(rt);return ht!=null&&ht.isSvg?ht.svgUrl:null}deleteId(rt){ot(this,A)||Ht(this,A,new Map);const ht=ot(this,A).get(rt);ht&&(ht.refCounter-=1,ht.refCounter===0&&(ht.bitmap=null))}isValidId(rt){return rt.startsWith(`image_${ot(this,a)}_`)}};a=new WeakMap,v=new WeakMap,A=new WeakMap,T=new WeakSet,bi=async function(rt,ht){ot(this,A)||Ht(this,A,new Map);let gt=ot(this,A).get(rt);if(gt===null)return null;if(gt!=null&>.bitmap)return gt.refCounter+=1,gt;try{gt||(gt={bitmap:null,id:`image_${ot(this,a)}_${an(this,v)._++}`,refCounter:0,isSvg:!1});let bt;if(typeof ht=="string"){gt.url=ht;const Pt=await fetch(ht);if(!Pt.ok)throw new Error(Pt.statusText);bt=await Pt.blob()}else bt=gt.file=ht;if(bt.type==="image/svg+xml"){const Pt=i._isSVGFittingCanvas,It=new FileReader,Nt=new Image,Kt=new Promise((Qt,ne)=>{Nt.onload=()=>{gt.bitmap=Nt,gt.isSvg=!0,Qt()},It.onload=async()=>{const ee=gt.svgUrl=It.result;Nt.src=await Pt?`${ee}#svgView(preserveAspectRatio(none))`:ee},Nt.onerror=It.onerror=ne});It.readAsDataURL(bt),await Kt}else gt.bitmap=await createImageBitmap(bt);gt.refCounter=1}catch(bt){console.error(bt),gt=null}return ot(this,A).set(rt,gt),gt&&ot(this,A).set(gt.id,gt),gt};let Z=i;class n{constructor(rt=128){_t(this,C,[]);_t(this,p,!1);_t(this,b,void 0);_t(this,F,-1);Ht(this,b,rt)}add({cmd:rt,undo:ht,mustExec:gt,type:bt=NaN,overwriteIfSameType:Pt=!1,keepUndo:It=!1}){if(gt&&rt(),ot(this,p))return;const Nt={cmd:rt,undo:ht,type:bt};if(ot(this,F)===-1){ot(this,C).length>0&&(ot(this,C).length=0),Ht(this,F,0),ot(this,C).push(Nt);return}if(Pt&&ot(this,C)[ot(this,F)].type===bt){It&&(Nt.undo=ot(this,C)[ot(this,F)].undo),ot(this,C)[ot(this,F)]=Nt;return}const Kt=ot(this,F)+1;Kt===ot(this,b)?ot(this,C).splice(0,1):(Ht(this,F,Kt),KtPt===ht[It]))return y._colorsMapping.get(gt);return ht}getHexCode(rt){const ht=this._colors.get(rt);return ht?ft.Util.makeHexColor(...ht):rt}};ye(y,"_colorsMapping",new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]));let L=y;dt.ColorManager=L;const jt=class jt{constructor(rt,ht,gt,bt,Pt,It){_t(this,et);_t(this,at);_t(this,lt);_t(this,pt);_t(this,Et);_t(this,xt);_t(this,St);_t(this,Ct);_t(this,Zt);_t(this,Ut);_t(this,Wt);_t(this,re);_t(this,Bt);_t(this,N,null);_t(this,U,new Map);_t(this,$,new Map);_t(this,P,null);_t(this,R,null);_t(this,o,new n);_t(this,g,0);_t(this,x,new Set);_t(this,E,null);_t(this,D,null);_t(this,q,new Set);_t(this,W,null);_t(this,w,new M);_t(this,s,!1);_t(this,c,!1);_t(this,S,null);_t(this,h,ft.AnnotationEditorType.NONE);_t(this,m,new Set);_t(this,k,null);_t(this,I,this.blur.bind(this));_t(this,B,this.focus.bind(this));_t(this,tt,this.copy.bind(this));_t(this,it,this.cut.bind(this));_t(this,st,this.paste.bind(this));_t(this,X,this.keydown.bind(this));_t(this,J,this.onEditingAction.bind(this));_t(this,j,this.onPageChanging.bind(this));_t(this,O,this.onScaleChanging.bind(this));_t(this,H,this.onRotationChanging.bind(this));_t(this,V,{isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1});_t(this,z,[0,0]);_t(this,Y,null);_t(this,G,null);_t(this,K,null);Ht(this,G,rt),Ht(this,K,ht),Ht(this,P,gt),this._eventBus=bt,this._eventBus._on("editingaction",ot(this,J)),this._eventBus._on("pagechanging",ot(this,j)),this._eventBus._on("scalechanging",ot(this,O)),this._eventBus._on("rotationchanging",ot(this,H)),Ht(this,R,Pt.annotationStorage),Ht(this,W,Pt.filterFactory),Ht(this,k,It),this.viewParameters={realScale:At.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}static get _keyboardManager(){const rt=jt.prototype,ht=Pt=>{const{activeElement:It}=document;return It&&ot(Pt,G).contains(It)&&Pt.hasSomethingToControl()},gt=this.TRANSLATE_SMALL,bt=this.TRANSLATE_BIG;return(0,ft.shadow)(this,"_keyboardManager",new _([[["ctrl+a","mac+meta+a"],rt.selectAll],[["ctrl+z","mac+meta+z"],rt.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],rt.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],rt.delete],[["Escape","mac+Escape"],rt.unselectAll],[["ArrowLeft","mac+ArrowLeft"],rt.translateSelectedEditors,{args:[-gt,0],checker:ht}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],rt.translateSelectedEditors,{args:[-bt,0],checker:ht}],[["ArrowRight","mac+ArrowRight"],rt.translateSelectedEditors,{args:[gt,0],checker:ht}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],rt.translateSelectedEditors,{args:[bt,0],checker:ht}],[["ArrowUp","mac+ArrowUp"],rt.translateSelectedEditors,{args:[0,-gt],checker:ht}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],rt.translateSelectedEditors,{args:[0,-bt],checker:ht}],[["ArrowDown","mac+ArrowDown"],rt.translateSelectedEditors,{args:[0,gt],checker:ht}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],rt.translateSelectedEditors,{args:[0,bt],checker:ht}]]))}destroy(){Lt(this,pt,An).call(this),Lt(this,at,yi).call(this),this._eventBus._off("editingaction",ot(this,J)),this._eventBus._off("pagechanging",ot(this,j)),this._eventBus._off("scalechanging",ot(this,O)),this._eventBus._off("rotationchanging",ot(this,H));for(const rt of ot(this,$).values())rt.destroy();ot(this,$).clear(),ot(this,U).clear(),ot(this,q).clear(),Ht(this,N,null),ot(this,m).clear(),ot(this,o).destroy(),ot(this,P).destroy()}get hcmFilter(){return(0,ft.shadow)(this,"hcmFilter",ot(this,k)?ot(this,W).addHCMFilter(ot(this,k).foreground,ot(this,k).background):"none")}get direction(){return(0,ft.shadow)(this,"direction",getComputedStyle(ot(this,G)).direction)}editAltText(rt){var ht;(ht=ot(this,P))==null||ht.editAltText(this,rt)}onPageChanging({pageNumber:rt}){Ht(this,g,rt-1)}focusMainContainer(){ot(this,G).focus()}findParent(rt,ht){for(const gt of ot(this,$).values()){const{x:bt,y:Pt,width:It,height:Nt}=gt.div.getBoundingClientRect();if(rt>=bt&&rt<=bt+It&&ht>=Pt&&ht<=Pt+Nt)return gt}return null}disableUserSelect(rt=!1){ot(this,K).classList.toggle("noUserSelect",rt)}addShouldRescale(rt){ot(this,q).add(rt)}removeShouldRescale(rt){ot(this,q).delete(rt)}onScaleChanging({scale:rt}){this.commitOrRemove(),this.viewParameters.realScale=rt*At.PixelsPerInch.PDF_TO_CSS_UNITS;for(const ht of ot(this,q))ht.onScaleChanging()}onRotationChanging({pagesRotation:rt}){this.commitOrRemove(),this.viewParameters.rotation=rt}addToAnnotationStorage(rt){!rt.isEmpty()&&ot(this,R)&&!ot(this,R).has(rt.id)&&ot(this,R).setValue(rt.id,rt)}blur(){if(!this.hasSelection)return;const{activeElement:rt}=document;for(const ht of ot(this,m))if(ht.div.contains(rt)){Ht(this,S,[ht,rt]),ht._focusEventsAllowed=!1;break}}focus(){if(!ot(this,S))return;const[rt,ht]=ot(this,S);Ht(this,S,null),ht.addEventListener("focusin",()=>{rt._focusEventsAllowed=!0},{once:!0}),ht.focus()}addEditListeners(){Lt(this,lt,wi).call(this),Lt(this,Et,Si).call(this)}removeEditListeners(){Lt(this,pt,An).call(this),Lt(this,xt,Ai).call(this)}copy(rt){var gt;if(rt.preventDefault(),(gt=ot(this,N))==null||gt.commitOrRemove(),!this.hasSelection)return;const ht=[];for(const bt of ot(this,m)){const Pt=bt.serialize(!0);Pt&&ht.push(Pt)}ht.length!==0&&rt.clipboardData.setData("application/pdfjs",JSON.stringify(ht))}cut(rt){this.copy(rt),this.delete()}paste(rt){rt.preventDefault();const{clipboardData:ht}=rt;for(const Pt of ht.items)for(const It of ot(this,D))if(It.isHandlingMimeForPasting(Pt.type)){It.paste(Pt,this.currentLayer);return}let gt=ht.getData("application/pdfjs");if(!gt)return;try{gt=JSON.parse(gt)}catch(Pt){(0,ft.warn)(`paste: "${Pt.message}".`);return}if(!Array.isArray(gt))return;this.unselectAll();const bt=this.currentLayer;try{const Pt=[];for(const Kt of gt){const Qt=bt.deserialize(Kt);if(!Qt)return;Pt.push(Qt)}const It=()=>{for(const Kt of Pt)Lt(this,Wt,xi).call(this,Kt);Lt(this,Bt,vi).call(this,Pt)},Nt=()=>{for(const Kt of Pt)Kt.remove()};this.addCommands({cmd:It,undo:Nt,mustExec:!0})}catch(Pt){(0,ft.warn)(`paste: "${Pt.message}".`)}}keydown(rt){var ht;(ht=this.getActive())!=null&&ht.shouldGetKeyboardEvents()||jt._keyboardManager.exec(this,rt)}onEditingAction(rt){["undo","redo","delete","selectAll"].includes(rt.name)&&this[rt.name]()}setEditingState(rt){rt?(Lt(this,et,sr).call(this),Lt(this,lt,wi).call(this),Lt(this,Et,Si).call(this),Lt(this,St,Me).call(this,{isEditing:ot(this,h)!==ft.AnnotationEditorType.NONE,isEmpty:Lt(this,re,on).call(this),hasSomethingToUndo:ot(this,o).hasSomethingToUndo(),hasSomethingToRedo:ot(this,o).hasSomethingToRedo(),hasSelectedEditor:!1})):(Lt(this,at,yi).call(this),Lt(this,pt,An).call(this),Lt(this,xt,Ai).call(this),Lt(this,St,Me).call(this,{isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(rt){if(!ot(this,D)){Ht(this,D,rt);for(const ht of ot(this,D))Lt(this,Ct,sn).call(this,ht.defaultPropertiesToUpdate)}}getId(){return ot(this,w).getId()}get currentLayer(){return ot(this,$).get(ot(this,g))}getLayer(rt){return ot(this,$).get(rt)}get currentPageIndex(){return ot(this,g)}addLayer(rt){ot(this,$).set(rt.pageIndex,rt),ot(this,s)?rt.enable():rt.disable()}removeLayer(rt){ot(this,$).delete(rt.pageIndex)}updateMode(rt,ht=null){if(ot(this,h)!==rt){if(Ht(this,h,rt),rt===ft.AnnotationEditorType.NONE){this.setEditingState(!1),Lt(this,Ut,cr).call(this);return}this.setEditingState(!0),Lt(this,Zt,or).call(this),this.unselectAll();for(const gt of ot(this,$).values())gt.updateMode(rt);if(ht){for(const gt of ot(this,U).values())if(gt.annotationElementId===ht){this.setSelected(gt),gt.enterInEditMode();break}}}}updateToolbar(rt){rt!==ot(this,h)&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:rt})}updateParams(rt,ht){if(ot(this,D)){if(rt===ft.AnnotationEditorParamsType.CREATE){this.currentLayer.addNewEditor(rt);return}for(const gt of ot(this,m))gt.updateParams(rt,ht);for(const gt of ot(this,D))gt.updateDefaultParams(rt,ht)}}enableWaiting(rt=!1){if(ot(this,c)!==rt){Ht(this,c,rt);for(const ht of ot(this,$).values())rt?ht.disableClick():ht.enableClick(),ht.div.classList.toggle("waiting",rt)}}getEditors(rt){const ht=[];for(const gt of ot(this,U).values())gt.pageIndex===rt&&ht.push(gt);return ht}getEditor(rt){return ot(this,U).get(rt)}addEditor(rt){ot(this,U).set(rt.id,rt)}removeEditor(rt){var ht;ot(this,U).delete(rt.id),this.unselect(rt),(!rt.annotationElementId||!ot(this,x).has(rt.annotationElementId))&&((ht=ot(this,R))==null||ht.remove(rt.id))}addDeletedAnnotationElement(rt){ot(this,x).add(rt.annotationElementId),rt.deleted=!0}isDeletedAnnotationElement(rt){return ot(this,x).has(rt)}removeDeletedAnnotationElement(rt){ot(this,x).delete(rt.annotationElementId),rt.deleted=!1}setActiveEditor(rt){ot(this,N)!==rt&&(Ht(this,N,rt),rt&&Lt(this,Ct,sn).call(this,rt.propertiesToUpdate))}toggleSelected(rt){if(ot(this,m).has(rt)){ot(this,m).delete(rt),rt.unselect(),Lt(this,St,Me).call(this,{hasSelectedEditor:this.hasSelection});return}ot(this,m).add(rt),rt.select(),Lt(this,Ct,sn).call(this,rt.propertiesToUpdate),Lt(this,St,Me).call(this,{hasSelectedEditor:!0})}setSelected(rt){for(const ht of ot(this,m))ht!==rt&&ht.unselect();ot(this,m).clear(),ot(this,m).add(rt),rt.select(),Lt(this,Ct,sn).call(this,rt.propertiesToUpdate),Lt(this,St,Me).call(this,{hasSelectedEditor:!0})}isSelected(rt){return ot(this,m).has(rt)}unselect(rt){rt.unselect(),ot(this,m).delete(rt),Lt(this,St,Me).call(this,{hasSelectedEditor:this.hasSelection})}get hasSelection(){return ot(this,m).size!==0}undo(){ot(this,o).undo(),Lt(this,St,Me).call(this,{hasSomethingToUndo:ot(this,o).hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:Lt(this,re,on).call(this)})}redo(){ot(this,o).redo(),Lt(this,St,Me).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:ot(this,o).hasSomethingToRedo(),isEmpty:Lt(this,re,on).call(this)})}addCommands(rt){ot(this,o).add(rt),Lt(this,St,Me).call(this,{hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:Lt(this,re,on).call(this)})}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const rt=[...ot(this,m)],ht=()=>{for(const bt of rt)bt.remove()},gt=()=>{for(const bt of rt)Lt(this,Wt,xi).call(this,bt)};this.addCommands({cmd:ht,undo:gt,mustExec:!0})}commitOrRemove(){var rt;(rt=ot(this,N))==null||rt.commitOrRemove()}hasSomethingToControl(){return ot(this,N)||this.hasSelection}selectAll(){for(const rt of ot(this,m))rt.commit();Lt(this,Bt,vi).call(this,ot(this,U).values())}unselectAll(){if(ot(this,N)){ot(this,N).commitOrRemove();return}if(this.hasSelection){for(const rt of ot(this,m))rt.unselect();ot(this,m).clear(),Lt(this,St,Me).call(this,{hasSelectedEditor:!1})}}translateSelectedEditors(rt,ht,gt=!1){if(gt||this.commitOrRemove(),!this.hasSelection)return;ot(this,z)[0]+=rt,ot(this,z)[1]+=ht;const[bt,Pt]=ot(this,z),It=[...ot(this,m)],Nt=1e3;ot(this,Y)&&clearTimeout(ot(this,Y)),Ht(this,Y,setTimeout(()=>{Ht(this,Y,null),ot(this,z)[0]=ot(this,z)[1]=0,this.addCommands({cmd:()=>{for(const Kt of It)ot(this,U).has(Kt.id)&&Kt.translateInPage(bt,Pt)},undo:()=>{for(const Kt of It)ot(this,U).has(Kt.id)&&Kt.translateInPage(-bt,-Pt)},mustExec:!1})},Nt));for(const Kt of It)Kt.translateInPage(rt,ht)}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),Ht(this,E,new Map);for(const rt of ot(this,m))ot(this,E).set(rt,{savedX:rt.x,savedY:rt.y,savedPageIndex:rt.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!ot(this,E))return!1;this.disableUserSelect(!1);const rt=ot(this,E);Ht(this,E,null);let ht=!1;for(const[{x:bt,y:Pt,pageIndex:It},Nt]of rt)Nt.newX=bt,Nt.newY=Pt,Nt.newPageIndex=It,ht||(ht=bt!==Nt.savedX||Pt!==Nt.savedY||It!==Nt.savedPageIndex);if(!ht)return!1;const gt=(bt,Pt,It,Nt)=>{if(ot(this,U).has(bt.id)){const Kt=ot(this,$).get(Nt);Kt?bt._setParentAndPosition(Kt,Pt,It):(bt.pageIndex=Nt,bt.x=Pt,bt.y=It)}};return this.addCommands({cmd:()=>{for(const[bt,{newX:Pt,newY:It,newPageIndex:Nt}]of rt)gt(bt,Pt,It,Nt)},undo:()=>{for(const[bt,{savedX:Pt,savedY:It,savedPageIndex:Nt}]of rt)gt(bt,Pt,It,Nt)},mustExec:!0}),!0}dragSelectedEditors(rt,ht){if(ot(this,E))for(const gt of ot(this,E).keys())gt.drag(rt,ht)}rebuild(rt){if(rt.parent===null){const ht=this.getLayer(rt.pageIndex);ht?(ht.changeParent(rt),ht.addOrRebuild(rt)):(this.addEditor(rt),this.addToAnnotationStorage(rt),rt.rebuild())}else rt.parent.addOrRebuild(rt)}isActive(rt){return ot(this,N)===rt}getActive(){return ot(this,N)}getMode(){return ot(this,h)}get imageManager(){return(0,ft.shadow)(this,"imageManager",new Z)}};N=new WeakMap,U=new WeakMap,$=new WeakMap,P=new WeakMap,R=new WeakMap,o=new WeakMap,g=new WeakMap,x=new WeakMap,E=new WeakMap,D=new WeakMap,q=new WeakMap,W=new WeakMap,w=new WeakMap,s=new WeakMap,c=new WeakMap,S=new WeakMap,h=new WeakMap,m=new WeakMap,k=new WeakMap,I=new WeakMap,B=new WeakMap,tt=new WeakMap,it=new WeakMap,st=new WeakMap,X=new WeakMap,J=new WeakMap,j=new WeakMap,O=new WeakMap,H=new WeakMap,V=new WeakMap,z=new WeakMap,Y=new WeakMap,G=new WeakMap,K=new WeakMap,et=new WeakSet,sr=function(){window.addEventListener("focus",ot(this,B)),window.addEventListener("blur",ot(this,I))},at=new WeakSet,yi=function(){window.removeEventListener("focus",ot(this,B)),window.removeEventListener("blur",ot(this,I))},lt=new WeakSet,wi=function(){window.addEventListener("keydown",ot(this,X),{capture:!0})},pt=new WeakSet,An=function(){window.removeEventListener("keydown",ot(this,X),{capture:!0})},Et=new WeakSet,Si=function(){document.addEventListener("copy",ot(this,tt)),document.addEventListener("cut",ot(this,it)),document.addEventListener("paste",ot(this,st))},xt=new WeakSet,Ai=function(){document.removeEventListener("copy",ot(this,tt)),document.removeEventListener("cut",ot(this,it)),document.removeEventListener("paste",ot(this,st))},St=new WeakSet,Me=function(rt){Object.entries(rt).some(([gt,bt])=>ot(this,V)[gt]!==bt)&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(ot(this,V),rt)})},Ct=new WeakSet,sn=function(rt){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:rt})},Zt=new WeakSet,or=function(){if(!ot(this,s)){Ht(this,s,!0);for(const rt of ot(this,$).values())rt.enable()}},Ut=new WeakSet,cr=function(){if(this.unselectAll(),ot(this,s)){Ht(this,s,!1);for(const rt of ot(this,$).values())rt.disable()}},Wt=new WeakSet,xi=function(rt){const ht=ot(this,$).get(rt.pageIndex);ht?ht.addOrRebuild(rt):this.addEditor(rt)},re=new WeakSet,on=function(){if(ot(this,U).size===0)return!0;if(ot(this,U).size===1)for(const rt of ot(this,U).values())return rt.isEmpty();return!1},Bt=new WeakSet,vi=function(rt){ot(this,m).clear();for(const ht of rt)ht.isEmpty()||(ot(this,m).add(ht),ht.select());Lt(this,St,Me).call(this,{hasSelectedEditor:!0})},ye(jt,"TRANSLATE_SMALL",1),ye(jt,"TRANSLATE_BIG",10);let t=jt;dt.AnnotationEditorUIManager=t},(Ot,dt,Mt)=>{var g,x,E,D,q,W,w,s,c,S,h,m,We,I,Ve,tt,Ci,st,xn,J,vn,O,cn,V,ln;Object.defineProperty(dt,"__esModule",{value:!0}),dt.StatTimer=dt.RenderingCancelledException=dt.PixelsPerInch=dt.PageViewport=dt.PDFDateString=dt.DOMStandardFontDataFactory=dt.DOMSVGFactory=dt.DOMFilterFactory=dt.DOMCanvasFactory=dt.DOMCMapReaderFactory=void 0,dt.deprecated=F,dt.getColorValues=U,dt.getCurrentTransform=$,dt.getCurrentTransformInverse=P,dt.getFilenameFromUrl=T,dt.getPdfFilenameFromUrl=d,dt.getRGB=N,dt.getXfaPageViewport=y,dt.isDataScheme=v,dt.isPdfFile=A,dt.isValidFetchUrl=C,dt.loadScript=b,dt.noContextMenu=p,dt.setLayerDimensions=R;var ft=Mt(7),At=Mt(1);const $t="http://www.w3.org/2000/svg",o=class o{};ye(o,"CSS",96),ye(o,"PDF",72),ye(o,"PDF_TO_CSS_UNITS",o.CSS/o.PDF);let vt=o;dt.PixelsPerInch=vt;class M extends ft.BaseFilterFactory{constructor({docId:K,ownerDocument:et=globalThis.document}={}){super();_t(this,m);_t(this,I);_t(this,tt);_t(this,st);_t(this,J);_t(this,O);_t(this,V);_t(this,g,void 0);_t(this,x,void 0);_t(this,E,void 0);_t(this,D,void 0);_t(this,q,void 0);_t(this,W,void 0);_t(this,w,void 0);_t(this,s,void 0);_t(this,c,void 0);_t(this,S,void 0);_t(this,h,0);Ht(this,E,K),Ht(this,D,et)}addFilter(K){if(!K)return"none";let et=ot(this,m,We).get(K);if(et)return et;let nt,at,Q,lt;if(K.length===1){const Et=K[0],Tt=new Array(256);for(let xt=0;xt<256;xt++)Tt[xt]=Et[xt]/255;lt=nt=at=Q=Tt.join(",")}else{const[Et,Tt,xt]=K,wt=new Array(256),St=new Array(256),Rt=new Array(256);for(let Ct=0;Ct<256;Ct++)wt[Ct]=Et[Ct]/255,St[Ct]=Tt[Ct]/255,Rt[Ct]=xt[Ct]/255;nt=wt.join(","),at=St.join(","),Q=Rt.join(","),lt=`${nt}${at}${Q}`}if(et=ot(this,m,We).get(lt),et)return ot(this,m,We).set(K,et),et;const ut=`g_${ot(this,E)}_transfer_map_${an(this,h)._++}`,pt=`url(#${ut})`;ot(this,m,We).set(K,pt),ot(this,m,We).set(lt,pt);const yt=Lt(this,st,xn).call(this,ut);return Lt(this,O,cn).call(this,nt,at,Q,yt),pt}addHCMFilter(K,et){var Tt;const nt=`${K}-${et}`;if(ot(this,W)===nt)return ot(this,w);if(Ht(this,W,nt),Ht(this,w,"none"),(Tt=ot(this,q))==null||Tt.remove(),!K||!et)return ot(this,w);const at=Lt(this,V,ln).call(this,K);K=At.Util.makeHexColor(...at);const Q=Lt(this,V,ln).call(this,et);if(et=At.Util.makeHexColor(...Q),ot(this,I,Ve).style.color="",K==="#000000"&&et==="#ffffff"||K===et)return ot(this,w);const lt=new Array(256);for(let xt=0;xt<=255;xt++){const wt=xt/255;lt[xt]=wt<=.03928?wt/12.92:((wt+.055)/1.055)**2.4}const ut=lt.join(","),pt=`g_${ot(this,E)}_hcm_filter`,yt=Ht(this,s,Lt(this,st,xn).call(this,pt));Lt(this,O,cn).call(this,ut,ut,ut,yt),Lt(this,tt,Ci).call(this,yt);const Et=(xt,wt)=>{const St=at[xt]/255,Rt=Q[xt]/255,Ct=new Array(wt+1);for(let Gt=0;Gt<=wt;Gt++)Ct[Gt]=St+Gt/wt*(Rt-St);return Ct.join(",")};return Lt(this,O,cn).call(this,Et(0,5),Et(1,5),Et(2,5),yt),Ht(this,w,`url(#${pt})`),ot(this,w)}addHighlightHCMFilter(K,et,nt,at){var Rt;const Q=`${K}-${et}-${nt}-${at}`;if(ot(this,c)===Q)return ot(this,S);if(Ht(this,c,Q),Ht(this,S,"none"),(Rt=ot(this,s))==null||Rt.remove(),!K||!et)return ot(this,S);const[lt,ut]=[K,et].map(Lt(this,V,ln).bind(this));let pt=Math.round(.2126*lt[0]+.7152*lt[1]+.0722*lt[2]),yt=Math.round(.2126*ut[0]+.7152*ut[1]+.0722*ut[2]),[Et,Tt]=[nt,at].map(Lt(this,V,ln).bind(this));yt{const Ft=new Array(256),Ut=(yt-pt)/Zt,Vt=Ct/255,Wt=(Gt-Ct)/(255*Zt);let Yt=0;for(let re=0;re<=Zt;re++){const Jt=Math.round(pt+re*Ut),Bt=Vt+re*Wt;for(let Xt=Yt;Xt<=Jt;Xt++)Ft[Xt]=Bt;Yt=Jt+1}for(let re=Yt;re<256;re++)Ft[re]=Ft[Yt-1];return Ft.join(",")},wt=`g_${ot(this,E)}_hcm_highlight_filter`,St=Ht(this,s,Lt(this,st,xn).call(this,wt));return Lt(this,tt,Ci).call(this,St),Lt(this,O,cn).call(this,xt(Et[0],Tt[0],5),xt(Et[1],Tt[1],5),xt(Et[2],Tt[2],5),St),Ht(this,S,`url(#${wt})`),ot(this,S)}destroy(K=!1){K&&(ot(this,w)||ot(this,S))||(ot(this,x)&&(ot(this,x).parentNode.parentNode.remove(),Ht(this,x,null)),ot(this,g)&&(ot(this,g).clear(),Ht(this,g,null)),Ht(this,h,0))}}g=new WeakMap,x=new WeakMap,E=new WeakMap,D=new WeakMap,q=new WeakMap,W=new WeakMap,w=new WeakMap,s=new WeakMap,c=new WeakMap,S=new WeakMap,h=new WeakMap,m=new WeakSet,We=function(){return ot(this,g)||Ht(this,g,new Map)},I=new WeakSet,Ve=function(){if(!ot(this,x)){const K=ot(this,D).createElement("div"),{style:et}=K;et.visibility="hidden",et.contain="strict",et.width=et.height=0,et.position="absolute",et.top=et.left=0,et.zIndex=-1;const nt=ot(this,D).createElementNS($t,"svg");nt.setAttribute("width",0),nt.setAttribute("height",0),Ht(this,x,ot(this,D).createElementNS($t,"defs")),K.append(nt),nt.append(ot(this,x)),ot(this,D).body.append(K)}return ot(this,x)},tt=new WeakSet,Ci=function(K){const et=ot(this,D).createElementNS($t,"feColorMatrix");et.setAttribute("type","matrix"),et.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),K.append(et)},st=new WeakSet,xn=function(K){const et=ot(this,D).createElementNS($t,"filter");return et.setAttribute("color-interpolation-filters","sRGB"),et.setAttribute("id",K),ot(this,I,Ve).append(et),et},J=new WeakSet,vn=function(K,et,nt){const at=ot(this,D).createElementNS($t,et);at.setAttribute("type","discrete"),at.setAttribute("tableValues",nt),K.append(at)},O=new WeakSet,cn=function(K,et,nt,at){const Q=ot(this,D).createElementNS($t,"feComponentTransfer");at.append(Q),Lt(this,J,vn).call(this,Q,"feFuncR",K),Lt(this,J,vn).call(this,Q,"feFuncG",et),Lt(this,J,vn).call(this,Q,"feFuncB",nt)},V=new WeakSet,ln=function(K){return ot(this,I,Ve).style.color=K,N(getComputedStyle(ot(this,I,Ve)).getPropertyValue("color"))},dt.DOMFilterFactory=M;class Z extends ft.BaseCanvasFactory{constructor({ownerDocument:G=globalThis.document}={}){super(),this._document=G}_createCanvas(G,K){const et=this._document.createElement("canvas");return et.width=G,et.height=K,et}}dt.DOMCanvasFactory=Z;async function n(Y,G=!1){if(C(Y,document.baseURI)){const K=await fetch(Y);if(!K.ok)throw new Error(K.statusText);return G?new Uint8Array(await K.arrayBuffer()):(0,At.stringToBytes)(await K.text())}return new Promise((K,et)=>{const nt=new XMLHttpRequest;nt.open("GET",Y,!0),G&&(nt.responseType="arraybuffer"),nt.onreadystatechange=()=>{if(nt.readyState===XMLHttpRequest.DONE){if(nt.status===200||nt.status===0){let at;if(G&&nt.response?at=new Uint8Array(nt.response):!G&&nt.responseText&&(at=(0,At.stringToBytes)(nt.responseText)),at){K(at);return}}et(new Error(nt.statusText))}},nt.send(null)})}class _ extends ft.BaseCMapReaderFactory{_fetchData(G,K){return n(G,this.isCompressed).then(et=>({cMapData:et,compressionType:K}))}}dt.DOMCMapReaderFactory=_;class L extends ft.BaseStandardFontDataFactory{_fetchData(G){return n(G,!0)}}dt.DOMStandardFontDataFactory=L;class t extends ft.BaseSVGFactory{_createSVG(G){return document.createElementNS($t,G)}}dt.DOMSVGFactory=t;class e{constructor({viewBox:G,scale:K,rotation:et,offsetX:nt=0,offsetY:at=0,dontFlip:Q=!1}){this.viewBox=G,this.scale=K,this.rotation=et,this.offsetX=nt,this.offsetY=at;const lt=(G[2]+G[0])/2,ut=(G[3]+G[1])/2;let pt,yt,Et,Tt;switch(et%=360,et<0&&(et+=360),et){case 180:pt=-1,yt=0,Et=0,Tt=1;break;case 90:pt=0,yt=1,Et=1,Tt=0;break;case 270:pt=0,yt=-1,Et=-1,Tt=0;break;case 0:pt=1,yt=0,Et=0,Tt=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}Q&&(Et=-Et,Tt=-Tt);let xt,wt,St,Rt;pt===0?(xt=Math.abs(ut-G[1])*K+nt,wt=Math.abs(lt-G[0])*K+at,St=(G[3]-G[1])*K,Rt=(G[2]-G[0])*K):(xt=Math.abs(lt-G[0])*K+nt,wt=Math.abs(ut-G[1])*K+at,St=(G[2]-G[0])*K,Rt=(G[3]-G[1])*K),this.transform=[pt*K,yt*K,Et*K,Tt*K,xt-pt*K*lt-Et*K*ut,wt-yt*K*lt-Tt*K*ut],this.width=St,this.height=Rt}get rawDims(){const{viewBox:G}=this;return(0,At.shadow)(this,"rawDims",{pageWidth:G[2]-G[0],pageHeight:G[3]-G[1],pageX:G[0],pageY:G[1]})}clone({scale:G=this.scale,rotation:K=this.rotation,offsetX:et=this.offsetX,offsetY:nt=this.offsetY,dontFlip:at=!1}={}){return new e({viewBox:this.viewBox.slice(),scale:G,rotation:K,offsetX:et,offsetY:nt,dontFlip:at})}convertToViewportPoint(G,K){return At.Util.applyTransform([G,K],this.transform)}convertToViewportRectangle(G){const K=At.Util.applyTransform([G[0],G[1]],this.transform),et=At.Util.applyTransform([G[2],G[3]],this.transform);return[K[0],K[1],et[0],et[1]]}convertToPdfPoint(G,K){return At.Util.applyInverseTransform([G,K],this.transform)}}dt.PageViewport=e;class a extends At.BaseException{constructor(G,K=0){super(G,"RenderingCancelledException"),this.extraDelay=K}}dt.RenderingCancelledException=a;function v(Y){const G=Y.length;let K=0;for(;K{const nt=document.createElement("script");nt.src=Y,nt.onload=function(at){G&&nt.remove(),K(at)},nt.onerror=function(){et(new Error(`Cannot load script at: ${nt.src}`))},(document.head||document.documentElement).append(nt)})}function F(Y){console.log("Deprecated API usage: "+Y)}let u;class l{static toDateObject(G){if(!G||typeof G!="string")return null;u||(u=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const K=u.exec(G);if(!K)return null;const et=parseInt(K[1],10);let nt=parseInt(K[2],10);nt=nt>=1&&nt<=12?nt-1:0;let at=parseInt(K[3],10);at=at>=1&&at<=31?at:1;let Q=parseInt(K[4],10);Q=Q>=0&&Q<=23?Q:0;let lt=parseInt(K[5],10);lt=lt>=0&<<=59?lt:0;let ut=parseInt(K[6],10);ut=ut>=0&&ut<=59?ut:0;const pt=K[7]||"Z";let yt=parseInt(K[8],10);yt=yt>=0&&yt<=23?yt:0;let Et=parseInt(K[9],10)||0;return Et=Et>=0&&Et<=59?Et:0,pt==="-"?(Q+=yt,lt+=Et):pt==="+"&&(Q-=yt,lt-=Et),new Date(Date.UTC(et,nt,at,Q,lt,ut))}}dt.PDFDateString=l;function y(Y,{scale:G=1,rotation:K=0}){const{width:et,height:nt}=Y.attributes.style,at=[0,0,parseInt(et),parseInt(nt)];return new e({viewBox:at,scale:G,rotation:K})}function N(Y){if(Y.startsWith("#")){const G=parseInt(Y.slice(1),16);return[(G&16711680)>>16,(G&65280)>>8,G&255]}return Y.startsWith("rgb(")?Y.slice(4,-1).split(",").map(G=>parseInt(G)):Y.startsWith("rgba(")?Y.slice(5,-1).split(",").map(G=>parseInt(G)).slice(0,3):((0,At.warn)(`Not a valid color format: "${Y}"`),[0,0,0])}function U(Y){const G=document.createElement("span");G.style.visibility="hidden",document.body.append(G);for(const K of Y.keys()){G.style.color=K;const et=window.getComputedStyle(G).color;Y.set(K,N(et))}G.remove()}function $(Y){const{a:G,b:K,c:et,d:nt,e:at,f:Q}=Y.getTransform();return[G,K,et,nt,at,Q]}function P(Y){const{a:G,b:K,c:et,d:nt,e:at,f:Q}=Y.getTransform().invertSelf();return[G,K,et,nt,at,Q]}function R(Y,G,K=!1,et=!0){if(G instanceof e){const{pageWidth:nt,pageHeight:at}=G.rawDims,{style:Q}=Y,lt=At.FeatureTest.isCSSRoundSupported,ut=`var(--scale-factor) * ${nt}px`,pt=`var(--scale-factor) * ${at}px`,yt=lt?`round(${ut}, 1px)`:`calc(${ut})`,Et=lt?`round(${pt}, 1px)`:`calc(${pt})`;!K||G.rotation%180===0?(Q.width=yt,Q.height=Et):(Q.width=Et,Q.height=yt)}et&&Y.setAttribute("data-main-rotation",G.rotation)}},(Ot,dt,Mt)=>{Object.defineProperty(dt,"__esModule",{value:!0}),dt.BaseStandardFontDataFactory=dt.BaseSVGFactory=dt.BaseFilterFactory=dt.BaseCanvasFactory=dt.BaseCMapReaderFactory=void 0;var ft=Mt(1);class At{constructor(){this.constructor===At&&(0,ft.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(_){return"none"}addHCMFilter(_,L){return"none"}addHighlightHCMFilter(_,L,t,e){return"none"}destroy(_=!1){}}dt.BaseFilterFactory=At;class $t{constructor(){this.constructor===$t&&(0,ft.unreachable)("Cannot initialize BaseCanvasFactory.")}create(_,L){if(_<=0||L<=0)throw new Error("Invalid canvas size");const t=this._createCanvas(_,L);return{canvas:t,context:t.getContext("2d")}}reset(_,L,t){if(!_.canvas)throw new Error("Canvas is not specified");if(L<=0||t<=0)throw new Error("Invalid canvas size");_.canvas.width=L,_.canvas.height=t}destroy(_){if(!_.canvas)throw new Error("Canvas is not specified");_.canvas.width=0,_.canvas.height=0,_.canvas=null,_.context=null}_createCanvas(_,L){(0,ft.unreachable)("Abstract method `_createCanvas` called.")}}dt.BaseCanvasFactory=$t;class vt{constructor({baseUrl:_=null,isCompressed:L=!0}){this.constructor===vt&&(0,ft.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=_,this.isCompressed=L}async fetch({name:_}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!_)throw new Error("CMap name must be specified.");const L=this.baseUrl+_+(this.isCompressed?".bcmap":""),t=this.isCompressed?ft.CMapCompressionType.BINARY:ft.CMapCompressionType.NONE;return this._fetchData(L,t).catch(e=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${L}`)})}_fetchData(_,L){(0,ft.unreachable)("Abstract method `_fetchData` called.")}}dt.BaseCMapReaderFactory=vt;class M{constructor({baseUrl:_=null}){this.constructor===M&&(0,ft.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=_}async fetch({filename:_}){if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!_)throw new Error("Font filename must be specified.");const L=`${this.baseUrl}${_}`;return this._fetchData(L).catch(t=>{throw new Error(`Unable to load font data at: ${L}`)})}_fetchData(_){(0,ft.unreachable)("Abstract method `_fetchData` called.")}}dt.BaseStandardFontDataFactory=M;class Z{constructor(){this.constructor===Z&&(0,ft.unreachable)("Cannot initialize BaseSVGFactory.")}create(_,L,t=!1){if(_<=0||L<=0)throw new Error("Invalid SVG dimensions");const e=this._createSVG("svg:svg");return e.setAttribute("version","1.1"),t||(e.setAttribute("width",`${_}px`),e.setAttribute("height",`${L}px`)),e.setAttribute("preserveAspectRatio","none"),e.setAttribute("viewBox",`0 0 ${_} ${L}`),e}createElement(_){if(typeof _!="string")throw new Error("Invalid SVG element type");return this._createSVG(_)}_createSVG(_){(0,ft.unreachable)("Abstract method `_createSVG` called.")}}dt.BaseSVGFactory=Z},(Ot,dt,Mt)=>{Object.defineProperty(dt,"__esModule",{value:!0}),dt.MurmurHash3_64=void 0;var ft=Mt(1);const At=3285377520,$t=4294901760,vt=65535;class M{constructor(n){this.h1=n?n&4294967295:At,this.h2=n?n&4294967295:At}update(n){let _,L;if(typeof n=="string"){_=new Uint8Array(n.length*2),L=0;for(let F=0,u=n.length;F>>8,_[L++]=l&255)}}else if((0,ft.isArrayBuffer)(n))_=n.slice(),L=_.byteLength;else throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");const t=L>>2,e=L-t*4,a=new Uint32Array(_.buffer,0,t);let v=0,A=0,T=this.h1,d=this.h2;const i=3432918353,C=461845907,p=i&vt,b=C&vt;for(let F=0;F>>17,v=v*C&$t|v*b&vt,T^=v,T=T<<13|T>>>19,T=T*5+3864292196):(A=a[F],A=A*i&$t|A*p&vt,A=A<<15|A>>>17,A=A*C&$t|A*b&vt,d^=A,d=d<<13|d>>>19,d=d*5+3864292196);switch(v=0,e){case 3:v^=_[t*4+2]<<16;case 2:v^=_[t*4+1]<<8;case 1:v^=_[t*4],v=v*i&$t|v*p&vt,v=v<<15|v>>>17,v=v*C&$t|v*b&vt,t&1?T^=v:d^=v}this.h1=T,this.h2=d}hexdigest(){let n=this.h1,_=this.h2;return n^=_>>>1,n=n*3981806797&$t|n*36045&vt,_=_*4283543511&$t|((_<<16|n>>>16)*2950163797&$t)>>>16,n^=_>>>1,n=n*444984403&$t|n*60499&vt,_=_*3301882366&$t|((_<<16|n>>>16)*3120437893&$t)>>>16,n^=_>>>1,(n>>>0).toString(16).padStart(8,"0")+(_>>>0).toString(16).padStart(8,"0")}}dt.MurmurHash3_64=M},(Ot,dt,Mt)=>{var vt;Object.defineProperty(dt,"__esModule",{value:!0}),dt.FontLoader=dt.FontFaceObject=void 0;var ft=Mt(1);class At{constructor({ownerDocument:Z=globalThis.document,styleElement:n=null}){_t(this,vt,new Set);this._document=Z,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(Z){this.nativeFontFaces.add(Z),this._document.fonts.add(Z)}removeNativeFontFace(Z){this.nativeFontFaces.delete(Z),this._document.fonts.delete(Z)}insertRule(Z){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const n=this.styleElement.sheet;n.insertRule(Z,n.cssRules.length)}clear(){for(const Z of this.nativeFontFaces)this._document.fonts.delete(Z);this.nativeFontFaces.clear(),ot(this,vt).clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(Z){if(!(!Z||ot(this,vt).has(Z.loadedName))){if((0,ft.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName:n,src:_,style:L}=Z,t=new FontFace(n,_,L);this.addNativeFontFace(t);try{await t.load(),ot(this,vt).add(n)}catch{(0,ft.warn)(`Cannot load system font: ${Z.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(t)}return}(0,ft.unreachable)("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(Z){if(Z.attached||Z.missingFile&&!Z.systemFontInfo)return;if(Z.attached=!0,Z.systemFontInfo){await this.loadSystemFont(Z.systemFontInfo);return}if(this.isFontLoadingAPISupported){const _=Z.createNativeFontFace();if(_){this.addNativeFontFace(_);try{await _.loaded}catch(L){throw(0,ft.warn)(`Failed to load font '${_.family}': '${L}'.`),Z.disableFontFace=!0,L}}return}const n=Z.createFontFaceRule();if(n){if(this.insertRule(n),this.isSyncFontLoadingSupported)return;await new Promise(_=>{const L=this._queueLoadingCallback(_);this._prepareFontLoadEvent(Z,L)})}}get isFontLoadingAPISupported(){var n;const Z=!!((n=this._document)!=null&&n.fonts);return(0,ft.shadow)(this,"isFontLoadingAPISupported",Z)}get isSyncFontLoadingSupported(){let Z=!1;return(ft.isNodeJS||typeof navigator<"u"&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(Z=!0),(0,ft.shadow)(this,"isSyncFontLoadingSupported",Z)}_queueLoadingCallback(Z){function n(){for((0,ft.assert)(!L.done,"completeRequest() cannot be called twice."),L.done=!0;_.length>0&&_[0].done;){const t=_.shift();setTimeout(t.callback,0)}}const{loadingRequests:_}=this,L={done:!1,complete:n,callback:Z};return _.push(L),L}get _loadTestFont(){const Z=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,ft.shadow)(this,"_loadTestFont",Z)}_prepareFontLoadEvent(Z,n){function _(N,U){return N.charCodeAt(U)<<24|N.charCodeAt(U+1)<<16|N.charCodeAt(U+2)<<8|N.charCodeAt(U+3)&255}function L(N,U,$,P){const R=N.substring(0,U),o=N.substring(U+$);return R+P+o}let t,e;const a=this._document.createElement("canvas");a.width=1,a.height=1;const v=a.getContext("2d");let A=0;function T(N,U){if(++A>30){(0,ft.warn)("Load test font never loaded."),U();return}if(v.font="30px "+N,v.fillText(".",0,20),v.getImageData(0,0,1,1).data[3]>0){U();return}setTimeout(T.bind(null,N,U))}const d=`lt${Date.now()}${this.loadTestFontId++}`;let i=this._loadTestFont;i=L(i,976,d.length,d);const p=16,b=1482184792;let F=_(i,p);for(t=0,e=d.length-3;t{y.remove(),n.complete()})}}vt=new WeakMap,dt.FontLoader=At;class $t{constructor(Z,{isEvalSupported:n=!0,disableFontFace:_=!1,ignoreErrors:L=!1,inspectFont:t=null}){this.compiledGlyphs=Object.create(null);for(const e in Z)this[e]=Z[e];this.isEvalSupported=n!==!1,this.disableFontFace=_===!0,this.ignoreErrors=L===!0,this._inspectFont=t}createNativeFontFace(){var n;if(!this.data||this.disableFontFace)return null;let Z;if(!this.cssFontInfo)Z=new FontFace(this.loadedName,this.data,{});else{const _={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(_.style=`oblique ${this.cssFontInfo.italicAngle}deg`),Z=new FontFace(this.cssFontInfo.fontFamily,this.data,_)}return(n=this._inspectFont)==null||n.call(this,this),Z}createFontFaceRule(){var L;if(!this.data||this.disableFontFace)return null;const Z=(0,ft.bytesToString)(this.data),n=`url(data:${this.mimetype};base64,${btoa(Z)});`;let _;if(!this.cssFontInfo)_=`@font-face {font-family:"${this.loadedName}";src:${n}}`;else{let t=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(t+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),_=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${t}src:${n}}`}return(L=this._inspectFont)==null||L.call(this,this,n),_}getPathGenerator(Z,n){if(this.compiledGlyphs[n]!==void 0)return this.compiledGlyphs[n];let _;try{_=Z.get(this.loadedName+"_path_"+n)}catch(L){if(!this.ignoreErrors)throw L;return(0,ft.warn)(`getPathGenerator - ignoring character: "${L}".`),this.compiledGlyphs[n]=function(t,e){}}if(this.isEvalSupported&&ft.FeatureTest.isEvalSupported){const L=[];for(const t of _){const e=t.args!==void 0?t.args.join(","):"";L.push("c.",t.cmd,"(",e,`); `)}return this.compiledGlyphs[n]=new Function("c","size",L.join(""))}return this.compiledGlyphs[n]=function(L,t){for(const e of _)e.cmd==="scale"&&(e.args=[t,-t]),L[e.cmd].apply(L,e.args)}}}dt.FontFaceObject=$t},(Ot,dt,Mt)=>{Object.defineProperty(dt,"__esModule",{value:!0}),dt.NodeStandardFontDataFactory=dt.NodeFilterFactory=dt.NodeCanvasFactory=dt.NodeCMapReaderFactory=void 0;var ft=Mt(7);Mt(1);const At=function(n){return new Promise((_,L)=>{require$$5.readFile(n,(e,a)=>{if(e||!a){L(new Error(e));return}_(new Uint8Array(a))})})};class $t extends ft.BaseFilterFactory{}dt.NodeFilterFactory=$t;class vt extends ft.BaseCanvasFactory{_createCanvas(_,L){return require$$5.createCanvas(_,L)}}dt.NodeCanvasFactory=vt;class M extends ft.BaseCMapReaderFactory{_fetchData(_,L){return At(_).then(t=>({cMapData:t,compressionType:L}))}}dt.NodeCMapReaderFactory=M;class Z extends ft.BaseStandardFontDataFactory{_fetchData(_){return At(_)}}dt.NodeStandardFontDataFactory=Z},(Ot,dt,Mt)=>{var x,ki,D,Ti;Object.defineProperty(dt,"__esModule",{value:!0}),dt.CanvasGraphics=void 0;var ft=Mt(1),At=Mt(6),$t=Mt(12),vt=Mt(13);const M=16,Z=100,n=4096,_=15,L=10,t=1e3,e=16;function a(w,s){if(w._removeMirroring)throw new Error("Context is already forwarding operations.");w.__originalSave=w.save,w.__originalRestore=w.restore,w.__originalRotate=w.rotate,w.__originalScale=w.scale,w.__originalTranslate=w.translate,w.__originalTransform=w.transform,w.__originalSetTransform=w.setTransform,w.__originalResetTransform=w.resetTransform,w.__originalClip=w.clip,w.__originalMoveTo=w.moveTo,w.__originalLineTo=w.lineTo,w.__originalBezierCurveTo=w.bezierCurveTo,w.__originalRect=w.rect,w.__originalClosePath=w.closePath,w.__originalBeginPath=w.beginPath,w._removeMirroring=()=>{w.save=w.__originalSave,w.restore=w.__originalRestore,w.rotate=w.__originalRotate,w.scale=w.__originalScale,w.translate=w.__originalTranslate,w.transform=w.__originalTransform,w.setTransform=w.__originalSetTransform,w.resetTransform=w.__originalResetTransform,w.clip=w.__originalClip,w.moveTo=w.__originalMoveTo,w.lineTo=w.__originalLineTo,w.bezierCurveTo=w.__originalBezierCurveTo,w.rect=w.__originalRect,w.closePath=w.__originalClosePath,w.beginPath=w.__originalBeginPath,delete w._removeMirroring},w.save=function(){s.save(),this.__originalSave()},w.restore=function(){s.restore(),this.__originalRestore()},w.translate=function(S,h){s.translate(S,h),this.__originalTranslate(S,h)},w.scale=function(S,h){s.scale(S,h),this.__originalScale(S,h)},w.transform=function(S,h,m,k,I,B){s.transform(S,h,m,k,I,B),this.__originalTransform(S,h,m,k,I,B)},w.setTransform=function(S,h,m,k,I,B){s.setTransform(S,h,m,k,I,B),this.__originalSetTransform(S,h,m,k,I,B)},w.resetTransform=function(){s.resetTransform(),this.__originalResetTransform()},w.rotate=function(S){s.rotate(S),this.__originalRotate(S)},w.clip=function(S){s.clip(S),this.__originalClip(S)},w.moveTo=function(c,S){s.moveTo(c,S),this.__originalMoveTo(c,S)},w.lineTo=function(c,S){s.lineTo(c,S),this.__originalLineTo(c,S)},w.bezierCurveTo=function(c,S,h,m,k,I){s.bezierCurveTo(c,S,h,m,k,I),this.__originalBezierCurveTo(c,S,h,m,k,I)},w.rect=function(c,S,h,m){s.rect(c,S,h,m),this.__originalRect(c,S,h,m)},w.closePath=function(){s.closePath(),this.__originalClosePath()},w.beginPath=function(){s.beginPath(),this.__originalBeginPath()}}class v{constructor(s){this.canvasFactory=s,this.cache=Object.create(null)}getCanvas(s,c,S){let h;return this.cache[s]!==void 0?(h=this.cache[s],this.canvasFactory.reset(h,c,S)):(h=this.canvasFactory.create(c,S),this.cache[s]=h),h}delete(s){delete this.cache[s]}clear(){for(const s in this.cache){const c=this.cache[s];this.canvasFactory.destroy(c),delete this.cache[s]}}}function A(w,s,c,S,h,m,k,I,B,tt){const[it,st,X,J,j,O]=(0,At.getCurrentTransform)(w);if(st===0&&X===0){const z=k*it+j,Y=Math.round(z),G=I*J+O,K=Math.round(G),et=(k+B)*it+j,nt=Math.abs(Math.round(et)-Y)||1,at=(I+tt)*J+O,Q=Math.abs(Math.round(at)-K)||1;return w.setTransform(Math.sign(it),0,0,Math.sign(J),Y,K),w.drawImage(s,c,S,h,m,0,0,nt,Q),w.setTransform(it,st,X,J,j,O),[nt,Q]}if(it===0&&J===0){const z=I*X+j,Y=Math.round(z),G=k*st+O,K=Math.round(G),et=(I+tt)*X+j,nt=Math.abs(Math.round(et)-Y)||1,at=(k+B)*st+O,Q=Math.abs(Math.round(at)-K)||1;return w.setTransform(0,Math.sign(st),Math.sign(X),0,Y,K),w.drawImage(s,c,S,h,m,0,0,Q,nt),w.setTransform(it,st,X,J,j,O),[Q,nt]}w.drawImage(s,c,S,h,m,k,I,B,tt);const H=Math.hypot(it,st),V=Math.hypot(X,J);return[H*B,V*tt]}function T(w){const{width:s,height:c}=w;if(s>t||c>t)return null;const S=1e3,h=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),m=s+1;let k=new Uint8Array(m*(c+1)),I,B,tt;const it=s+7&-8;let st=new Uint8Array(it*c),X=0;for(const V of w.data){let z=128;for(;z>0;)st[X++]=V&z?0:255,z>>=1}let J=0;for(X=0,st[X]!==0&&(k[0]=1,++J),B=1;B>2)+(st[X+1]?4:0)+(st[X-it+1]?8:0),h[V]&&(k[tt+B]=h[V],++J),X++;if(st[X-it]!==st[X]&&(k[tt+B]=st[X]?2:4,++J),J>S)return null}for(X=it*(c-1),tt=I*m,st[X]!==0&&(k[tt]=8,++J),B=1;BS)return null;const j=new Int32Array([0,m,-1,0,-m,0,0,0,1]),O=new Path2D;for(I=0;J&&I<=c;I++){let V=I*m;const z=V+s;for(;V>4,k[V]&=G>>2|G<<2),O.lineTo(V%m,V/m|0),k[V]||--J}while(Y!==V);--I}return st=null,k=null,function(V){V.save(),V.scale(1/s,-1/c),V.translate(0,-c),V.fill(O),V.beginPath(),V.restore()}}class d{constructor(s,c){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=ft.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=ft.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=ft.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,s,c])}clone(){const s=Object.create(this);return s.clipBox=this.clipBox.slice(),s}setCurrentPoint(s,c){this.x=s,this.y=c}updatePathMinMax(s,c,S){[c,S]=ft.Util.applyTransform([c,S],s),this.minX=Math.min(this.minX,c),this.minY=Math.min(this.minY,S),this.maxX=Math.max(this.maxX,c),this.maxY=Math.max(this.maxY,S)}updateRectMinMax(s,c){const S=ft.Util.applyTransform(c,s),h=ft.Util.applyTransform(c.slice(2),s);this.minX=Math.min(this.minX,S[0],h[0]),this.minY=Math.min(this.minY,S[1],h[1]),this.maxX=Math.max(this.maxX,S[0],h[0]),this.maxY=Math.max(this.maxY,S[1],h[1])}updateScalingPathMinMax(s,c){ft.Util.scaleMinMax(s,c),this.minX=Math.min(this.minX,c[0]),this.maxX=Math.max(this.maxX,c[1]),this.minY=Math.min(this.minY,c[2]),this.maxY=Math.max(this.maxY,c[3])}updateCurvePathMinMax(s,c,S,h,m,k,I,B,tt,it){const st=ft.Util.bezierBoundingBox(c,S,h,m,k,I,B,tt);if(it){it[0]=Math.min(it[0],st[0],st[2]),it[1]=Math.max(it[1],st[0],st[2]),it[2]=Math.min(it[2],st[1],st[3]),it[3]=Math.max(it[3],st[1],st[3]);return}this.updateRectMinMax(s,st)}getPathBoundingBox(s=$t.PathType.FILL,c=null){const S=[this.minX,this.minY,this.maxX,this.maxY];if(s===$t.PathType.STROKE){c||(0,ft.unreachable)("Stroke bounding box must include transform.");const h=ft.Util.singularValueDecompose2dScale(c),m=h[0]*this.lineWidth/2,k=h[1]*this.lineWidth/2;S[0]-=m,S[1]-=k,S[2]+=m,S[3]+=k}return S}updateClipFromPath(){const s=ft.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(s||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(s){this.clipBox=s,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(s=$t.PathType.FILL,c=null){return ft.Util.intersect(this.clipBox,this.getPathBoundingBox(s,c))}}function i(w,s){if(typeof ImageData<"u"&&s instanceof ImageData){w.putImageData(s,0,0);return}const c=s.height,S=s.width,h=c%e,m=(c-h)/e,k=h===0?m:m+1,I=w.createImageData(S,e);let B=0,tt;const it=s.data,st=I.data;let X,J,j,O;if(s.kind===ft.ImageKind.GRAYSCALE_1BPP){const H=it.byteLength,V=new Uint32Array(st.buffer,0,st.byteLength>>2),z=V.length,Y=S+7>>3,G=4294967295,K=ft.FeatureTest.isLittleEndian?4278190080:255;for(X=0;XY?S:et*8-7,Q=at&-8;let lt=0,ut=0;for(;nt>=1}for(;tt=m&&(j=h,O=S*j),tt=0,J=O;J--;)st[tt++]=it[B++],st[tt++]=it[B++],st[tt++]=it[B++],st[tt++]=255;w.putImageData(I,0,X*e)}else throw new Error(`bad image kind: ${s.kind}`)}function C(w,s){if(s.bitmap){w.drawImage(s.bitmap,0,0);return}const c=s.height,S=s.width,h=c%e,m=(c-h)/e,k=h===0?m:m+1,I=w.createImageData(S,e);let B=0;const tt=s.data,it=I.data;for(let st=0;st>8,w[m-2]=w[m-2]*k+c*I>>8,w[m-1]=w[m-1]*k+S*I>>8}}}function u(w,s,c){const S=w.length,h=1/255;for(let m=3;m>8]>>8:s[h]*m>>16}}function y(w,s,c,S,h,m,k,I,B,tt,it){const st=!!m,X=st?m[0]:0,J=st?m[1]:0,j=st?m[2]:0,O=h==="Luminosity"?l:u,V=Math.min(S,Math.ceil(1048576/c));for(let z=0;zL&&typeof S=="function",it=tt?Date.now()+_:0;let st=0;const X=this.commonObjs,J=this.objs;let j;for(;;){if(h!==void 0&&I===h.nextBreakPoint)return h.breakIt(I,S),I;if(j=k[I],j!==ft.OPS.dependency)this[j].apply(this,m[I]);else for(const O of m[I]){const H=O.startsWith("g_")?X:J;if(!H.has(O))return H.get(O,S),I}if(I++,I===B)return I;if(tt&&++st>L){if(Date.now()>it)return S(),I;st=0}}}endDrawing(){Lt(this,x,ki).call(this),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const s of this._cachedBitmapsMap.values()){for(const c of s.values())typeof HTMLCanvasElement<"u"&&c instanceof HTMLCanvasElement&&(c.width=c.height=0);s.clear()}this._cachedBitmapsMap.clear(),Lt(this,D,Ti).call(this)}_scaleImage(s,c){const S=s.width,h=s.height;let m=Math.max(Math.hypot(c[0],c[1]),1),k=Math.max(Math.hypot(c[2],c[3]),1),I=S,B=h,tt="prescale1",it,st;for(;m>2&&I>1||k>2&&B>1;){let X=I,J=B;m>2&&I>1&&(X=I>=16384?Math.floor(I/2)-1||1:Math.ceil(I/2),m/=I/X),k>2&&B>1&&(J=B>=16384?Math.floor(B/2)-1||1:Math.ceil(B)/2,k/=B/J),it=this.cachedCanvases.getCanvas(tt,X,J),st=it.context,st.clearRect(0,0,X,J),st.drawImage(s,0,0,I,B,0,0,X,J),s=it.canvas,I=X,B=J,tt=tt==="prescale1"?"prescale2":"prescale1"}return{img:s,paintWidth:I,paintHeight:B}}_createMaskCanvas(s){const c=this.ctx,{width:S,height:h}=s,m=this.current.fillColor,k=this.current.patternFill,I=(0,At.getCurrentTransform)(c);let B,tt,it,st;if((s.bitmap||s.data)&&s.count>1){const nt=s.bitmap||s.data.buffer;tt=JSON.stringify(k?I:[I.slice(0,4),m]),B=this._cachedBitmapsMap.get(nt),B||(B=new Map,this._cachedBitmapsMap.set(nt,B));const at=B.get(tt);if(at&&!k){const Q=Math.round(Math.min(I[0],I[2])+I[4]),lt=Math.round(Math.min(I[1],I[3])+I[5]);return{canvas:at,offsetX:Q,offsetY:lt}}it=at}it||(st=this.cachedCanvases.getCanvas("maskCanvas",S,h),C(st.context,s));let X=ft.Util.transform(I,[1/S,0,0,-1/h,0,0]);X=ft.Util.transform(X,[1,0,0,1,0,-h]);const J=ft.Util.applyTransform([0,0],X),j=ft.Util.applyTransform([S,h],X),O=ft.Util.normalizeRect([J[0],J[1],j[0],j[1]]),H=Math.round(O[2]-O[0])||1,V=Math.round(O[3]-O[1])||1,z=this.cachedCanvases.getCanvas("fillCanvas",H,V),Y=z.context,G=Math.min(J[0],j[0]),K=Math.min(J[1],j[1]);Y.translate(-G,-K),Y.transform(...X),it||(it=this._scaleImage(st.canvas,(0,At.getCurrentTransformInverse)(Y)),it=it.img,B&&k&&B.set(tt,it)),Y.imageSmoothingEnabled=U((0,At.getCurrentTransform)(Y),s.interpolate),A(Y,it,0,0,it.width,it.height,0,0,S,h),Y.globalCompositeOperation="source-in";const et=ft.Util.transform((0,At.getCurrentTransformInverse)(Y),[1,0,0,1,-G,-K]);return Y.fillStyle=k?m.getPattern(c,this,et,$t.PathType.FILL):m,Y.fillRect(0,0,S,h),B&&!k&&(this.cachedCanvases.delete("fillCanvas"),B.set(tt,z.canvas)),{canvas:z.canvas,offsetX:Math.round(G),offsetY:Math.round(K)}}setLineWidth(s){s!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=s,this.ctx.lineWidth=s}setLineCap(s){this.ctx.lineCap=$[s]}setLineJoin(s){this.ctx.lineJoin=P[s]}setMiterLimit(s){this.ctx.miterLimit=s}setDash(s,c){const S=this.ctx;S.setLineDash!==void 0&&(S.setLineDash(s),S.lineDashOffset=c)}setRenderingIntent(s){}setFlatness(s){}setGState(s){for(const[c,S]of s)switch(c){case"LW":this.setLineWidth(S);break;case"LC":this.setLineCap(S);break;case"LJ":this.setLineJoin(S);break;case"ML":this.setMiterLimit(S);break;case"D":this.setDash(S[0],S[1]);break;case"RI":this.setRenderingIntent(S);break;case"FL":this.setFlatness(S);break;case"Font":this.setFont(S[0],S[1]);break;case"CA":this.current.strokeAlpha=S;break;case"ca":this.current.fillAlpha=S,this.ctx.globalAlpha=S;break;case"BM":this.ctx.globalCompositeOperation=S;break;case"SMask":this.current.activeSMask=S?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(S);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const s=this.inSMaskMode;this.current.activeSMask&&!s?this.beginSMaskMode():!this.current.activeSMask&&s&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const s=this.ctx.canvas.width,c=this.ctx.canvas.height,S="smaskGroupAt"+this.groupLevel,h=this.cachedCanvases.getCanvas(S,s,c);this.suspendedCtx=this.ctx,this.ctx=h.context;const m=this.ctx;m.setTransform(...(0,At.getCurrentTransform)(this.suspendedCtx)),p(this.suspendedCtx,m),a(m,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),p(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(s){if(!this.current.activeSMask)return;s?(s[0]=Math.floor(s[0]),s[1]=Math.floor(s[1]),s[2]=Math.ceil(s[2]),s[3]=Math.ceil(s[3])):s=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const c=this.current.activeSMask,S=this.suspendedCtx;N(S,c,this.ctx,s),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}save(){this.inSMaskMode?(p(this.ctx,this.suspendedCtx),this.suspendedCtx.save()):this.ctx.save();const s=this.current;this.stateStack.push(s),this.current=s.clone()}restore(){this.stateStack.length===0&&this.inSMaskMode&&this.endSMaskMode(),this.stateStack.length!==0&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),p(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(s,c,S,h,m,k){this.ctx.transform(s,c,S,h,m,k),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(s,c,S){const h=this.ctx,m=this.current;let k=m.x,I=m.y,B,tt;const it=(0,At.getCurrentTransform)(h),st=it[0]===0&&it[3]===0||it[1]===0&&it[2]===0,X=st?S.slice(0):null;for(let J=0,j=0,O=s.length;JZ&&(tt=Z),this.current.fontSizeScale=c/tt,this.ctx.font=`${B} ${I} ${tt}px ${k}`}setTextRenderingMode(s){this.current.textRenderingMode=s}setTextRise(s){this.current.textRise=s}moveText(s,c){this.current.x=this.current.lineX+=s,this.current.y=this.current.lineY+=c}setLeadingMoveText(s,c){this.setLeading(-c),this.moveText(s,c)}setTextMatrix(s,c,S,h,m,k){this.current.textMatrix=[s,c,S,h,m,k],this.current.textMatrixScale=Math.hypot(s,c),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(s,c,S,h){const m=this.ctx,k=this.current,I=k.font,B=k.textRenderingMode,tt=k.fontSize/k.fontSizeScale,it=B&ft.TextRenderingMode.FILL_STROKE_MASK,st=!!(B&ft.TextRenderingMode.ADD_TO_PATH_FLAG),X=k.patternFill&&!I.missingFile;let J;(I.disableFontFace||st||X)&&(J=I.getPathGenerator(this.commonObjs,s)),I.disableFontFace||X?(m.save(),m.translate(c,S),m.beginPath(),J(m,tt),h&&m.setTransform(...h),(it===ft.TextRenderingMode.FILL||it===ft.TextRenderingMode.FILL_STROKE)&&m.fill(),(it===ft.TextRenderingMode.STROKE||it===ft.TextRenderingMode.FILL_STROKE)&&m.stroke(),m.restore()):((it===ft.TextRenderingMode.FILL||it===ft.TextRenderingMode.FILL_STROKE)&&m.fillText(s,c,S),(it===ft.TextRenderingMode.STROKE||it===ft.TextRenderingMode.FILL_STROKE)&&m.strokeText(s,c,S)),st&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,At.getCurrentTransform)(m),x:c,y:S,fontSize:tt,addToPath:J})}get isFontSubpixelAAEnabled(){const{context:s}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);s.scale(1.5,1),s.fillText("I",0,10);const c=s.getImageData(0,0,10,10).data;let S=!1;for(let h=3;h0&&c[h]<255){S=!0;break}return(0,ft.shadow)(this,"isFontSubpixelAAEnabled",S)}showText(s){const c=this.current,S=c.font;if(S.isType3Font)return this.showType3Text(s);const h=c.fontSize;if(h===0)return;const m=this.ctx,k=c.fontSizeScale,I=c.charSpacing,B=c.wordSpacing,tt=c.fontDirection,it=c.textHScale*tt,st=s.length,X=S.vertical,J=X?1:-1,j=S.defaultVMetrics,O=h*c.fontMatrix[0],H=c.textRenderingMode===ft.TextRenderingMode.FILL&&!S.disableFontFace&&!c.patternFill;m.save(),m.transform(...c.textMatrix),m.translate(c.x,c.y+c.textRise),tt>0?m.scale(it,-1):m.scale(it,1);let V;if(c.patternFill){m.save();const et=c.fillColor.getPattern(m,this,(0,At.getCurrentTransformInverse)(m),$t.PathType.FILL);V=(0,At.getCurrentTransform)(m),m.restore(),m.fillStyle=et}let z=c.lineWidth;const Y=c.textMatrixScale;if(Y===0||z===0){const et=c.textRenderingMode&ft.TextRenderingMode.FILL_STROKE_MASK;(et===ft.TextRenderingMode.STROKE||et===ft.TextRenderingMode.FILL_STROKE)&&(z=this.getSinglePixelWidth())}else z/=Y;if(k!==1&&(m.scale(k,k),z/=k),m.lineWidth=z,S.isInvalidPDFjsFont){const et=[];let nt=0;for(const at of s)et.push(at.unicode),nt+=at.width;m.fillText(et.join(""),0,0),c.x+=nt*O*it,m.restore(),this.compose();return}let G=0,K;for(K=0;K0){const Tt=m.measureText(Q).width*1e3/h*k;if(ytnew W(k,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};c=new $t.TilingPattern(s,S,this.ctx,m,h)}else c=this._getPattern(s[1],s[2]);return c}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(s,c,S){const h=ft.Util.makeHexColor(s,c,S);this.ctx.strokeStyle=h,this.current.strokeColor=h}setFillRGBColor(s,c,S){const h=ft.Util.makeHexColor(s,c,S);this.ctx.fillStyle=h,this.current.fillColor=h,this.current.patternFill=!1}_getPattern(s,c=null){let S;return this.cachedPatterns.has(s)?S=this.cachedPatterns.get(s):(S=(0,$t.getShadingPattern)(this.getObject(s)),this.cachedPatterns.set(s,S)),c&&(S.matrix=c),S}shadingFill(s){if(!this.contentVisible)return;const c=this.ctx;this.save();const S=this._getPattern(s);c.fillStyle=S.getPattern(c,this,(0,At.getCurrentTransformInverse)(c),$t.PathType.SHADING);const h=(0,At.getCurrentTransformInverse)(c);if(h){const{width:m,height:k}=c.canvas,[I,B,tt,it]=ft.Util.getAxialAlignedBoundingBox([0,0,m,k],h);this.ctx.fillRect(I,B,tt-I,it-B)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,ft.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,ft.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(s,c){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(s)&&s.length===6&&this.transform(...s),this.baseTransform=(0,At.getCurrentTransform)(this.ctx),c)){const S=c[2]-c[0],h=c[3]-c[1];this.ctx.rect(c[0],c[1],S,h),this.current.updateRectMinMax((0,At.getCurrentTransform)(this.ctx),c),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(s){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const c=this.ctx;s.isolated||(0,ft.info)("TODO: Support non-isolated groups."),s.knockout&&(0,ft.warn)("Knockout groups not supported.");const S=(0,At.getCurrentTransform)(c);if(s.matrix&&c.transform(...s.matrix),!s.bbox)throw new Error("Bounding box is required.");let h=ft.Util.getAxialAlignedBoundingBox(s.bbox,(0,At.getCurrentTransform)(c));const m=[0,0,c.canvas.width,c.canvas.height];h=ft.Util.intersect(h,m)||[0,0,0,0];const k=Math.floor(h[0]),I=Math.floor(h[1]);let B=Math.max(Math.ceil(h[2])-k,1),tt=Math.max(Math.ceil(h[3])-I,1),it=1,st=1;B>n&&(it=B/n,B=n),tt>n&&(st=tt/n,tt=n),this.current.startNewPathAndClipBox([0,0,B,tt]);let X="groupAt"+this.groupLevel;s.smask&&(X+="_smask_"+this.smaskCounter++%2);const J=this.cachedCanvases.getCanvas(X,B,tt),j=J.context;j.scale(1/it,1/st),j.translate(-k,-I),j.transform(...S),s.smask?this.smaskStack.push({canvas:J.canvas,context:j,offsetX:k,offsetY:I,scaleX:it,scaleY:st,subtype:s.smask.subtype,backdrop:s.smask.backdrop,transferMap:s.smask.transferMap||null,startTransformInverse:null}):(c.setTransform(1,0,0,1,0,0),c.translate(k,I),c.scale(it,st),c.save()),p(c,j),this.ctx=j,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(c),this.groupLevel++}endGroup(s){if(!this.contentVisible)return;this.groupLevel--;const c=this.ctx,S=this.groupStack.pop();if(this.ctx=S,this.ctx.imageSmoothingEnabled=!1,s.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const h=(0,At.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...h);const m=ft.Util.getAxialAlignedBoundingBox([0,0,c.canvas.width,c.canvas.height],h);this.ctx.drawImage(c.canvas,0,0),this.ctx.restore(),this.compose(m)}}beginAnnotation(s,c,S,h,m){if(Lt(this,x,ki).call(this),b(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(c)&&c.length===4){const k=c[2]-c[0],I=c[3]-c[1];if(m&&this.annotationCanvasMap){S=S.slice(),S[4]-=c[0],S[5]-=c[1],c=c.slice(),c[0]=c[1]=0,c[2]=k,c[3]=I;const[B,tt]=ft.Util.singularValueDecompose2dScale((0,At.getCurrentTransform)(this.ctx)),{viewportScale:it}=this,st=Math.ceil(k*this.outputScaleX*it),X=Math.ceil(I*this.outputScaleY*it);this.annotationCanvas=this.canvasFactory.create(st,X);const{canvas:J,context:j}=this.annotationCanvas;this.annotationCanvasMap.set(s,J),this.annotationCanvas.savedCtx=this.ctx,this.ctx=j,this.ctx.save(),this.ctx.setTransform(B,0,0,-tt,0,I*tt),b(this.ctx)}else b(this.ctx),this.ctx.rect(c[0],c[1],k,I),this.ctx.clip(),this.endPath()}this.current=new d(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...S),this.transform(...h)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),Lt(this,D,Ti).call(this),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(s){if(!this.contentVisible)return;const c=s.count;s=this.getObject(s.data,s),s.count=c;const S=this.ctx,h=this.processingType3;if(h&&(h.compiled===void 0&&(h.compiled=T(s)),h.compiled)){h.compiled(S);return}const m=this._createMaskCanvas(s),k=m.canvas;S.save(),S.setTransform(1,0,0,1,0,0),S.drawImage(k,m.offsetX,m.offsetY),S.restore(),this.compose()}paintImageMaskXObjectRepeat(s,c,S=0,h=0,m,k){if(!this.contentVisible)return;s=this.getObject(s.data,s);const I=this.ctx;I.save();const B=(0,At.getCurrentTransform)(I);I.transform(c,S,h,m,0,0);const tt=this._createMaskCanvas(s);I.setTransform(1,0,0,1,tt.offsetX-B[4],tt.offsetY-B[5]);for(let it=0,st=k.length;itst?it/st:1,I=tt>st?tt/st:1}}this._cachedScaleForStroking[0]=k,this._cachedScaleForStroking[1]=I}return this._cachedScaleForStroking}rescaleAndStroke(s){const{ctx:c}=this,{lineWidth:S}=this.current,[h,m]=this.getScaleForStroking();if(c.lineWidth=S||1,h===1&&m===1){c.stroke();return}const k=c.getLineDash();if(s&&c.save(),c.scale(h,m),k.length>0){const I=Math.max(h,m);c.setLineDash(k.map(B=>B/I)),c.lineDashOffset/=I}c.stroke(),s&&c.restore()}isContentVisible(){for(let s=this.markedContentStack.length-1;s>=0;s--)if(!this.markedContentStack[s].visible)return!1;return!0}};x=new WeakSet,ki=function(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)},D=new WeakSet,Ti=function(){if(this.pageColors){const s=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(s!=="none"){const c=this.ctx.filter;this.ctx.filter=s,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=c}}};let g=W;dt.CanvasGraphics=g;for(const w in ft.OPS)g.prototype[w]!==void 0&&(g.prototype[ft.OPS[w]]=g.prototype[w])},(Ot,dt,Mt)=>{Object.defineProperty(dt,"__esModule",{value:!0}),dt.TilingPattern=dt.PathType=void 0,dt.getShadingPattern=e;var ft=Mt(1),At=Mt(6);const $t={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};dt.PathType=$t;function vt(T,d){if(!d)return;const i=d[2]-d[0],C=d[3]-d[1],p=new Path2D;p.rect(d[0],d[1],i,C),T.clip(p)}class M{constructor(){this.constructor===M&&(0,ft.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,ft.unreachable)("Abstract method `getPattern` called.")}}class Z extends M{constructor(d){super(),this._type=d[1],this._bbox=d[2],this._colorStops=d[3],this._p0=d[4],this._p1=d[5],this._r0=d[6],this._r1=d[7],this.matrix=null}_createGradient(d){let i;this._type==="axial"?i=d.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(i=d.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const C of this._colorStops)i.addColorStop(C[0],C[1]);return i}getPattern(d,i,C,p){let b;if(p===$t.STROKE||p===$t.FILL){const F=i.current.getClippedPathBoundingBox(p,(0,At.getCurrentTransform)(d))||[0,0,0,0],u=Math.ceil(F[2]-F[0])||1,l=Math.ceil(F[3]-F[1])||1,y=i.cachedCanvases.getCanvas("pattern",u,l,!0),N=y.context;N.clearRect(0,0,N.canvas.width,N.canvas.height),N.beginPath(),N.rect(0,0,N.canvas.width,N.canvas.height),N.translate(-F[0],-F[1]),C=ft.Util.transform(C,[1,0,0,1,F[0],F[1]]),N.transform(...i.baseTransform),this.matrix&&N.transform(...this.matrix),vt(N,this._bbox),N.fillStyle=this._createGradient(N),N.fill(),b=d.createPattern(y.canvas,"no-repeat");const U=new DOMMatrix(C);b.setTransform(U)}else vt(d,this._bbox),b=this._createGradient(d);return b}}function n(T,d,i,C,p,b,F,u){const l=d.coords,y=d.colors,N=T.data,U=T.width*4;let $;l[i+1]>l[C+1]&&($=i,i=C,C=$,$=b,b=F,F=$),l[C+1]>l[p+1]&&($=C,C=p,p=$,$=F,F=u,u=$),l[i+1]>l[C+1]&&($=i,i=C,C=$,$=b,b=F,F=$);const P=(l[i]+d.offsetX)*d.scaleX,R=(l[i+1]+d.offsetY)*d.scaleY,o=(l[C]+d.offsetX)*d.scaleX,g=(l[C+1]+d.offsetY)*d.scaleY,x=(l[p]+d.offsetX)*d.scaleX,E=(l[p+1]+d.offsetY)*d.scaleY;if(R>=E)return;const D=y[b],q=y[b+1],W=y[b+2],w=y[F],s=y[F+1],c=y[F+2],S=y[u],h=y[u+1],m=y[u+2],k=Math.round(R),I=Math.round(E);let B,tt,it,st,X,J,j,O;for(let H=k;H<=I;H++){if(HE?K=1:g===E?K=0:K=(g-H)/(g-E),B=o-(o-x)*K,tt=w-(w-S)*K,it=s-(s-h)*K,st=c-(c-m)*K}let V;HE?V=1:V=(R-H)/(R-E),X=P-(P-x)*V,J=D-(D-S)*V,j=q-(q-h)*V,O=W-(W-m)*V;const z=Math.round(Math.min(B,X)),Y=Math.round(Math.max(B,X));let G=U*H+z*4;for(let K=z;K<=Y;K++)V=(B-K)/(B-X),V<0?V=0:V>1&&(V=1),N[G++]=tt-(tt-J)*V|0,N[G++]=it-(it-j)*V|0,N[G++]=st-(st-O)*V|0,N[G++]=255}}function _(T,d,i){const C=d.coords,p=d.colors;let b,F;switch(d.type){case"lattice":const u=d.verticesPerRow,l=Math.floor(C.length/u)-1,y=u-1;for(b=0;b=p?b=p:C=b/d,{scale:C,size:b}}clipBbox(d,i,C,p,b){const F=p-i,u=b-C;d.ctx.rect(i,C,F,u),d.current.updateRectMinMax((0,At.getCurrentTransform)(d.ctx),[i,C,p,b]),d.clip(),d.endPath()}setFillAndStrokeStyleToContext(d,i,C){const p=d.ctx,b=d.current;switch(i){case a.COLORED:const F=this.ctx;p.fillStyle=F.fillStyle,p.strokeStyle=F.strokeStyle,b.fillColor=F.fillStyle,b.strokeColor=F.strokeStyle;break;case a.UNCOLORED:const u=ft.Util.makeHexColor(C[0],C[1],C[2]);p.fillStyle=u,p.strokeStyle=u,b.fillColor=u,b.strokeColor=u;break;default:throw new ft.FormatError(`Unsupported paint type: ${i}`)}}getPattern(d,i,C,p){let b=C;p!==$t.SHADING&&(b=ft.Util.transform(b,i.baseTransform),this.matrix&&(b=ft.Util.transform(b,this.matrix)));const F=this.createPatternCanvas(i);let u=new DOMMatrix(b);u=u.translate(F.offsetX,F.offsetY),u=u.scale(1/F.scaleX,1/F.scaleY);const l=d.createPattern(F.canvas,"repeat");return l.setTransform(u),l}};ye(A,"MAX_PATTERN_SIZE",3e3);let v=A;dt.TilingPattern=v},(Ot,dt,Mt)=>{Object.defineProperty(dt,"__esModule",{value:!0}),dt.convertBlackAndWhiteToRGBA=$t,dt.convertToRGBA=At,dt.grayToRGBA=M;var ft=Mt(1);function At(Z){switch(Z.kind){case ft.ImageKind.GRAYSCALE_1BPP:return $t(Z);case ft.ImageKind.RGB_24BPP:return vt(Z)}return null}function $t({src:Z,srcPos:n=0,dest:_,width:L,height:t,nonBlackColor:e=4294967295,inverseDecode:a=!1}){const v=ft.FeatureTest.isLittleEndian?4278190080:255,[A,T]=a?[e,v]:[v,e],d=L>>3,i=L&7,C=Z.length;_=new Uint32Array(_.buffer);let p=0;for(let b=0;b>2,A=new Uint32Array(Z.buffer,n,v);if(ft.FeatureTest.isLittleEndian){for(;a>>24|d<<8|4278190080,_[L+2]=d>>>16|i<<16|4278190080,_[L+3]=i>>>8|4278190080}for(let T=a*4,d=Z.length;T>>8|255,_[L+2]=d<<16|i>>>16|255,_[L+3]=i<<8|255}for(let T=a*4,d=Z.length;T{Object.defineProperty(dt,"__esModule",{value:!0}),dt.GlobalWorkerOptions=void 0;const Mt=Object.create(null);dt.GlobalWorkerOptions=Mt,Mt.workerPort=null,Mt.workerSrc=""},(Ot,dt,Mt)=>{var Z,lr,_,hr,t,Cn;Object.defineProperty(dt,"__esModule",{value:!0}),dt.MessageHandler=void 0;var ft=Mt(1);const At={UNKNOWN:0,DATA:1,ERROR:2},$t={UNKNOWN:0,CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function vt(a){switch(a instanceof Error||typeof a=="object"&&a!==null||(0,ft.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),a.name){case"AbortException":return new ft.AbortException(a.message);case"MissingPDFException":return new ft.MissingPDFException(a.message);case"PasswordException":return new ft.PasswordException(a.message,a.code);case"UnexpectedResponseException":return new ft.UnexpectedResponseException(a.message,a.status);case"UnknownErrorException":return new ft.UnknownErrorException(a.message,a.details);default:return new ft.UnknownErrorException(a.message,a.toString())}}class M{constructor(v,A,T){_t(this,Z);_t(this,_);_t(this,t);this.sourceName=v,this.targetName=A,this.comObj=T,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=d=>{const i=d.data;if(i.targetName!==this.sourceName)return;if(i.stream){Lt(this,_,hr).call(this,i);return}if(i.callback){const p=i.callbackId,b=this.callbackCapabilities[p];if(!b)throw new Error(`Cannot resolve callback ${p}`);if(delete this.callbackCapabilities[p],i.callback===At.DATA)b.resolve(i.data);else if(i.callback===At.ERROR)b.reject(vt(i.reason));else throw new Error("Unexpected callback case");return}const C=this.actionHandler[i.action];if(!C)throw new Error(`Unknown action from worker: ${i.action}`);if(i.callbackId){const p=this.sourceName,b=i.sourceName;new Promise(function(F){F(C(i.data))}).then(function(F){T.postMessage({sourceName:p,targetName:b,callback:At.DATA,callbackId:i.callbackId,data:F})},function(F){T.postMessage({sourceName:p,targetName:b,callback:At.ERROR,callbackId:i.callbackId,reason:vt(F)})});return}if(i.streamId){Lt(this,Z,lr).call(this,i);return}C(i.data)},T.addEventListener("message",this._onComObjOnMessage)}on(v,A){const T=this.actionHandler;if(T[v])throw new Error(`There is already an actionName called "${v}"`);T[v]=A}send(v,A,T){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:v,data:A},T)}sendWithPromise(v,A,T){const d=this.callbackId++,i=new ft.PromiseCapability;this.callbackCapabilities[d]=i;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:v,callbackId:d,data:A},T)}catch(C){i.reject(C)}return i.promise}sendWithStream(v,A,T,d){const i=this.streamId++,C=this.sourceName,p=this.targetName,b=this.comObj;return new ReadableStream({start:F=>{const u=new ft.PromiseCapability;return this.streamControllers[i]={controller:F,startCall:u,pullCall:null,cancelCall:null,isClosed:!1},b.postMessage({sourceName:C,targetName:p,action:v,streamId:i,data:A,desiredSize:F.desiredSize},d),u.promise},pull:F=>{const u=new ft.PromiseCapability;return this.streamControllers[i].pullCall=u,b.postMessage({sourceName:C,targetName:p,stream:$t.PULL,streamId:i,desiredSize:F.desiredSize}),u.promise},cancel:F=>{(0,ft.assert)(F instanceof Error,"cancel must have a valid reason");const u=new ft.PromiseCapability;return this.streamControllers[i].cancelCall=u,this.streamControllers[i].isClosed=!0,b.postMessage({sourceName:C,targetName:p,stream:$t.CANCEL,streamId:i,reason:vt(F)}),u.promise}},T)}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}Z=new WeakSet,lr=function(v){const A=v.streamId,T=this.sourceName,d=v.sourceName,i=this.comObj,C=this,p=this.actionHandler[v.action],b={enqueue(F,u=1,l){if(this.isCancelled)return;const y=this.desiredSize;this.desiredSize-=u,y>0&&this.desiredSize<=0&&(this.sinkCapability=new ft.PromiseCapability,this.ready=this.sinkCapability.promise),i.postMessage({sourceName:T,targetName:d,stream:$t.ENQUEUE,streamId:A,chunk:F},l)},close(){this.isCancelled||(this.isCancelled=!0,i.postMessage({sourceName:T,targetName:d,stream:$t.CLOSE,streamId:A}),delete C.streamSinks[A])},error(F){(0,ft.assert)(F instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,i.postMessage({sourceName:T,targetName:d,stream:$t.ERROR,streamId:A,reason:vt(F)}))},sinkCapability:new ft.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:v.desiredSize,ready:null};b.sinkCapability.resolve(),b.ready=b.sinkCapability.promise,this.streamSinks[A]=b,new Promise(function(F){F(p(v.data,b))}).then(function(){i.postMessage({sourceName:T,targetName:d,stream:$t.START_COMPLETE,streamId:A,success:!0})},function(F){i.postMessage({sourceName:T,targetName:d,stream:$t.START_COMPLETE,streamId:A,reason:vt(F)})})},_=new WeakSet,hr=function(v){const A=v.streamId,T=this.sourceName,d=v.sourceName,i=this.comObj,C=this.streamControllers[A],p=this.streamSinks[A];switch(v.stream){case $t.START_COMPLETE:v.success?C.startCall.resolve():C.startCall.reject(vt(v.reason));break;case $t.PULL_COMPLETE:v.success?C.pullCall.resolve():C.pullCall.reject(vt(v.reason));break;case $t.PULL:if(!p){i.postMessage({sourceName:T,targetName:d,stream:$t.PULL_COMPLETE,streamId:A,success:!0});break}p.desiredSize<=0&&v.desiredSize>0&&p.sinkCapability.resolve(),p.desiredSize=v.desiredSize,new Promise(function(b){var F;b((F=p.onPull)==null?void 0:F.call(p))}).then(function(){i.postMessage({sourceName:T,targetName:d,stream:$t.PULL_COMPLETE,streamId:A,success:!0})},function(b){i.postMessage({sourceName:T,targetName:d,stream:$t.PULL_COMPLETE,streamId:A,reason:vt(b)})});break;case $t.ENQUEUE:if((0,ft.assert)(C,"enqueue should have stream controller"),C.isClosed)break;C.controller.enqueue(v.chunk);break;case $t.CLOSE:if((0,ft.assert)(C,"close should have stream controller"),C.isClosed)break;C.isClosed=!0,C.controller.close(),Lt(this,t,Cn).call(this,C,A);break;case $t.ERROR:(0,ft.assert)(C,"error should have stream controller"),C.controller.error(vt(v.reason)),Lt(this,t,Cn).call(this,C,A);break;case $t.CANCEL_COMPLETE:v.success?C.cancelCall.resolve():C.cancelCall.reject(vt(v.reason)),Lt(this,t,Cn).call(this,C,A);break;case $t.CANCEL:if(!p)break;new Promise(function(b){var F;b((F=p.onCancel)==null?void 0:F.call(p,vt(v.reason)))}).then(function(){i.postMessage({sourceName:T,targetName:d,stream:$t.CANCEL_COMPLETE,streamId:A,success:!0})},function(b){i.postMessage({sourceName:T,targetName:d,stream:$t.CANCEL_COMPLETE,streamId:A,reason:vt(b)})}),p.sinkCapability.reject(vt(v.reason)),p.isCancelled=!0,delete this.streamSinks[A];break;default:throw new Error("Unexpected stream case")}},t=new WeakSet,Cn=async function(v,A){var T,d,i;await Promise.allSettled([(T=v.startCall)==null?void 0:T.promise,(d=v.pullCall)==null?void 0:d.promise,(i=v.cancelCall)==null?void 0:i.promise]),delete this.streamControllers[A]},dt.MessageHandler=M},(Ot,dt,Mt)=>{var $t,vt;Object.defineProperty(dt,"__esModule",{value:!0}),dt.Metadata=void 0;var ft=Mt(1);class At{constructor({parsedData:Z,rawData:n}){_t(this,$t,void 0);_t(this,vt,void 0);Ht(this,$t,Z),Ht(this,vt,n)}getRaw(){return ot(this,vt)}get(Z){return ot(this,$t).get(Z)??null}getAll(){return(0,ft.objectFromMap)(ot(this,$t))}has(Z){return ot(this,$t).has(Z)}}$t=new WeakMap,vt=new WeakMap,dt.Metadata=At},(Ot,dt,Mt)=>{var Z,n,_,L,t,e,Fi;Object.defineProperty(dt,"__esModule",{value:!0}),dt.OptionalContentConfig=void 0;var ft=Mt(1),At=Mt(8);const $t=Symbol("INTERNAL");class vt{constructor(A,T){_t(this,Z,!0);this.name=A,this.intent=T}get visible(){return ot(this,Z)}_setVisible(A,T){A!==$t&&(0,ft.unreachable)("Internal method `_setVisible` called."),Ht(this,Z,T)}}Z=new WeakMap;class M{constructor(A){_t(this,e);_t(this,n,null);_t(this,_,new Map);_t(this,L,null);_t(this,t,null);if(this.name=null,this.creator=null,A!==null){this.name=A.name,this.creator=A.creator,Ht(this,t,A.order);for(const T of A.groups)ot(this,_).set(T.id,new vt(T.name,T.intent));if(A.baseState==="OFF")for(const T of ot(this,_).values())T._setVisible($t,!1);for(const T of A.on)ot(this,_).get(T)._setVisible($t,!0);for(const T of A.off)ot(this,_).get(T)._setVisible($t,!1);Ht(this,L,this.getHash())}}isVisible(A){if(ot(this,_).size===0)return!0;if(!A)return(0,ft.warn)("Optional content group not defined."),!0;if(A.type==="OCG")return ot(this,_).has(A.id)?ot(this,_).get(A.id).visible:((0,ft.warn)(`Optional content group not found: ${A.id}`),!0);if(A.type==="OCMD"){if(A.expression)return Lt(this,e,Fi).call(this,A.expression);if(!A.policy||A.policy==="AnyOn"){for(const T of A.ids){if(!ot(this,_).has(T))return(0,ft.warn)(`Optional content group not found: ${T}`),!0;if(ot(this,_).get(T).visible)return!0}return!1}else if(A.policy==="AllOn"){for(const T of A.ids){if(!ot(this,_).has(T))return(0,ft.warn)(`Optional content group not found: ${T}`),!0;if(!ot(this,_).get(T).visible)return!1}return!0}else if(A.policy==="AnyOff"){for(const T of A.ids){if(!ot(this,_).has(T))return(0,ft.warn)(`Optional content group not found: ${T}`),!0;if(!ot(this,_).get(T).visible)return!0}return!1}else if(A.policy==="AllOff"){for(const T of A.ids){if(!ot(this,_).has(T))return(0,ft.warn)(`Optional content group not found: ${T}`),!0;if(ot(this,_).get(T).visible)return!1}return!0}return(0,ft.warn)(`Unknown optional content policy ${A.policy}.`),!0}return(0,ft.warn)(`Unknown group type ${A.type}.`),!0}setVisibility(A,T=!0){if(!ot(this,_).has(A)){(0,ft.warn)(`Optional content group not found: ${A}`);return}ot(this,_).get(A)._setVisible($t,!!T),Ht(this,n,null)}get hasInitialVisibility(){return ot(this,L)===null||this.getHash()===ot(this,L)}getOrder(){return ot(this,_).size?ot(this,t)?ot(this,t).slice():[...ot(this,_).keys()]:null}getGroups(){return ot(this,_).size>0?(0,ft.objectFromMap)(ot(this,_)):null}getGroup(A){return ot(this,_).get(A)||null}getHash(){if(ot(this,n)!==null)return ot(this,n);const A=new At.MurmurHash3_64;for(const[T,d]of ot(this,_))A.update(`${T}:${d.visible}`);return Ht(this,n,A.hexdigest())}}n=new WeakMap,_=new WeakMap,L=new WeakMap,t=new WeakMap,e=new WeakSet,Fi=function(A){const T=A.length;if(T<2)return!0;const d=A[0];for(let i=1;i{Object.defineProperty(dt,"__esModule",{value:!0}),dt.PDFDataTransportStream=void 0;var ft=Mt(1),At=Mt(6);class $t{constructor({length:n,initialData:_,progressiveDone:L=!1,contentDispositionFilename:t=null,disableRange:e=!1,disableStream:a=!1},v){if((0,ft.assert)(v,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=L,this._contentDispositionFilename=t,(_==null?void 0:_.length)>0){const A=_ instanceof Uint8Array&&_.byteLength===_.buffer.byteLength?_.buffer:new Uint8Array(_).buffer;this._queuedChunks.push(A)}this._pdfDataRangeTransport=v,this._isStreamingSupported=!a,this._isRangeSupported=!e,this._contentLength=n,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((A,T)=>{this._onReceiveData({begin:A,chunk:T})}),this._pdfDataRangeTransport.addProgressListener((A,T)=>{this._onProgress({loaded:A,total:T})}),this._pdfDataRangeTransport.addProgressiveReadListener(A=>{this._onReceiveData({chunk:A})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData({begin:n,chunk:_}){const L=_ instanceof Uint8Array&&_.byteLength===_.buffer.byteLength?_.buffer:new Uint8Array(_).buffer;if(n===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(L):this._queuedChunks.push(L);else{const t=this._rangeReaders.some(function(e){return e._begin!==n?!1:(e._enqueue(L),!0)});(0,ft.assert)(t,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){var n;return((n=this._fullRequestReader)==null?void 0:n._loaded)??0}_onProgress(n){var _,L,t,e;n.total===void 0?(L=(_=this._rangeReaders[0])==null?void 0:_.onProgress)==null||L.call(_,{loaded:n.loaded}):(e=(t=this._fullRequestReader)==null?void 0:t.onProgress)==null||e.call(t,{loaded:n.loaded,total:n.total})}_onProgressiveDone(){var n;(n=this._fullRequestReader)==null||n.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(n){const _=this._rangeReaders.indexOf(n);_>=0&&this._rangeReaders.splice(_,1)}getFullReader(){(0,ft.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const n=this._queuedChunks;return this._queuedChunks=null,new vt(this,n,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(n,_){if(_<=this._progressiveDataLength)return null;const L=new M(this,n,_);return this._pdfDataRangeTransport.requestDataRange(n,_),this._rangeReaders.push(L),L}cancelAllRequests(n){var _;(_=this._fullRequestReader)==null||_.cancel(n);for(const L of this._rangeReaders.slice(0))L.cancel(n);this._pdfDataRangeTransport.abort()}}dt.PDFDataTransportStream=$t;class vt{constructor(n,_,L=!1,t=null){this._stream=n,this._done=L||!1,this._filename=(0,At.isPdfFile)(t)?t:null,this._queuedChunks=_||[],this._loaded=0;for(const e of this._queuedChunks)this._loaded+=e.byteLength;this._requests=[],this._headersReady=Promise.resolve(),n._fullRequestReader=this,this.onProgress=null}_enqueue(n){this._done||(this._requests.length>0?this._requests.shift().resolve({value:n,done:!1}):this._queuedChunks.push(n),this._loaded+=n.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const n=new ft.PromiseCapability;return this._requests.push(n),n.promise}cancel(n){this._done=!0;for(const _ of this._requests)_.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class M{constructor(n,_,L){this._stream=n,this._begin=_,this._end=L,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(n){if(!this._done){if(this._requests.length===0)this._queuedChunk=n;else{this._requests.shift().resolve({value:n,done:!1});for(const L of this._requests)L.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const _=this._queuedChunk;return this._queuedChunk=null,{value:_,done:!1}}if(this._done)return{value:void 0,done:!0};const n=new ft.PromiseCapability;return this._requests.push(n),n.promise}cancel(n){this._done=!0;for(const _ of this._requests)_.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(Ot,dt,Mt)=>{Object.defineProperty(dt,"__esModule",{value:!0}),dt.PDFFetchStream=void 0;var ft=Mt(1),At=Mt(20);function $t(L,t,e){return{method:"GET",headers:L,signal:e.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function vt(L){const t=new Headers;for(const e in L){const a=L[e];a!==void 0&&t.append(e,a)}return t}function M(L){return L instanceof Uint8Array?L.buffer:L instanceof ArrayBuffer?L:((0,ft.warn)(`getArrayBuffer - unexpected data format: ${L}`),new Uint8Array(L).buffer)}class Z{constructor(t){this.source=t,this.isHttp=/^https?:/i.test(t.url),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var t;return((t=this._fullRequestReader)==null?void 0:t._loaded)??0}getFullReader(){return(0,ft.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new n(this),this._fullRequestReader}getRangeReader(t,e){if(e<=this._progressiveDataLength)return null;const a=new _(this,t,e);return this._rangeRequestReaders.push(a),a}cancelAllRequests(t){var e;(e=this._fullRequestReader)==null||e.cancel(t);for(const a of this._rangeRequestReaders.slice(0))a.cancel(t)}}dt.PDFFetchStream=Z;class n{constructor(t){this._stream=t,this._reader=null,this._loaded=0,this._filename=null;const e=t.source;this._withCredentials=e.withCredentials||!1,this._contentLength=e.length,this._headersCapability=new ft.PromiseCapability,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._headers=vt(this._stream.httpHeaders);const a=e.url;fetch(a,$t(this._headers,this._withCredentials,this._abortController)).then(v=>{if(!(0,At.validateResponseStatus)(v.status))throw(0,At.createResponseStatusError)(v.status,a);this._reader=v.body.getReader(),this._headersCapability.resolve();const A=i=>v.headers.get(i),{allowRangeRequests:T,suggestedLength:d}=(0,At.validateRangeRequestCapabilities)({getResponseHeader:A,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=T,this._contentLength=d||this._contentLength,this._filename=(0,At.extractFilenameFromHeader)(A),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new ft.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var a;await this._headersCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,(a=this.onProgress)==null||a.call(this,{loaded:this._loaded,total:this._contentLength}),{value:M(t),done:!1})}cancel(t){var e;(e=this._reader)==null||e.cancel(t),this._abortController.abort()}}class _{constructor(t,e,a){this._stream=t,this._reader=null,this._loaded=0;const v=t.source;this._withCredentials=v.withCredentials||!1,this._readCapability=new ft.PromiseCapability,this._isStreamingSupported=!v.disableStream,this._abortController=new AbortController,this._headers=vt(this._stream.httpHeaders),this._headers.append("Range",`bytes=${e}-${a-1}`);const A=v.url;fetch(A,$t(this._headers,this._withCredentials,this._abortController)).then(T=>{if(!(0,At.validateResponseStatus)(T.status))throw(0,At.createResponseStatusError)(T.status,A);this._readCapability.resolve(),this._reader=T.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){var a;await this._readCapability.promise;const{value:t,done:e}=await this._reader.read();return e?{value:t,done:e}:(this._loaded+=t.byteLength,(a=this.onProgress)==null||a.call(this,{loaded:this._loaded}),{value:M(t),done:!1})}cancel(t){var e;(e=this._reader)==null||e.cancel(t),this._abortController.abort()}}},(Ot,dt,Mt)=>{Object.defineProperty(dt,"__esModule",{value:!0}),dt.createResponseStatusError=Z,dt.extractFilenameFromHeader=M,dt.validateRangeRequestCapabilities=vt,dt.validateResponseStatus=n;var ft=Mt(1),At=Mt(21),$t=Mt(6);function vt({getResponseHeader:_,isHttp:L,rangeChunkSize:t,disableRange:e}){const a={allowRangeRequests:!1,suggestedLength:void 0},v=parseInt(_("Content-Length"),10);return!Number.isInteger(v)||(a.suggestedLength=v,v<=2*t)||e||!L||_("Accept-Ranges")!=="bytes"||(_("Content-Encoding")||"identity")!=="identity"||(a.allowRangeRequests=!0),a}function M(_){const L=_("Content-Disposition");if(L){let t=(0,At.getFilenameFromContentDispositionHeader)(L);if(t.includes("%"))try{t=decodeURIComponent(t)}catch{}if((0,$t.isPdfFile)(t))return t}return null}function Z(_,L){return _===404||_===0&&L.startsWith("file:")?new ft.MissingPDFException('Missing PDF "'+L+'".'):new ft.UnexpectedResponseException(`Unexpected server response (${_}) while retrieving PDF "${L}".`,_)}function n(_){return _===200||_===206}},(Ot,dt,Mt)=>{Object.defineProperty(dt,"__esModule",{value:!0}),dt.getFilenameFromContentDispositionHeader=At;var ft=Mt(1);function At($t){let vt=!0,M=Z("filename\\*","i").exec($t);if(M){M=M[1];let v=t(M);return v=unescape(v),v=e(v),v=a(v),_(v)}if(M=L($t),M){const v=a(M);return _(v)}if(M=Z("filename","i").exec($t),M){M=M[1];let v=t(M);return v=a(v),_(v)}function Z(v,A){return new RegExp("(?:^|;)\\s*"+v+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',A)}function n(v,A){if(v){if(!/^[\x00-\xFF]+$/.test(A))return A;try{const T=new TextDecoder(v,{fatal:!0}),d=(0,ft.stringToBytes)(A);A=T.decode(d),vt=!1}catch{}}return A}function _(v){return vt&&/[\x80-\xff]/.test(v)&&(v=n("utf-8",v),vt&&(v=n("iso-8859-1",v))),v}function L(v){const A=[];let T;const d=Z("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(T=d.exec(v))!==null;){let[,C,p,b]=T;if(C=parseInt(C,10),C in A){if(C===0)break;continue}A[C]=[p,b]}const i=[];for(let C=0;C{Object.defineProperty(dt,"__esModule",{value:!0}),dt.PDFNetworkStream=void 0;var ft=Mt(1),At=Mt(20);const $t=200,vt=206;function M(t){const e=t.response;return typeof e!="string"?e:(0,ft.stringToBytes)(e).buffer}class Z{constructor(e,a={}){this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&a.httpHeaders||Object.create(null),this.withCredentials=a.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,a,v){const A={begin:e,end:a};for(const T in v)A[T]=v[T];return this.request(A)}requestFull(e){return this.request(e)}request(e){const a=new XMLHttpRequest,v=this.currXhrId++,A=this.pendingRequests[v]={xhr:a};a.open("GET",this.url),a.withCredentials=this.withCredentials;for(const T in this.httpHeaders){const d=this.httpHeaders[T];d!==void 0&&a.setRequestHeader(T,d)}return this.isHttp&&"begin"in e&&"end"in e?(a.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),A.expectedStatus=vt):A.expectedStatus=$t,a.responseType="arraybuffer",e.onError&&(a.onerror=function(T){e.onError(a.status)}),a.onreadystatechange=this.onStateChange.bind(this,v),a.onprogress=this.onProgress.bind(this,v),A.onHeadersReceived=e.onHeadersReceived,A.onDone=e.onDone,A.onError=e.onError,A.onProgress=e.onProgress,a.send(null),v}onProgress(e,a){var A;const v=this.pendingRequests[e];v&&((A=v.onProgress)==null||A.call(v,a))}onStateChange(e,a){var C,p,b;const v=this.pendingRequests[e];if(!v)return;const A=v.xhr;if(A.readyState>=2&&v.onHeadersReceived&&(v.onHeadersReceived(),delete v.onHeadersReceived),A.readyState!==4||!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],A.status===0&&this.isHttp){(C=v.onError)==null||C.call(v,A.status);return}const T=A.status||$t;if(!(T===$t&&v.expectedStatus===vt)&&T!==v.expectedStatus){(p=v.onError)==null||p.call(v,A.status);return}const i=M(A);if(T===vt){const F=A.getResponseHeader("Content-Range"),u=/bytes (\d+)-(\d+)\/(\d+)/.exec(F);v.onDone({begin:parseInt(u[1],10),chunk:i})}else i?v.onDone({begin:0,chunk:i}):(b=v.onError)==null||b.call(v,A.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const a=this.pendingRequests[e].xhr;delete this.pendingRequests[e],a.abort()}}class n{constructor(e){this._source=e,this._manager=new Z(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const a=this._rangeRequestReaders.indexOf(e);a>=0&&this._rangeRequestReaders.splice(a,1)}getFullReader(){return(0,ft.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new _(this._manager,this._source),this._fullRequestReader}getRangeReader(e,a){const v=new L(this._manager,e,a);return v.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(v),v}cancelAllRequests(e){var a;(a=this._fullRequestReader)==null||a.cancel(e);for(const v of this._rangeRequestReaders.slice(0))v.cancel(e)}}dt.PDFNetworkStream=n;class _{constructor(e,a){this._manager=e;const v={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=a.url,this._fullRequestId=e.requestFull(v),this._headersReceivedCapability=new ft.PromiseCapability,this._disableRange=a.disableRange||!1,this._contentLength=a.length,this._rangeChunkSize=a.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,a=this._manager.getRequestXhr(e),v=d=>a.getResponseHeader(d),{allowRangeRequests:A,suggestedLength:T}=(0,At.validateRangeRequestCapabilities)({getResponseHeader:v,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});A&&(this._isRangeSupported=!0),this._contentLength=T||this._contentLength,this._filename=(0,At.extractFilenameFromHeader)(v),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const a of this._requests)a.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=(0,At.createResponseStatusError)(e,this._url),this._headersReceivedCapability.reject(this._storedError);for(const a of this._requests)a.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){var a;(a=this.onProgress)==null||a.call(this,{loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=new ft.PromiseCapability;return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e);for(const a of this._requests)a.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class L{constructor(e,a,v){this._manager=e;const A={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(a,v,A),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){var e;(e=this.onClosed)==null||e.call(this,this)}_onDone(e){const a=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:a,done:!1}):this._queuedChunk=a,this._done=!0;for(const v of this._requests)v.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=(0,At.createResponseStatusError)(e,this._url);for(const a of this._requests)a.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){var a;this.isStreamingSupported||(a=this.onProgress)==null||a.call(this,{loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const a=this._queuedChunk;return this._queuedChunk=null,{value:a,done:!1}}if(this._done)return{value:void 0,done:!0};const e=new ft.PromiseCapability;return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const a of this._requests)a.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(Ot,dt,Mt)=>{Object.defineProperty(dt,"__esModule",{value:!0}),dt.PDFNodeStream=void 0;var ft=Mt(1),At=Mt(20);const $t=/^file:\/\/\/[a-zA-Z]:\//;function vt(v){const A=require$$5,T=A.parse(v);return T.protocol==="file:"||T.host?T:/^[a-z]:[/\\]/i.test(v)?A.parse(`file:///${v}`):(T.host||(T.protocol="file:"),T)}class M{constructor(A){this.source=A,this.url=vt(A.url),this.isHttp=this.url.protocol==="http:"||this.url.protocol==="https:",this.isFsUrl=this.url.protocol==="file:",this.httpHeaders=this.isHttp&&A.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){var A;return((A=this._fullRequestReader)==null?void 0:A._loaded)??0}getFullReader(){return(0,ft.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new e(this):new L(this),this._fullRequestReader}getRangeReader(A,T){if(T<=this._progressiveDataLength)return null;const d=this.isFsUrl?new a(this,A,T):new t(this,A,T);return this._rangeRequestReaders.push(d),d}cancelAllRequests(A){var T;(T=this._fullRequestReader)==null||T.cancel(A);for(const d of this._rangeRequestReaders.slice(0))d.cancel(A)}}dt.PDFNodeStream=M;class Z{constructor(A){this._url=A.url,this._done=!1,this._storedError=null,this.onProgress=null;const T=A.source;this._contentLength=T.length,this._loaded=0,this._filename=null,this._disableRange=T.disableRange||!1,this._rangeChunkSize=T.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!T.disableStream,this._isRangeSupported=!T.disableRange,this._readableStream=null,this._readCapability=new ft.PromiseCapability,this._headersCapability=new ft.PromiseCapability}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){var d;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const A=this._readableStream.read();return A===null?(this._readCapability=new ft.PromiseCapability,this.read()):(this._loaded+=A.length,(d=this.onProgress)==null||d.call(this,{loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(A).buffer,done:!1})}cancel(A){if(!this._readableStream){this._error(A);return}this._readableStream.destroy(A)}_error(A){this._storedError=A,this._readCapability.resolve()}_setReadableStream(A){this._readableStream=A,A.on("readable",()=>{this._readCapability.resolve()}),A.on("end",()=>{A.destroy(),this._done=!0,this._readCapability.resolve()}),A.on("error",T=>{this._error(T)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new ft.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class n{constructor(A){this._url=A.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new ft.PromiseCapability;const T=A.source;this._isStreamingSupported=!T.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){var d;if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const A=this._readableStream.read();return A===null?(this._readCapability=new ft.PromiseCapability,this.read()):(this._loaded+=A.length,(d=this.onProgress)==null||d.call(this,{loaded:this._loaded}),{value:new Uint8Array(A).buffer,done:!1})}cancel(A){if(!this._readableStream){this._error(A);return}this._readableStream.destroy(A)}_error(A){this._storedError=A,this._readCapability.resolve()}_setReadableStream(A){this._readableStream=A,A.on("readable",()=>{this._readCapability.resolve()}),A.on("end",()=>{A.destroy(),this._done=!0,this._readCapability.resolve()}),A.on("error",T=>{this._error(T)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function _(v,A){return{protocol:v.protocol,auth:v.auth,host:v.hostname,port:v.port,path:v.path,method:"GET",headers:A}}class L extends Z{constructor(A){super(A);const T=d=>{if(d.statusCode===404){const b=new ft.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=b,this._headersCapability.reject(b);return}this._headersCapability.resolve(),this._setReadableStream(d);const i=b=>this._readableStream.headers[b.toLowerCase()],{allowRangeRequests:C,suggestedLength:p}=(0,At.validateRangeRequestCapabilities)({getResponseHeader:i,isHttp:A.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=C,this._contentLength=p||this._contentLength,this._filename=(0,At.extractFilenameFromHeader)(i)};if(this._request=null,this._url.protocol==="http:"){const d=require$$5;this._request=d.request(_(this._url,A.httpHeaders),T)}else{const d=require$$5;this._request=d.request(_(this._url,A.httpHeaders),T)}this._request.on("error",d=>{this._storedError=d,this._headersCapability.reject(d)}),this._request.end()}}class t extends n{constructor(A,T,d){super(A),this._httpHeaders={};for(const C in A.httpHeaders){const p=A.httpHeaders[C];p!==void 0&&(this._httpHeaders[C]=p)}this._httpHeaders.Range=`bytes=${T}-${d-1}`;const i=C=>{if(C.statusCode===404){const p=new ft.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=p;return}this._setReadableStream(C)};if(this._request=null,this._url.protocol==="http:"){const C=require$$5;this._request=C.request(_(this._url,this._httpHeaders),i)}else{const C=require$$5;this._request=C.request(_(this._url,this._httpHeaders),i)}this._request.on("error",C=>{this._storedError=C}),this._request.end()}}class e extends Z{constructor(A){super(A);let T=decodeURIComponent(this._url.path);$t.test(this._url.href)&&(T=T.replace(/^\//,""));const d=require$$5;d.lstat(T,(i,C)=>{if(i){i.code==="ENOENT"&&(i=new ft.MissingPDFException(`Missing PDF "${T}".`)),this._storedError=i,this._headersCapability.reject(i);return}this._contentLength=C.size,this._setReadableStream(d.createReadStream(T)),this._headersCapability.resolve()})}}class a extends n{constructor(A,T,d){super(A);let i=decodeURIComponent(this._url.path);$t.test(this._url.href)&&(i=i.replace(/^\//,""));const C=require$$5;this._setReadableStream(C.createReadStream(i,{start:T,end:d-1}))}}},(Ot,dt,Mt)=>{Object.defineProperty(dt,"__esModule",{value:!0}),dt.SVGGraphics=void 0;var ft=Mt(6),At=Mt(1);const $t={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},vt="http://www.w3.org/XML/1998/namespace",M="http://www.w3.org/1999/xlink",Z=["butt","round","square"],n=["miter","round","bevel"],_=function(C,p="",b=!1){if(URL.createObjectURL&&typeof Blob<"u"&&!b)return URL.createObjectURL(new Blob([C],{type:p}));const F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let u=`data:${p};base64,`;for(let l=0,y=C.length;l>2,R=(N&3)<<4|U>>4,o=l+1>6:64,g=l+2>1&2147483647:P>>1&2147483647;b[$]=P}function F($,P,R){let o=-1;for(let g=P;g>>8^E}return o^-1}function u($,P,R,o){let g=o;const x=P.length;R[g]=x>>24&255,R[g+1]=x>>16&255,R[g+2]=x>>8&255,R[g+3]=x&255,g+=4,R[g]=$.charCodeAt(0)&255,R[g+1]=$.charCodeAt(1)&255,R[g+2]=$.charCodeAt(2)&255,R[g+3]=$.charCodeAt(3)&255,g+=4,R.set(P,g),g+=P.length;const E=F(R,o+4,g);R[g]=E>>24&255,R[g+1]=E>>16&255,R[g+2]=E>>8&255,R[g+3]=E&255}function l($,P,R){let o=1,g=0;for(let x=P;x=8?$:Buffer.from($),R=require$$5.deflateSync(P,{level:9});return R instanceof Uint8Array?R:new Uint8Array(R)}catch(P){(0,At.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+P)}return N($)}function N($){let P=$.length;const R=65535,o=Math.ceil(P/R),g=new Uint8Array(2+P+o*5+4);let x=0;g[x++]=120,g[x++]=156;let E=0;for(;P>R;)g[x++]=0,g[x++]=255,g[x++]=255,g[x++]=0,g[x++]=0,g.set($.subarray(E,E+R),x),x+=R,E+=R,P-=R;g[x++]=1,g[x++]=P&255,g[x++]=P>>8&255,g[x++]=~P&65535&255,g[x++]=(~P&65535)>>8&255,g.set($.subarray(E),x),x+=$.length-E;const D=l($,0,$.length);return g[x++]=D>>24&255,g[x++]=D>>16&255,g[x++]=D>>8&255,g[x++]=D&255,g}function U($,P,R,o){const g=$.width,x=$.height;let E,D,q;const W=$.data;switch(P){case At.ImageKind.GRAYSCALE_1BPP:D=0,E=1,q=g+7>>3;break;case At.ImageKind.RGB_24BPP:D=2,E=8,q=g*3;break;case At.ImageKind.RGBA_32BPP:D=6,E=8,q=g*4;break;default:throw new Error("invalid format")}const w=new Uint8Array((1+q)*x);let s=0,c=0;for(let B=0;B>24&255,g>>16&255,g>>8&255,g&255,x>>24&255,x>>16&255,x>>8&255,x&255,E,D,0,0,0]),h=y(w),m=C.length+p*3+S.length+h.length,k=new Uint8Array(m);let I=0;return k.set(C,I),I+=C.length,u("IHDR",S,k,I),I+=p+S.length,u("IDATA",h,k,I),I+=p+h.length,u("IEND",new Uint8Array(0),k,I),_(k,"image/png",R)}return function(P,R,o){const g=P.kind===void 0?At.ImageKind.GRAYSCALE_1BPP:P.kind;return U(P,g,R,o)}}();class t{constructor(){this.fontSizeScale=1,this.fontWeight=$t.fontWeight,this.fontSize=0,this.textMatrix=At.IDENTITY_MATRIX,this.fontMatrix=At.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=At.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=$t.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(p,b){this.x=p,this.y=b}}function e(C){let p=[];const b=[];for(const F of C){if(F.fn==="save"){p.push({fnId:92,fn:"group",items:[]}),b.push(p),p=p.at(-1).items;continue}F.fn==="restore"?p=b.pop():p.push(F)}return p}function a(C){if(Number.isInteger(C))return C.toString();const p=C.toFixed(10);let b=p.length-1;if(p[b]!=="0")return p;do b--;while(p[b]==="0");return p.substring(0,p[b]==="."?b:b+1)}function v(C){if(C[4]===0&&C[5]===0){if(C[1]===0&&C[2]===0)return C[0]===1&&C[3]===1?"":`scale(${a(C[0])} ${a(C[3])})`;if(C[0]===C[3]&&C[1]===-C[2]){const p=Math.acos(C[0])*180/Math.PI;return`rotate(${a(p)})`}}else if(C[0]===1&&C[1]===0&&C[2]===0&&C[3]===1)return`translate(${a(C[4])} ${a(C[5])})`;return`matrix(${a(C[0])} ${a(C[1])} ${a(C[2])} ${a(C[3])} ${a(C[4])} ${a(C[5])})`}let A=0,T=0,d=0;class i{constructor(p,b,F=!1){(0,ft.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new ft.DOMSVGFactory,this.current=new t,this.transformMatrix=At.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=p,this.objs=b,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!F,this._operatorIdMapping=[];for(const u in At.OPS)this._operatorIdMapping[At.OPS[u]]=u}getObject(p,b=null){return typeof p=="string"?p.startsWith("g_")?this.commonObjs.get(p):this.objs.get(p):b}save(){this.transformStack.push(this.transformMatrix);const p=this.current;this.extraStack.push(p),this.current=p.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(p){this.save(),this.executeOpTree(p),this.restore()}loadDependencies(p){const b=p.fnArray,F=p.argsArray;for(let u=0,l=b.length;u{N.get(y,$)});this.current.dependencies.push(U)}return Promise.all(this.current.dependencies)}transform(p,b,F,u,l,y){const N=[p,b,F,u,l,y];this.transformMatrix=At.Util.transform(this.transformMatrix,N),this.tgrp=null}getSVG(p,b){this.viewport=b;const F=this._initialize(b);return this.loadDependencies(p).then(()=>(this.transformMatrix=At.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(p)),F))}convertOpList(p){const b=this._operatorIdMapping,F=p.argsArray,u=p.fnArray,l=[];for(let y=0,N=u.length;y0&&(this.current.lineWidth=p)}setLineCap(p){this.current.lineCap=Z[p]}setLineJoin(p){this.current.lineJoin=n[p]}setMiterLimit(p){this.current.miterLimit=p}setStrokeAlpha(p){this.current.strokeAlpha=p}setStrokeRGBColor(p,b,F){this.current.strokeColor=At.Util.makeHexColor(p,b,F)}setFillAlpha(p){this.current.fillAlpha=p}setFillRGBColor(p,b,F){this.current.fillColor=At.Util.makeHexColor(p,b,F),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(p){this.current.strokeColor=this._makeColorN_Pattern(p)}setFillColorN(p){this.current.fillColor=this._makeColorN_Pattern(p)}shadingFill(p){const{width:b,height:F}=this.viewport,u=At.Util.inverseTransform(this.transformMatrix),[l,y,N,U]=At.Util.getAxialAlignedBoundingBox([0,0,b,F],u),$=this.svgFactory.createElement("svg:rect");$.setAttributeNS(null,"x",l),$.setAttributeNS(null,"y",y),$.setAttributeNS(null,"width",N-l),$.setAttributeNS(null,"height",U-y),$.setAttributeNS(null,"fill",this._makeShadingPattern(p)),this.current.fillAlpha<1&&$.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append($)}_makeColorN_Pattern(p){return p[0]==="TilingPattern"?this._makeTilingPattern(p):this._makeShadingPattern(p)}_makeTilingPattern(p){const b=p[1],F=p[2],u=p[3]||At.IDENTITY_MATRIX,[l,y,N,U]=p[4],$=p[5],P=p[6],R=p[7],o=`shading${d++}`,[g,x,E,D]=At.Util.normalizeRect([...At.Util.applyTransform([l,y],u),...At.Util.applyTransform([N,U],u)]),[q,W]=At.Util.singularValueDecompose2dScale(u),w=$*q,s=P*W,c=this.svgFactory.createElement("svg:pattern");c.setAttributeNS(null,"id",o),c.setAttributeNS(null,"patternUnits","userSpaceOnUse"),c.setAttributeNS(null,"width",w),c.setAttributeNS(null,"height",s),c.setAttributeNS(null,"x",`${g}`),c.setAttributeNS(null,"y",`${x}`);const S=this.svg,h=this.transformMatrix,m=this.current.fillColor,k=this.current.strokeColor,I=this.svgFactory.create(E-g,D-x);if(this.svg=I,this.transformMatrix=u,R===2){const B=At.Util.makeHexColor(...b);this.current.fillColor=B,this.current.strokeColor=B}return this.executeOpTree(this.convertOpList(F)),this.svg=S,this.transformMatrix=h,this.current.fillColor=m,this.current.strokeColor=k,c.append(I.childNodes[0]),this.defs.append(c),`url(#${o})`}_makeShadingPattern(p){switch(typeof p=="string"&&(p=this.objs.get(p)),p[0]){case"RadialAxial":const b=`shading${d++}`,F=p[3];let u;switch(p[1]){case"axial":const l=p[4],y=p[5];u=this.svgFactory.createElement("svg:linearGradient"),u.setAttributeNS(null,"id",b),u.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),u.setAttributeNS(null,"x1",l[0]),u.setAttributeNS(null,"y1",l[1]),u.setAttributeNS(null,"x2",y[0]),u.setAttributeNS(null,"y2",y[1]);break;case"radial":const N=p[4],U=p[5],$=p[6],P=p[7];u=this.svgFactory.createElement("svg:radialGradient"),u.setAttributeNS(null,"id",b),u.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),u.setAttributeNS(null,"cx",U[0]),u.setAttributeNS(null,"cy",U[1]),u.setAttributeNS(null,"r",P),u.setAttributeNS(null,"fx",N[0]),u.setAttributeNS(null,"fy",N[1]),u.setAttributeNS(null,"fr",$);break;default:throw new Error(`Unknown RadialAxial type: ${p[1]}`)}for(const l of F){const y=this.svgFactory.createElement("svg:stop");y.setAttributeNS(null,"offset",l[0]),y.setAttributeNS(null,"stop-color",l[1]),u.append(y)}return this.defs.append(u),`url(#${b})`;case"Mesh":return(0,At.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${p[0]}`)}}setDash(p,b){this.current.dashArray=p,this.current.dashPhase=b}constructPath(p,b){const F=this.current;let u=F.x,l=F.y,y=[],N=0;for(const U of p)switch(U|0){case At.OPS.rectangle:u=b[N++],l=b[N++];const $=b[N++],P=b[N++],R=u+$,o=l+P;y.push("M",a(u),a(l),"L",a(R),a(l),"L",a(R),a(o),"L",a(u),a(o),"Z");break;case At.OPS.moveTo:u=b[N++],l=b[N++],y.push("M",a(u),a(l));break;case At.OPS.lineTo:u=b[N++],l=b[N++],y.push("L",a(u),a(l));break;case At.OPS.curveTo:u=b[N+4],l=b[N+5],y.push("C",a(b[N]),a(b[N+1]),a(b[N+2]),a(b[N+3]),a(u),a(l)),N+=6;break;case At.OPS.curveTo2:y.push("C",a(u),a(l),a(b[N]),a(b[N+1]),a(b[N+2]),a(b[N+3])),u=b[N+2],l=b[N+3],N+=4;break;case At.OPS.curveTo3:u=b[N+2],l=b[N+3],y.push("C",a(b[N]),a(b[N+1]),a(u),a(l),a(u),a(l)),N+=4;break;case At.OPS.closePath:y.push("Z");break}y=y.join(" "),F.path&&p.length>0&&p[0]!==At.OPS.rectangle&&p[0]!==At.OPS.moveTo?y=F.path.getAttributeNS(null,"d")+y:(F.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(F.path)),F.path.setAttributeNS(null,"d",y),F.path.setAttributeNS(null,"fill","none"),F.element=F.path,F.setCurrentPoint(u,l)}endPath(){const p=this.current;if(p.path=null,!this.pendingClip)return;if(!p.element){this.pendingClip=null;return}const b=`clippath${A++}`,F=this.svgFactory.createElement("svg:clipPath");F.setAttributeNS(null,"id",b),F.setAttributeNS(null,"transform",v(this.transformMatrix));const u=p.element.cloneNode(!0);if(this.pendingClip==="evenodd"?u.setAttributeNS(null,"clip-rule","evenodd"):u.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,F.append(u),this.defs.append(F),p.activeClipUrl){p.clipGroup=null;for(const l of this.extraStack)l.clipGroup=null;F.setAttributeNS(null,"clip-path",p.activeClipUrl)}p.activeClipUrl=`url(#${b})`,this.tgrp=null}clip(p){this.pendingClip=p}closePath(){const p=this.current;if(p.path){const b=`${p.path.getAttributeNS(null,"d")}Z`;p.path.setAttributeNS(null,"d",b)}}setLeading(p){this.current.leading=-p}setTextRise(p){this.current.textRise=p}setTextRenderingMode(p){this.current.textRenderingMode=p}setHScale(p){this.current.textHScale=p/100}setRenderingIntent(p){}setFlatness(p){}setGState(p){for(const[b,F]of p)switch(b){case"LW":this.setLineWidth(F);break;case"LC":this.setLineCap(F);break;case"LJ":this.setLineJoin(F);break;case"ML":this.setMiterLimit(F);break;case"D":this.setDash(F[0],F[1]);break;case"RI":this.setRenderingIntent(F);break;case"FL":this.setFlatness(F);break;case"Font":this.setFont(F);break;case"CA":this.setStrokeAlpha(F);break;case"ca":this.setFillAlpha(F);break;default:(0,At.warn)(`Unimplemented graphic state operator ${b}`);break}}fill(){const p=this.current;p.element&&(p.element.setAttributeNS(null,"fill",p.fillColor),p.element.setAttributeNS(null,"fill-opacity",p.fillAlpha),this.endPath())}stroke(){const p=this.current;p.element&&(this._setStrokeAttributes(p.element),p.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(p,b=1){const F=this.current;let u=F.dashArray;b!==1&&u.length>0&&(u=u.map(function(l){return b*l})),p.setAttributeNS(null,"stroke",F.strokeColor),p.setAttributeNS(null,"stroke-opacity",F.strokeAlpha),p.setAttributeNS(null,"stroke-miterlimit",a(F.miterLimit)),p.setAttributeNS(null,"stroke-linecap",F.lineCap),p.setAttributeNS(null,"stroke-linejoin",F.lineJoin),p.setAttributeNS(null,"stroke-width",a(b*F.lineWidth)+"px"),p.setAttributeNS(null,"stroke-dasharray",u.map(a).join(" ")),p.setAttributeNS(null,"stroke-dashoffset",a(b*F.dashPhase)+"px")}eoFill(){var p;(p=this.current.element)==null||p.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){var p;(p=this.current.element)==null||p.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const p=this.svgFactory.createElement("svg:rect");p.setAttributeNS(null,"x","0"),p.setAttributeNS(null,"y","0"),p.setAttributeNS(null,"width","1px"),p.setAttributeNS(null,"height","1px"),p.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(p)}paintImageXObject(p){const b=this.getObject(p);if(!b){(0,At.warn)(`Dependent image with object ID ${p} is not ready yet`);return}this.paintInlineImageXObject(b)}paintInlineImageXObject(p,b){const F=p.width,u=p.height,l=L(p,this.forceDataSchema,!!b),y=this.svgFactory.createElement("svg:rect");y.setAttributeNS(null,"x","0"),y.setAttributeNS(null,"y","0"),y.setAttributeNS(null,"width",a(F)),y.setAttributeNS(null,"height",a(u)),this.current.element=y,this.clip("nonzero");const N=this.svgFactory.createElement("svg:image");N.setAttributeNS(M,"xlink:href",l),N.setAttributeNS(null,"x","0"),N.setAttributeNS(null,"y",a(-u)),N.setAttributeNS(null,"width",a(F)+"px"),N.setAttributeNS(null,"height",a(u)+"px"),N.setAttributeNS(null,"transform",`scale(${a(1/F)} ${a(-1/u)})`),b?b.append(N):this._ensureTransformGroup().append(N)}paintImageMaskXObject(p){const b=this.getObject(p.data,p);if(b.bitmap){(0,At.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");return}const F=this.current,u=b.width,l=b.height,y=F.fillColor;F.maskId=`mask${T++}`;const N=this.svgFactory.createElement("svg:mask");N.setAttributeNS(null,"id",F.maskId);const U=this.svgFactory.createElement("svg:rect");U.setAttributeNS(null,"x","0"),U.setAttributeNS(null,"y","0"),U.setAttributeNS(null,"width",a(u)),U.setAttributeNS(null,"height",a(l)),U.setAttributeNS(null,"fill",y),U.setAttributeNS(null,"mask",`url(#${F.maskId})`),this.defs.append(N),this._ensureTransformGroup().append(U),this.paintInlineImageXObject(b,N)}paintFormXObjectBegin(p,b){if(Array.isArray(p)&&p.length===6&&this.transform(p[0],p[1],p[2],p[3],p[4],p[5]),b){const F=b[2]-b[0],u=b[3]-b[1],l=this.svgFactory.createElement("svg:rect");l.setAttributeNS(null,"x",b[0]),l.setAttributeNS(null,"y",b[1]),l.setAttributeNS(null,"width",a(F)),l.setAttributeNS(null,"height",a(u)),this.current.element=l,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(p){const b=this.svgFactory.create(p.width,p.height),F=this.svgFactory.createElement("svg:defs");b.append(F),this.defs=F;const u=this.svgFactory.createElement("svg:g");return u.setAttributeNS(null,"transform",v(p.transform)),b.append(u),this.svg=u,b}_ensureClipGroup(){if(!this.current.clipGroup){const p=this.svgFactory.createElement("svg:g");p.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(p),this.current.clipGroup=p}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",v(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}dt.SVGGraphics=i},(Ot,dt)=>{Object.defineProperty(dt,"__esModule",{value:!0}),dt.XfaText=void 0;class Mt{static textContent(At){const $t=[],vt={items:$t,styles:Object.create(null)};function M(Z){var L;if(!Z)return;let n=null;const _=Z.name;if(_==="#text")n=Z.value;else if(Mt.shouldBuildText(_))(L=Z==null?void 0:Z.attributes)!=null&&L.textContent?n=Z.attributes.textContent:Z.value&&(n=Z.value);else return;if(n!==null&&$t.push({str:n}),!!Z.children)for(const t of Z.children)M(t)}return M(At),vt}static shouldBuildText(At){return!(At==="textarea"||At==="input"||At==="option"||At==="select")}}dt.XfaText=Mt},(Ot,dt,Mt)=>{Object.defineProperty(dt,"__esModule",{value:!0}),dt.TextLayerRenderTask=void 0,dt.renderTextLayer=v,dt.updateTextLayer=A;var ft=Mt(1),At=Mt(6);const $t=1e5,vt=30,M=.8,Z=new Map;function n(T,d){let i;if(d&&ft.FeatureTest.isOffscreenCanvasSupported)i=new OffscreenCanvas(T,T).getContext("2d",{alpha:!1});else{const C=document.createElement("canvas");C.width=C.height=T,i=C.getContext("2d",{alpha:!1})}return i}function _(T,d){const i=Z.get(T);if(i)return i;const C=n(vt,d);C.font=`${vt}px ${T}`;const p=C.measureText("");let b=p.fontBoundingBoxAscent,F=Math.abs(p.fontBoundingBoxDescent);if(b){const l=b/(b+F);return Z.set(T,l),C.canvas.width=C.canvas.height=0,l}C.strokeStyle="red",C.clearRect(0,0,vt,vt),C.strokeText("g",0,0);let u=C.getImageData(0,0,vt,vt).data;F=0;for(let l=u.length-1-3;l>=0;l-=4)if(u[l]>0){F=Math.ceil(l/4/vt);break}C.clearRect(0,0,vt,vt),C.strokeText("A",0,vt),u=C.getImageData(0,0,vt,vt).data,b=0;for(let l=0,y=u.length;l0){b=vt-Math.floor(l/4/vt);break}if(C.canvas.width=C.canvas.height=0,b){const l=b/(b+F);return Z.set(T,l),l}return Z.set(T,M),M}function L(T,d,i){const C=document.createElement("span"),p={angle:0,canvasWidth:0,hasText:d.str!=="",hasEOL:d.hasEOL,fontSize:0};T._textDivs.push(C);const b=ft.Util.transform(T._transform,d.transform);let F=Math.atan2(b[1],b[0]);const u=i[d.fontName];u.vertical&&(F+=Math.PI/2);const l=Math.hypot(b[2],b[3]),y=l*_(u.fontFamily,T._isOffscreenCanvasSupported);let N,U;F===0?(N=b[4],U=b[5]-y):(N=b[4]+y*Math.sin(F),U=b[5]-y*Math.cos(F));const $="calc(var(--scale-factor)*",P=C.style;T._container===T._rootContainer?(P.left=`${(100*N/T._pageWidth).toFixed(2)}%`,P.top=`${(100*U/T._pageHeight).toFixed(2)}%`):(P.left=`${$}${N.toFixed(2)}px)`,P.top=`${$}${U.toFixed(2)}px)`),P.fontSize=`${$}${l.toFixed(2)}px)`,P.fontFamily=u.fontFamily,p.fontSize=l,C.setAttribute("role","presentation"),C.textContent=d.str,C.dir=d.dir,T._fontInspectorEnabled&&(C.dataset.fontName=d.fontName),F!==0&&(p.angle=F*(180/Math.PI));let R=!1;if(d.str.length>1)R=!0;else if(d.str!==" "&&d.transform[0]!==d.transform[3]){const o=Math.abs(d.transform[0]),g=Math.abs(d.transform[3]);o!==g&&Math.max(o,g)/Math.min(o,g)>1.5&&(R=!0)}R&&(p.canvasWidth=u.vertical?d.height:d.width),T._textDivProperties.set(C,p),T._isReadableStream&&T._layoutText(C)}function t(T){const{div:d,scale:i,properties:C,ctx:p,prevFontSize:b,prevFontFamily:F}=T,{style:u}=d;let l="";if(C.canvasWidth!==0&&C.hasText){const{fontFamily:y}=u,{canvasWidth:N,fontSize:U}=C;(b!==U||F!==y)&&(p.font=`${U*i}px ${y}`,T.prevFontSize=U,T.prevFontFamily=y);const{width:$}=p.measureText(d.textContent);$>0&&(l=`scaleX(${N*i/$})`)}C.angle!==0&&(l=`rotate(${C.angle}deg) ${l}`),l.length>0&&(u.transform=l)}function e(T){if(T._canceled)return;const d=T._textDivs,i=T._capability;if(d.length>$t){i.resolve();return}if(!T._isReadableStream)for(const p of d)T._layoutText(p);i.resolve()}class a{constructor({textContentSource:d,container:i,viewport:C,textDivs:p,textDivProperties:b,textContentItemsStr:F,isOffscreenCanvasSupported:u}){var $;this._textContentSource=d,this._isReadableStream=d instanceof ReadableStream,this._container=this._rootContainer=i,this._textDivs=p||[],this._textContentItemsStr=F||[],this._isOffscreenCanvasSupported=u,this._fontInspectorEnabled=!!(($=globalThis.FontInspector)!=null&&$.enabled),this._reader=null,this._textDivProperties=b||new WeakMap,this._canceled=!1,this._capability=new ft.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:C.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:n(0,u)};const{pageWidth:l,pageHeight:y,pageX:N,pageY:U}=C.rawDims;this._transform=[1,0,0,-1,-N,U+y],this._pageWidth=l,this._pageHeight=y,(0,At.setLayerDimensions)(i,C),this._capability.promise.finally(()=>{this._layoutTextParams=null}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new ft.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),this._capability.reject(new ft.AbortException("TextLayer task cancelled."))}_processItems(d,i){for(const C of d){if(C.str===void 0){if(C.type==="beginMarkedContentProps"||C.type==="beginMarkedContent"){const p=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),C.id!==null&&this._container.setAttribute("id",`${C.id}`),p.append(this._container)}else C.type==="endMarkedContent"&&(this._container=this._container.parentNode);continue}this._textContentItemsStr.push(C.str),L(this,C,i)}}_layoutText(d){const i=this._layoutTextParams.properties=this._textDivProperties.get(d);if(this._layoutTextParams.div=d,t(this._layoutTextParams),i.hasText&&this._container.append(d),i.hasEOL){const C=document.createElement("br");C.setAttribute("role","presentation"),this._container.append(C)}}_render(){const d=new ft.PromiseCapability;let i=Object.create(null);if(this._isReadableStream){const C=()=>{this._reader.read().then(({value:p,done:b})=>{if(b){d.resolve();return}Object.assign(i,p.styles),this._processItems(p.items,i),C()},d.reject)};this._reader=this._textContentSource.getReader(),C()}else if(this._textContentSource){const{items:C,styles:p}=this._textContentSource;this._processItems(C,p),d.resolve()}else throw new Error('No "textContentSource" parameter specified.');d.promise.then(()=>{i=null,e(this)},this._capability.reject)}}dt.TextLayerRenderTask=a;function v(T){!T.textContentSource&&(T.textContent||T.textContentStream)&&((0,At.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),T.textContentSource=T.textContent||T.textContentStream);const{container:d,viewport:i}=T,C=getComputedStyle(d),p=C.getPropertyValue("visibility"),b=parseFloat(C.getPropertyValue("--scale-factor"));p==="visible"&&(!b||Math.abs(b-i.scale)>1e-5)&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM.");const F=new a(T);return F._render(),F}function A({container:T,viewport:d,textDivs:i,textDivProperties:C,isOffscreenCanvasSupported:p,mustRotate:b=!0,mustRescale:F=!0}){if(b&&(0,At.setLayerDimensions)(T,{rotation:d.rotation}),F){const u=n(0,p),y={prevFontSize:null,prevFontFamily:null,div:null,scale:d.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:u};for(const N of i)y.properties=C.get(N),y.div=N,t(y)}}},(Ot,dt,Mt)=>{var _,L,t,e,a,v,A,T,d,i,C,Ei,b,kn,u,Pi,y,Oi;Object.defineProperty(dt,"__esModule",{value:!0}),dt.AnnotationEditorLayer=void 0;var ft=Mt(1),At=Mt(4),$t=Mt(28),vt=Mt(33),M=Mt(6),Z=Mt(34);const U=class U{constructor({uiManager:P,pageIndex:R,div:o,accessibilityManager:g,annotationLayer:x,viewport:E,l10n:D}){_t(this,C);_t(this,b);_t(this,u);_t(this,y);_t(this,_,void 0);_t(this,L,!1);_t(this,t,null);_t(this,e,this.pointerup.bind(this));_t(this,a,this.pointerdown.bind(this));_t(this,v,new Map);_t(this,A,!1);_t(this,T,!1);_t(this,d,!1);_t(this,i,void 0);const q=[$t.FreeTextEditor,vt.InkEditor,Z.StampEditor];if(!U._initialized){U._initialized=!0;for(const W of q)W.initialize(D)}P.registerEditorTypes(q),Ht(this,i,P),this.pageIndex=R,this.div=o,Ht(this,_,g),Ht(this,t,x),this.viewport=E,ot(this,i).addLayer(this)}get isEmpty(){return ot(this,v).size===0}updateToolbar(P){ot(this,i).updateToolbar(P)}updateMode(P=ot(this,i).getMode()){Lt(this,y,Oi).call(this),P===ft.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),P!==ft.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",P===ft.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",P===ft.AnnotationEditorType.INK),this.div.classList.toggle("stampEditing",P===ft.AnnotationEditorType.STAMP),this.div.hidden=!1)}addInkEditorIfNeeded(P){if(!P&&ot(this,i).getMode()!==ft.AnnotationEditorType.INK)return;if(!P){for(const o of ot(this,v).values())if(o.isEmpty()){o.setInBackground();return}}Lt(this,b,kn).call(this,{offsetX:0,offsetY:0},!1).setInBackground()}setEditingState(P){ot(this,i).setEditingState(P)}addCommands(P){ot(this,i).addCommands(P)}enable(){this.div.style.pointerEvents="auto";const P=new Set;for(const o of ot(this,v).values())o.enableEditing(),o.annotationElementId&&P.add(o.annotationElementId);if(!ot(this,t))return;const R=ot(this,t).getEditableAnnotations();for(const o of R){if(o.hide(),ot(this,i).isDeletedAnnotationElement(o.data.id)||P.has(o.data.id))continue;const g=this.deserialize(o);g&&(this.addOrRebuild(g),g.enableEditing())}}disable(){var R;Ht(this,d,!0),this.div.style.pointerEvents="none";const P=new Set;for(const o of ot(this,v).values()){if(o.disableEditing(),!o.annotationElementId||o.serialize()!==null){P.add(o.annotationElementId);continue}(R=this.getEditableAnnotation(o.annotationElementId))==null||R.show(),o.remove()}if(ot(this,t)){const o=ot(this,t).getEditableAnnotations();for(const g of o){const{id:x}=g.data;P.has(x)||ot(this,i).isDeletedAnnotationElement(x)||g.show()}}Lt(this,y,Oi).call(this),this.isEmpty&&(this.div.hidden=!0),Ht(this,d,!1)}getEditableAnnotation(P){var R;return((R=ot(this,t))==null?void 0:R.getEditableAnnotation(P))||null}setActiveEditor(P){ot(this,i).getActive()!==P&&ot(this,i).setActiveEditor(P)}enableClick(){this.div.addEventListener("pointerdown",ot(this,a)),this.div.addEventListener("pointerup",ot(this,e))}disableClick(){this.div.removeEventListener("pointerdown",ot(this,a)),this.div.removeEventListener("pointerup",ot(this,e))}attach(P){ot(this,v).set(P.id,P);const{annotationElementId:R}=P;R&&ot(this,i).isDeletedAnnotationElement(R)&&ot(this,i).removeDeletedAnnotationElement(P)}detach(P){var R;ot(this,v).delete(P.id),(R=ot(this,_))==null||R.removePointerInTextLayer(P.contentDiv),!ot(this,d)&&P.annotationElementId&&ot(this,i).addDeletedAnnotationElement(P)}remove(P){this.detach(P),ot(this,i).removeEditor(P),P.div.contains(document.activeElement)&&setTimeout(()=>{ot(this,i).focusMainContainer()},0),P.div.remove(),P.isAttachedToDOM=!1,ot(this,T)||this.addInkEditorIfNeeded(!1)}changeParent(P){var R;P.parent!==this&&(P.annotationElementId&&(ot(this,i).addDeletedAnnotationElement(P.annotationElementId),At.AnnotationEditor.deleteAnnotationElement(P),P.annotationElementId=null),this.attach(P),(R=P.parent)==null||R.detach(P),P.setParent(this),P.div&&P.isAttachedToDOM&&(P.div.remove(),this.div.append(P.div)))}add(P){if(this.changeParent(P),ot(this,i).addEditor(P),this.attach(P),!P.isAttachedToDOM){const R=P.render();this.div.append(R),P.isAttachedToDOM=!0}P.fixAndSetPosition(),P.onceAdded(),ot(this,i).addToAnnotationStorage(P)}moveEditorInDOM(P){var o;if(!P.isAttachedToDOM)return;const{activeElement:R}=document;P.div.contains(R)&&(P._focusEventsAllowed=!1,setTimeout(()=>{P.div.contains(document.activeElement)?P._focusEventsAllowed=!0:(P.div.addEventListener("focusin",()=>{P._focusEventsAllowed=!0},{once:!0}),R.focus())},0)),P._structTreeParentId=(o=ot(this,_))==null?void 0:o.moveElementInDOM(this.div,P.div,P.contentDiv,!0)}addOrRebuild(P){P.needsToBeRebuilt()?P.rebuild():this.add(P)}addUndoableEditor(P){const R=()=>P._uiManager.rebuild(P),o=()=>{P.remove()};this.addCommands({cmd:R,undo:o,mustExec:!1})}getNextId(){return ot(this,i).getId()}pasteEditor(P,R){ot(this,i).updateToolbar(P),ot(this,i).updateMode(P);const{offsetX:o,offsetY:g}=Lt(this,u,Pi).call(this),x=this.getNextId(),E=Lt(this,C,Ei).call(this,{parent:this,id:x,x:o,y:g,uiManager:ot(this,i),isCentered:!0,...R});E&&this.add(E)}deserialize(P){switch(P.annotationType??P.annotationEditorType){case ft.AnnotationEditorType.FREETEXT:return $t.FreeTextEditor.deserialize(P,this,ot(this,i));case ft.AnnotationEditorType.INK:return vt.InkEditor.deserialize(P,this,ot(this,i));case ft.AnnotationEditorType.STAMP:return Z.StampEditor.deserialize(P,this,ot(this,i))}return null}addNewEditor(){Lt(this,b,kn).call(this,Lt(this,u,Pi).call(this),!0)}setSelected(P){ot(this,i).setSelected(P)}toggleSelected(P){ot(this,i).toggleSelected(P)}isSelected(P){return ot(this,i).isSelected(P)}unselect(P){ot(this,i).unselect(P)}pointerup(P){const{isMac:R}=ft.FeatureTest.platform;if(!(P.button!==0||P.ctrlKey&&R)&&P.target===this.div&&ot(this,A)){if(Ht(this,A,!1),!ot(this,L)){Ht(this,L,!0);return}if(ot(this,i).getMode()===ft.AnnotationEditorType.STAMP){ot(this,i).unselectAll();return}Lt(this,b,kn).call(this,P,!1)}}pointerdown(P){if(ot(this,A)){Ht(this,A,!1);return}const{isMac:R}=ft.FeatureTest.platform;if(P.button!==0||P.ctrlKey&&R||P.target!==this.div)return;Ht(this,A,!0);const o=ot(this,i).getActive();Ht(this,L,!o||o.isEmpty())}findNewParent(P,R,o){const g=ot(this,i).findParent(R,o);return g===null||g===this?!1:(g.changeParent(P),!0)}destroy(){var P,R;((P=ot(this,i).getActive())==null?void 0:P.parent)===this&&(ot(this,i).commitOrRemove(),ot(this,i).setActiveEditor(null));for(const o of ot(this,v).values())(R=ot(this,_))==null||R.removePointerInTextLayer(o.contentDiv),o.setParent(null),o.isAttachedToDOM=!1,o.div.remove();this.div=null,ot(this,v).clear(),ot(this,i).removeLayer(this)}render({viewport:P}){this.viewport=P,(0,M.setLayerDimensions)(this.div,P);for(const R of ot(this,i).getEditors(this.pageIndex))this.add(R);this.updateMode()}update({viewport:P}){ot(this,i).commitOrRemove(),this.viewport=P,(0,M.setLayerDimensions)(this.div,{rotation:P.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:P,pageHeight:R}=this.viewport.rawDims;return[P,R]}};_=new WeakMap,L=new WeakMap,t=new WeakMap,e=new WeakMap,a=new WeakMap,v=new WeakMap,A=new WeakMap,T=new WeakMap,d=new WeakMap,i=new WeakMap,C=new WeakSet,Ei=function(P){switch(ot(this,i).getMode()){case ft.AnnotationEditorType.FREETEXT:return new $t.FreeTextEditor(P);case ft.AnnotationEditorType.INK:return new vt.InkEditor(P);case ft.AnnotationEditorType.STAMP:return new Z.StampEditor(P)}return null},b=new WeakSet,kn=function(P,R){const o=this.getNextId(),g=Lt(this,C,Ei).call(this,{parent:this,id:o,x:P.offsetX,y:P.offsetY,uiManager:ot(this,i),isCentered:R});return g&&this.add(g),g},u=new WeakSet,Pi=function(){const{x:P,y:R,width:o,height:g}=this.div.getBoundingClientRect(),x=Math.max(0,P),E=Math.max(0,R),D=Math.min(window.innerWidth,P+o),q=Math.min(window.innerHeight,R+g),W=(x+D)/2-P,w=(E+q)/2-R,[s,c]=this.viewport.rotation%180===0?[W,w]:[w,W];return{offsetX:s,offsetY:c}},y=new WeakSet,Oi=function(){Ht(this,T,!0);for(const P of ot(this,v).values())P.isEmpty()&&P.remove();Ht(this,T,!1)},ye(U,"_initialized",!1);let n=U;dt.AnnotationEditorLayer=n},(Ot,dt,Mt)=>{var Z,n,_,L,t,e,a,v,A,T,ur,i,dr,p,fr,F,hn,l,_i,N,pr,$,Ii;Object.defineProperty(dt,"__esModule",{value:!0}),dt.FreeTextEditor=void 0;var ft=Mt(1),At=Mt(5),$t=Mt(4),vt=Mt(29);const R=class R extends $t.AnnotationEditor{constructor(x){super({...x,name:"freeTextEditor"});_t(this,T);_t(this,i);_t(this,p);_t(this,F);_t(this,l);_t(this,N);_t(this,$);_t(this,Z,this.editorDivBlur.bind(this));_t(this,n,this.editorDivFocus.bind(this));_t(this,_,this.editorDivInput.bind(this));_t(this,L,this.editorDivKeydown.bind(this));_t(this,t,void 0);_t(this,e,"");_t(this,a,`${this.id}-editor`);_t(this,v,void 0);_t(this,A,null);Ht(this,t,x.color||R._defaultColor||$t.AnnotationEditor._defaultLineColor),Ht(this,v,x.fontSize||R._defaultFontSize)}static get _keyboardManager(){const x=R.prototype,E=W=>W.isEmpty(),D=At.AnnotationEditorUIManager.TRANSLATE_SMALL,q=At.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,ft.shadow)(this,"_keyboardManager",new At.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],x.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],x.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],x._translateEmpty,{args:[-D,0],checker:E}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],x._translateEmpty,{args:[-q,0],checker:E}],[["ArrowRight","mac+ArrowRight"],x._translateEmpty,{args:[D,0],checker:E}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],x._translateEmpty,{args:[q,0],checker:E}],[["ArrowUp","mac+ArrowUp"],x._translateEmpty,{args:[0,-D],checker:E}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],x._translateEmpty,{args:[0,-q],checker:E}],[["ArrowDown","mac+ArrowDown"],x._translateEmpty,{args:[0,D],checker:E}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],x._translateEmpty,{args:[0,q],checker:E}]]))}static initialize(x){$t.AnnotationEditor.initialize(x,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});const E=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(E.getPropertyValue("--freetext-padding"))}static updateDefaultParams(x,E){switch(x){case ft.AnnotationEditorParamsType.FREETEXT_SIZE:R._defaultFontSize=E;break;case ft.AnnotationEditorParamsType.FREETEXT_COLOR:R._defaultColor=E;break}}updateParams(x,E){switch(x){case ft.AnnotationEditorParamsType.FREETEXT_SIZE:Lt(this,T,ur).call(this,E);break;case ft.AnnotationEditorParamsType.FREETEXT_COLOR:Lt(this,i,dr).call(this,E);break}}static get defaultPropertiesToUpdate(){return[[ft.AnnotationEditorParamsType.FREETEXT_SIZE,R._defaultFontSize],[ft.AnnotationEditorParamsType.FREETEXT_COLOR,R._defaultColor||$t.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[ft.AnnotationEditorParamsType.FREETEXT_SIZE,ot(this,v)],[ft.AnnotationEditorParamsType.FREETEXT_COLOR,ot(this,t)]]}_translateEmpty(x,E){this._uiManager.translateSelectedEditors(x,E,!0)}getInitialTranslation(){const x=this.parentScale;return[-R._internalPadding*x,-(R._internalPadding+ot(this,v))*x]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(ft.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",ot(this,L)),this.editorDiv.addEventListener("focus",ot(this,n)),this.editorDiv.addEventListener("blur",ot(this,Z)),this.editorDiv.addEventListener("input",ot(this,_)))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",ot(this,a)),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",ot(this,L)),this.editorDiv.removeEventListener("focus",ot(this,n)),this.editorDiv.removeEventListener("blur",ot(this,Z)),this.editorDiv.removeEventListener("input",ot(this,_)),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(x){this._focusEventsAllowed&&(super.focusin(x),x.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(){var x;if(this.width){Lt(this,$,Ii).call(this);return}this.enableEditMode(),this.editorDiv.focus(),(x=this._initialOptions)!=null&&x.isCentered&&this.center(),this._initialOptions=null}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing")),super.remove()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const x=ot(this,e),E=Ht(this,e,Lt(this,p,fr).call(this).trimEnd());if(x===E)return;const D=q=>{if(Ht(this,e,q),!q){this.remove();return}Lt(this,l,_i).call(this),this._uiManager.rebuild(this),Lt(this,F,hn).call(this)};this.addCommands({cmd:()=>{D(E)},undo:()=>{D(x)},mustExec:!1}),Lt(this,F,hn).call(this)}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(x){this.enterInEditMode()}keydown(x){x.target===this.div&&x.key==="Enter"&&(this.enterInEditMode(),x.preventDefault())}editorDivKeydown(x){R._keyboardManager.exec(this,x)}editorDivFocus(x){this.isEditing=!0}editorDivBlur(x){this.isEditing=!1}editorDivInput(x){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let x,E;this.width&&(x=this.x,E=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",ot(this,a)),this.enableEditing(),$t.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then(q=>{var W;return(W=this.editorDiv)==null?void 0:W.setAttribute("aria-label",q)}),$t.AnnotationEditor._l10nPromise.get("free_text2_default_content").then(q=>{var W;return(W=this.editorDiv)==null?void 0:W.setAttribute("default-content",q)}),this.editorDiv.contentEditable=!0;const{style:D}=this.editorDiv;if(D.fontSize=`calc(${ot(this,v)}px * var(--scale-factor))`,D.color=ot(this,t),this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,At.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[q,W]=this.parentDimensions;if(this.annotationElementId){const{position:w}=ot(this,A);let[s,c]=this.getInitialTranslation();[s,c]=this.pageTranslationToScreen(s,c);const[S,h]=this.pageDimensions,[m,k]=this.pageTranslation;let I,B;switch(this.rotation){case 0:I=x+(w[0]-m)/S,B=E+this.height-(w[1]-k)/h;break;case 90:I=x+(w[0]-m)/S,B=E-(w[1]-k)/h,[s,c]=[c,-s];break;case 180:I=x-this.width+(w[0]-m)/S,B=E-(w[1]-k)/h,[s,c]=[-s,-c];break;case 270:I=x+(w[0]-m-this.height*h)/S,B=E+(w[1]-k-this.width*S)/h,[s,c]=[-c,s];break}this.setAt(I*q,B*W,s,c)}else this.setAt(x*q,E*W,this.width*q,this.height*W);Lt(this,l,_i).call(this),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}get contentDiv(){return this.editorDiv}static deserialize(x,E,D){let q=null;if(x instanceof vt.FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize:w,fontColor:s},rect:c,rotation:S,id:h},textContent:m,textPosition:k,parent:{page:{pageNumber:I}}}=x;if(!m||m.length===0)return null;q=x={annotationType:ft.AnnotationEditorType.FREETEXT,color:Array.from(s),fontSize:w,value:m.join(` diff --git a/admin-views/dist/assets/PdfViewer-DGseWEq9.js.gz b/admin-views/dist/assets/PdfViewer-DGseWEq9.js.gz new file mode 100644 index 00000000..5b872740 Binary files /dev/null and b/admin-views/dist/assets/PdfViewer-DGseWEq9.js.gz differ diff --git a/admin-views/dist/assets/RichText-BH3T08xi.js.gz b/admin-views/dist/assets/RichText-BH3T08xi.js.gz deleted file mode 100644 index baffdfb3..00000000 Binary files a/admin-views/dist/assets/RichText-BH3T08xi.js.gz and /dev/null differ diff --git a/admin-views/dist/assets/RichText-BH3T08xi.js b/admin-views/dist/assets/RichText-CAX6vY_y.js similarity index 99% rename from admin-views/dist/assets/RichText-BH3T08xi.js rename to admin-views/dist/assets/RichText-CAX6vY_y.js index 376a9cf8..89c44da2 100644 --- a/admin-views/dist/assets/RichText-BH3T08xi.js +++ b/admin-views/dist/assets/RichText-CAX6vY_y.js @@ -1,4 +1,4 @@ -import{q as ke,p as qe,t as Ge,v as je,H as Ze,R as We}from"./index-B4ouchdD.js";var Fe={exports:{}};/*! +import{q as ke,p as qe,t as Ge,v as je,H as Ze,R as We}from"./index-5zY5TMAp.js";var Fe={exports:{}};/*! * froala_editor v3.1.0 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2020 Froala Labs diff --git a/admin-views/dist/assets/RichText-CAX6vY_y.js.gz b/admin-views/dist/assets/RichText-CAX6vY_y.js.gz new file mode 100644 index 00000000..03a33412 Binary files /dev/null and b/admin-views/dist/assets/RichText-CAX6vY_y.js.gz differ diff --git a/admin-views/dist/assets/Tinymce-C3MQ9R1G.js.gz b/admin-views/dist/assets/Tinymce-C3MQ9R1G.js.gz deleted file mode 100644 index cd11f7f1..00000000 Binary files a/admin-views/dist/assets/Tinymce-C3MQ9R1G.js.gz and /dev/null differ diff --git a/admin-views/dist/assets/Tinymce-C3MQ9R1G.js b/admin-views/dist/assets/Tinymce-XRTkSsnQ.js similarity index 99% rename from admin-views/dist/assets/Tinymce-C3MQ9R1G.js rename to admin-views/dist/assets/Tinymce-XRTkSsnQ.js index 4a272303..a87034d8 100644 --- a/admin-views/dist/assets/Tinymce-C3MQ9R1G.js +++ b/admin-views/dist/assets/Tinymce-XRTkSsnQ.js @@ -1,4 +1,4 @@ -import{p as Gq,t as Kq,R as tZ,v as Yq,w as Xq,x as Jq,y as Qq,z as eG,D as nZ,G as tG,H as _q}from"./index-B4ouchdD.js";var Cq={exports:{}};(function(as){(function(){var So=function(e){if(e===null)return"null";if(e===void 0)return"undefined";var n=typeof e;return n==="object"&&(Array.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="Array")?"array":n==="object"&&(String.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="String")?"string":n},wo=function(e){return["undefined","boolean","number","string","function","xml","null"].indexOf(e)!==-1},Vn=function(e,n){var o=Array.prototype.slice.call(e);return o.sort(n)},co=function(e,n){return fo(function(o,r){return e.eq(n(o),n(r))})},fo=function(e){return{eq:e}},Bn=fo(function(e,n){return e===n}),Qe=Bn,mn=function(e){return fo(function(n,o){if(n.length!==o.length)return!1;for(var r=n.length,c=0;c{var r;return o(e,n.prototype)?!0:((r=e.constructor)===null||r===void 0?void 0:r.name)===n.name},Ht=e=>{const n=typeof e;return e===null?"null":n==="object"&&Array.isArray(e)?"array":n==="object"&&Wt(e,String,(o,r)=>r.isPrototypeOf(o))?"string":n},nn=e=>n=>Ht(n)===e,nt=e=>n=>typeof n===e,Dt=e=>n=>e===n,At=(e,n)=>Be(e)&&Wt(e,n,(o,r)=>un(o)===r),W=nn("string"),Be=nn("object"),Bo=e=>At(e,Object),mt=nn("array"),U=Dt(null),it=nt("boolean"),pn=Dt(void 0),on=e=>e==null,Ie=e=>!on(e),ae=nt("function"),po=nt("number"),Se=(e,n)=>{if(mt(e)){for(let o=0,r=e.length;o{},E=(e,n)=>(...o)=>e(n.apply(null,o)),rn=(e,n)=>o=>e(n(o)),st=e=>()=>e,In=e=>e,Yt=(e,n)=>e===n;function et(e,...n){return(...o)=>{const r=n.concat(o);return e.apply(null,r)}}const ro=e=>n=>!e(n),Wo=e=>()=>{throw new Error(e)},wt=e=>e(),fn=e=>{e()},Ne=st(!1),at=st(!0);class F{constructor(n,o){this.tag=n,this.value=o}static some(n){return new F(!0,n)}static none(){return F.singletonNone}fold(n,o){return this.tag?o(this.value):n()}isSome(){return this.tag}isNone(){return!this.tag}map(n){return this.tag?F.some(n(this.value)):F.none()}bind(n){return this.tag?n(this.value):F.none()}exists(n){return this.tag&&n(this.value)}forall(n){return!this.tag||n(this.value)}filter(n){return!this.tag||n(this.value)?this:F.none()}getOr(n){return this.tag?this.value:n}or(n){return this.tag?this:n}getOrThunk(n){return this.tag?this.value:n()}orThunk(n){return this.tag?this:n()}getOrDie(n){if(this.tag)return this.value;throw new Error(n??"Called getOrDie on None")}static from(n){return Ie(n)?F.some(n):F.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(n){this.tag&&n(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}F.singletonNone=new F(!1);const Go=Array.prototype.slice,to=Array.prototype.indexOf,lt=Array.prototype.push,gt=(e,n)=>to.call(e,n),an=(e,n)=>{const o=gt(e,n);return o===-1?F.none():F.some(o)},ee=(e,n)=>gt(e,n)>-1,be=(e,n)=>{for(let o=0,r=e.length;o{const o=e.length,r=new Array(o);for(let c=0;c{for(let o=0,r=e.length;o{for(let o=e.length-1;o>=0;o--){const r=e[o];n(r,o)}},Fe=(e,n)=>{const o=[],r=[];for(let c=0,u=e.length;c{const o=[];for(let r=0,c=e.length;r(Ee(e,(r,c)=>{o=n(o,r,c)}),o),Q=(e,n,o)=>(re(e,(r,c)=>{o=n(o,r,c)}),o),Ce=(e,n,o)=>{for(let r=0,c=e.length;rCe(e,n,Ne),zt=(e,n)=>{for(let o=0,r=e.length;o{const n=[];for(let o=0,r=e.length;oqn(ve(e,n)),zn=(e,n)=>{for(let o=0,r=e.length;o{const n=Go.call(e,0);return n.reverse(),n},Lo=(e,n)=>Ze(e,o=>!ee(n,o)),Ln=(e,n)=>{const o={};for(let r=0,c=e.length;r{const o=Go.call(e,0);return o.sort(n),o},Jn=(e,n)=>n>=0&&nJn(e,0),ho=e=>Jn(e,e.length-1),cs=ae(Array.from)?Array.from:e=>Go.call(e),Bs=(e,n)=>{for(let o=0;o{const o=[],r=ae(n)?c=>be(o,u=>n(u,c)):c=>ee(o,c);for(let c=0,u=e.length;c{const o=ts(e);for(let r=0,c=o.length;rir(e,(o,r)=>({k:r,v:n(o,r)})),ir=(e,n)=>{const o={};return Ot(e,(r,c)=>{const u=n(r,c);o[u.k]=u.v}),o},Kr=e=>(n,o)=>{e[o]=n},ga=(e,n,o,r)=>{Ot(e,(c,u)=>{(n(c,u)?o:r)(c,u)})},Pr=(e,n)=>{const o={},r={};return ga(e,n,Kr(o),Kr(r)),{t:o,f:r}},Cs=(e,n)=>{const o={};return ga(e,n,Kr(o),Re),o},ra=(e,n)=>{const o=[];return Ot(e,(r,c)=>{o.push(n(r,c))}),o},Rr=e=>ra(e,In),Ss=(e,n)=>Wn(e,n)?F.from(e[n]):F.none(),Wn=(e,n)=>Aa.call(e,n),or=(e,n)=>Wn(e,n)&&e[n]!==void 0&&e[n]!==null,ze=(e,n,o=bo)=>An(o).eq(e,n),Ye=e=>{const n={};return re(e,o=>{n[o]={}}),ts(n)},jt=e=>e.length!==void 0,yn=Array.isArray,_o=e=>{if(yn(e))return e;{const n=[];for(let o=0,r=e.length;o{if(!e)return!1;if(o=o||e,jt(e)){for(let r=0,c=e.length;r{const o=[];return ns(e,(r,c)=>{o.push(n(r,c,e))}),o},Fr=(e,n)=>{const o=[];return ns(e,(r,c)=>{(!n||n(r,c,e))&&o.push(r)}),o},lr=(e,n)=>{if(e){for(let o=0,r=e.length;o{let c=pn(o)?e[0]:o;for(let u=0;u{for(let r=0,c=e.length;re[e.length-1],ct=e=>{let n=!1,o;return(...r)=>(n||(n=!0,o=e.apply(null,r)),o)},En=(e,n,o,r)=>{const c=e.isiOS()&&/ipad/i.test(o)===!0,u=e.isiOS()&&!c,m=e.isiOS()||e.isAndroid(),b=m||r("(pointer:coarse)"),v=c||!u&&m&&r("(min-device-width:768px)"),x=u||m&&!v,R=n.isSafari()&&e.isiOS()&&/safari/i.test(o)===!1,N=!x&&!v&&!R;return{isiPad:st(c),isiPhone:st(u),isTablet:st(v),isPhone:st(x),isTouch:st(b),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:st(R),isDesktop:st(N)}},Pn=(e,n)=>{for(let o=0;o{const o=Pn(e,n);if(!o)return{major:0,minor:0};const r=c=>Number(n.replace(o,"$"+c));return yo(r(1),r(2))},Us=(e,n)=>{const o=String(n).toLowerCase();return e.length===0?ke():Po(e,o)},ke=()=>yo(0,0),yo=(e,n)=>({major:e,minor:n}),de={nu:yo,detect:Us,unknown:ke},me=(e,n)=>Bs(n.brands,o=>{const r=o.brand.toLowerCase();return Ve(e,c=>{var u;return r===((u=c.brand)===null||u===void 0?void 0:u.toLowerCase())}).map(c=>({current:c.name,version:de.nu(parseInt(o.version,10),0)}))}),ht=(e,n)=>{const o=String(n).toLowerCase();return Ve(e,r=>r.search(o))},xt=(e,n)=>ht(e,n).map(o=>{const r=de.detect(o.versionRegexes,n);return{current:o.name,version:r}}),Xt=(e,n)=>ht(e,n).map(o=>{const r=de.detect(o.versionRegexes,n);return{current:o.name,version:r}}),Fn=(e,n)=>e.substring(n),xn=(e,n,o)=>n===""||e.length>=n.length&&e.substr(o,o+n.length)===n,Tn=(e,n)=>Qn(e,n)?Fn(e,n.length):e,On=(e,n,o=0,r)=>{const c=e.indexOf(n,o);return c!==-1?pn(r)?!0:c+n.length<=r:!1},Qn=(e,n)=>xn(e,n,0),ss=(e,n)=>xn(e,n,e.length-n.length),$s=e=>n=>n.replace(e,""),Ba=$s(/^\s+|\s+$/g),Ya=$s(/^\s+/g),fc=$s(/\s+$/g),mo=e=>e.length>0,is=e=>!mo(e),vs=(e,n)=>n<=0?"":new Array(n+1).join(e),pa=(e,n=10)=>{const o=parseInt(e,n);return isNaN(o)?F.none():F.some(o)},jr=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ur=e=>n=>On(n,e),Ws=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>On(e,"edge/")&&On(e,"chrome")&&On(e,"safari")&&On(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,jr],search:e=>On(e,"chrome")&&!On(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>On(e,"msie")||On(e,"trident")},{name:"Opera",versionRegexes:[jr,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ur("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ur("firefox")},{name:"Safari",versionRegexes:[jr,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(On(e,"safari")||On(e,"mobile/"))&&On(e,"applewebkit")}],Ha=[{name:"Windows",search:ur("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>On(e,"iphone")||On(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ur("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:ur("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ur("linux"),versionRegexes:[]},{name:"Solaris",search:ur("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ur("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ur("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Bi={browsers:st(Ws),oses:st(Ha)},Ns="Edge",la="Chromium",Pa="IE",$r="Opera",wc="Firefox",Dc="Safari",ha=()=>zc({current:void 0,version:de.unknown()}),zc=e=>{const n=e.current,o=e.version,r=c=>()=>n===c;return{current:n,version:o,isEdge:r(Ns),isChromium:r(la),isIE:r(Pa),isOpera:r($r),isFirefox:r(wc),isSafari:r(Dc)}},Rc={unknown:ha,nu:zc,edge:st(Ns),chromium:st(la),ie:st(Pa),opera:st($r),firefox:st(wc),safari:st(Dc)},Ji="Windows",mc="iOS",Qi="Android",Fa="Linux",ri="macOS",wi="Solaris",el="FreeBSD",Yl="ChromeOS",Z=()=>ge({current:void 0,version:de.unknown()}),ge=e=>{const n=e.current,o=e.version,r=c=>()=>n===c;return{current:n,version:o,isWindows:r(Ji),isiOS:r(mc),isAndroid:r(Qi),isMacOS:r(ri),isLinux:r(Fa),isSolaris:r(wi),isFreeBSD:r(el),isChromeOS:r(Yl)}},De={unknown:Z,nu:ge,windows:st(Ji),ios:st(mc),android:st(Qi),linux:st(Fa),macos:st(ri),solaris:st(wi),freebsd:st(el),chromeos:st(Yl)},Nt={detect:(e,n,o)=>{const r=Bi.browsers(),c=Bi.oses(),u=n.bind(v=>me(r,v)).orThunk(()=>xt(r,e)).fold(Rc.unknown,Rc.nu),m=Xt(c,e).fold(De.unknown,De.nu),b=En(m,u,e,o);return{browser:u,os:m,deviceType:b}}},no=e=>window.matchMedia(e).matches;let Is=ct(()=>Nt.detect(navigator.userAgent,F.from(navigator.userAgentData),no));const qs=()=>Is(),Ls=navigator.userAgent,Qs=qs(),fs=Qs.browser,yr=Qs.os,Va=Qs.deviceType,_i=Ls.indexOf("Windows Phone")!==-1,tn={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:fs.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!fs.isIE(),windowsPhone:_i,browser:{current:fs.current,version:fs.version,isChromium:fs.isChromium,isEdge:fs.isEdge,isFirefox:fs.isFirefox,isIE:fs.isIE,isOpera:fs.isOpera,isSafari:fs.isSafari},os:{current:yr.current,version:yr.version,isAndroid:yr.isAndroid,isChromeOS:yr.isChromeOS,isFreeBSD:yr.isFreeBSD,isiOS:yr.isiOS,isLinux:yr.isLinux,isMacOS:yr.isMacOS,isSolaris:yr.isSolaris,isWindows:yr.isWindows},deviceType:{isDesktop:Va.isDesktop,isiPad:Va.isiPad,isiPhone:Va.isiPhone,isPhone:Va.isPhone,isTablet:Va.isTablet,isTouch:Va.isTouch,isWebView:Va.isWebView}},wl=/^\s*|\s*$/g,vr=e=>on(e)?"":(""+e).replace(wl,""),B=(e,n)=>n?n==="array"&&yn(e)?!0:typeof e===n:e!==void 0,Y=(e,n,o={})=>{const r=W(e)?e.split(n||","):e||[];let c=r.length;for(;c--;)o[r[c]]={};return o},se=Wn,Ke=(e,...n)=>{for(let o=0;on.call(r,c,u,o)===!1?!1:(Kt(c,n,o,r),!0)))},Et={trim:vr,isArray:yn,is:B,toArray:_o,makeMap:Y,each:ns,map:Nr,grep:Fr,inArray:lr,hasOwn:se,extend:Ke,walk:Kt,resolve:(e,n=window)=>{const o=e.split(".");for(let r=0,c=o.length;rmt(e)?e:e===""?[]:Nr(e.split(n||","),vr),_addCacheSuffix:e=>{const n=tn.cacheSuffix;return n&&(e+=(e.indexOf("?")===-1?"?":"&")+n),e}},Gs=(e,n,o=Yt)=>e.exists(r=>o(r,n)),Xa=(e,n,o=Yt)=>Yr(e,n,o).getOr(e.isNone()&&n.isNone()),fr=e=>{const n=[],o=r=>{n.push(r)};for(let r=0;re.isSome()&&n.isSome()?F.some(o(e.getOrDie(),n.getOrDie())):F.none(),Ci=(e,n,o,r)=>e.isSome()&&n.isSome()&&o.isSome()?F.some(r(e.getOrDie(),n.getOrDie(),o.getOrDie())):F.none(),q=(e,n)=>e?F.some(n):F.none(),ue=typeof window<"u"?window:Function("return this;")(),Pe=(e,n)=>{let o=n??ue;for(let r=0;r{const o=e.split(".");return Pe(o,n)},Jt=(e,n)=>pt(e,n),os=(e,n)=>{const o=Jt(e,n);if(o==null)throw new Error(e+" not available on this browser");return o},Er=Object.getPrototypeOf,Oa=e=>os("HTMLElement",e),ls=e=>{const n=pt("ownerDocument.defaultView",e);return Be(e)&&(Oa(n).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Er(e).constructor.name))},Xr=8,Wr=9,ua=11,ba=1,mu=3,rs=e=>e.dom.nodeName.toLowerCase(),kr=e=>e.dom.nodeType,Jr=e=>n=>kr(n)===e,ig=e=>kr(e)===Xr||rs(e)==="#comment",Mr=e=>gc(e)&&ls(e.dom),gc=Jr(ba),Ja=Jr(mu),hp=Jr(Wr),lg=Jr(ua),Si=e=>n=>gc(n)&&rs(n)===e,sm=(e,n,o)=>{if(W(o)||it(o)||po(o))e.setAttribute(n,o+"");else throw console.error("Invalid call to Attribute.set. Key ",n,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple")},mr=(e,n,o)=>{sm(e.dom,n,o)},Pi=(e,n)=>{const o=e.dom;Ot(n,(r,c)=>{sm(o,c,r)})},_c=(e,n)=>{const o=e.dom.getAttribute(n);return o===null?void 0:o},_l=(e,n)=>F.from(_c(e,n)),Da=(e,n)=>{const o=e.dom;return o&&o.hasAttribute?o.hasAttribute(n):!1},Qr=(e,n)=>{e.dom.removeAttribute(n)},Fi=e=>{const n=e.dom.attributes;return n==null||n.length===0},Lu=e=>Q(e.dom.attributes,(n,o)=>(n[o.name]=o.value,n),{}),Hu=(e,n)=>{const o=_c(e,n);return o===void 0||o===""?[]:o.split(" ")},rm=(e,n,o)=>{const c=Hu(e,n).concat([o]);return mr(e,n,c.join(" ")),!0},lf=(e,n,o)=>{const r=Ze(Hu(e,n),c=>c!==o);return r.length>0?mr(e,n,r.join(" ")):Qr(e,n),!1},Nc=e=>e.dom.classList!==void 0,uf=e=>Hu(e,"class"),Mc=(e,n)=>rm(e,"class",n),tl=(e,n)=>lf(e,"class",n),df=(e,n)=>ee(uf(e),n)?tl(e,n):Mc(e,n),gu=(e,n)=>{Nc(e)?e.dom.classList.add(n):Mc(e,n)},ff=e=>{(Nc(e)?e.dom.classList:uf(e)).length===0&&Qr(e,"class")},Cl=(e,n)=>{Nc(e)?e.dom.classList.remove(n):tl(e,n),ff(e)},ug=(e,n)=>{const o=Nc(e)?e.dom.classList.toggle(n):df(e,n);return ff(e),o},Xl=(e,n)=>Nc(e)&&e.dom.classList.contains(n),dg=(e,n)=>{const r=(n||document).createElement("div");if(r.innerHTML=e,!r.hasChildNodes()||r.childNodes.length>1){const c="HTML does not have a single root node";throw console.error(c,e),new Error(c)}return Vu(r.childNodes[0])},fg=(e,n)=>{const r=(n||document).createElement(e);return Vu(r)},mg=(e,n)=>{const r=(n||document).createTextNode(e);return Vu(r)},Vu=e=>{if(e==null)throw new Error("Node cannot be null or undefined");return{dom:e}},le={fromHtml:dg,fromTag:fg,fromText:mg,fromDom:Vu,fromPoint:(e,n,o)=>F.from(e.dom.elementFromPoint(n,o)).map(Vu)},pu=(e,n)=>{const o=[],r=u=>(o.push(u),n(u));let c=n(e);do c=c.bind(r);while(c.isSome());return o},xi=(e,n)=>{const o=e.dom;if(o.nodeType!==ba)return!1;{const r=o;if(r.matches!==void 0)return r.matches(n);if(r.msMatchesSelector!==void 0)return r.msMatchesSelector(n);if(r.webkitMatchesSelector!==void 0)return r.webkitMatchesSelector(n);if(r.mozMatchesSelector!==void 0)return r.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")}},kd=e=>e.nodeType!==ba&&e.nodeType!==Wr&&e.nodeType!==ua||e.childElementCount===0,gg=(e,n)=>{const o=n===void 0?document:n.dom;return kd(o)?[]:ve(o.querySelectorAll(e),le.fromDom)},eb=(e,n)=>{const o=n===void 0?document:n.dom;return kd(o)?F.none():F.from(o.querySelector(e)).map(le.fromDom)},xs=(e,n)=>e.dom===n.dom,pc=(e,n)=>{const o=e.dom,r=n.dom;return o===r?!1:o.contains(r)},Sl=e=>le.fromDom(e.dom.ownerDocument),Ti=e=>hp(e)?e:Sl(e),hu=e=>le.fromDom(Ti(e).dom.documentElement),$i=e=>le.fromDom(Ti(e).dom.defaultView),Qa=e=>F.from(e.dom.parentNode).map(le.fromDom),nl=e=>F.from(e.dom.parentElement).map(le.fromDom),pg=(e,n)=>{const o=ae(n)?n:Ne;let r=e.dom;const c=[];for(;r.parentNode!==null&&r.parentNode!==void 0;){const u=r.parentNode,m=le.fromDom(u);if(c.push(m),o(m)===!0)break;r=u}return c},yp=e=>{const n=o=>Ze(o,r=>!xs(e,r));return Qa(e).map(ya).map(n).getOr([])},Ei=e=>F.from(e.dom.previousSibling).map(le.fromDom),xl=e=>F.from(e.dom.nextSibling).map(le.fromDom),hg=e=>Un(pu(e,Ei)),Cc=e=>pu(e,xl),ya=e=>ve(e.dom.childNodes,le.fromDom),bu=(e,n)=>{const o=e.dom.childNodes;return F.from(o[n]).map(le.fromDom)},wd=e=>bu(e,0),Ii=e=>bu(e,e.dom.childNodes.length-1),Sc=e=>e.dom.childNodes.length,bg=e=>e.dom.hasChildNodes(),vp=e=>{const n=e.dom.head;if(n==null)throw new Error("Head is not available yet");return le.fromDom(n)},mf=e=>lg(e)&&Ie(e.dom.host),am=ae(Element.prototype.attachShadow)&&ae(Node.prototype.getRootNode),_d=st(am),Tl=am?e=>le.fromDom(e.dom.getRootNode()):Ti,kp=e=>mf(e)?e:vp(Ti(e)),jy=e=>mf(e)?e:le.fromDom(Ti(e).dom.body),yg=e=>{const n=Tl(e);return mf(n)?F.some(n):F.none()},vg=e=>le.fromDom(e.dom.host),Uu=e=>{if(_d()&&Ie(e.target)){const n=le.fromDom(e.target);if(gc(n)&&gf(n)&&e.composed&&e.composedPath){const o=e.composedPath();if(o)return gn(o)}}return F.from(e.target)},gf=e=>Ie(e.dom.shadowRoot),Cd=e=>{const n=Ja(e)?e.dom.parentNode:e.dom;if(n==null||n.ownerDocument===null)return!1;const o=n.ownerDocument;return yg(le.fromDom(n)).fold(()=>o.body.contains(n),rn(Cd,vg))};var Ar=(e,n,o,r,c)=>e(o,r)?F.some(o):ae(c)&&c(o)?F.none():n(o,r,c);const Ir=(e,n,o)=>{let r=e.dom;const c=ae(o)?o:Ne;for(;r.parentNode;){r=r.parentNode;const u=le.fromDom(r);if(n(u))return F.some(u);if(c(u))break}return F.none()},Bc=(e,n,o)=>Ar((c,u)=>u(c),Ir,e,n,o),kg=(e,n)=>{const o=e.dom;return o.parentNode?wp(le.fromDom(o.parentNode),r=>!xs(e,r)&&n(r)):F.none()},wp=(e,n)=>{const o=c=>n(le.fromDom(c));return Ve(e.dom.childNodes,o).map(le.fromDom)},Ua=(e,n)=>{const o=r=>{for(let c=0;cIr(e,r=>xi(r,n),o),Pc=(e,n)=>eb(n,e),El=(e,n,o)=>Ar((c,u)=>xi(c,u),Jl,e,n,o),cm=e=>El(e,"[contenteditable]"),Ho=(e,n=!1)=>Cd(e)?e.dom.isContentEditable:cm(e).fold(st(n),o=>qc(o)==="true"),qc=e=>e.dom.contentEditable,yu=e=>e.style!==void 0&&ae(e.style.getPropertyValue),Sd=(e,n,o)=>{if(!W(o))throw console.error("Invalid call to CSS.set. Property ",n,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);yu(e)&&e.style.setProperty(n,o)},im=(e,n)=>{yu(e)&&e.style.removeProperty(n)},_p=(e,n,o)=>{const r=e.dom;Sd(r,n,o)},ec=(e,n)=>{const o=e.dom;Ot(n,(r,c)=>{Sd(o,c,r)})},aa=(e,n)=>{const o=e.dom,c=window.getComputedStyle(o).getPropertyValue(n);return c===""&&!Cd(e)?ai(o,n):c},ai=(e,n)=>yu(e)?e.style.getPropertyValue(n):"",va=(e,n)=>{const o=e.dom,r=ai(o,n);return F.from(r).filter(c=>c.length>0)},xd=e=>{const n={},o=e.dom;if(yu(o))for(let r=0;r{const o=e.dom;im(o,n),Gs(_l(e,"style").map(Ba),"")&&Qr(e,"style")},ea=e=>e.dom.offsetWidth,za=(e,n)=>{Qa(e).each(r=>{r.dom.insertBefore(n.dom,e.dom)})},ol=(e,n)=>{xl(e).fold(()=>{Qa(e).each(c=>{da(c,n)})},r=>{za(r,n)})},Wu=(e,n)=>{wd(e).fold(()=>{da(e,n)},r=>{e.dom.insertBefore(n.dom,r.dom)})},da=(e,n)=>{e.dom.appendChild(n.dom)},wg=(e,n)=>{za(e,n),da(n,e)},Cp=(e,n)=>{re(n,(o,r)=>{const c=r===0?e:n[r-1];ol(c,o)})},Zs=(e,n)=>{re(n,o=>{da(e,o)})},sl=e=>{e.dom.textContent="",re(ya(e),n=>{Ts(n)})},Ts=e=>{const n=e.dom;n.parentNode!==null&&n.parentNode.removeChild(n)},Fc=e=>{const n=ya(e);n.length>0&&Cp(e,n),Ts(e)},vu=(e,n)=>{const r=(n||document).createElement("div");return r.innerHTML=e,ya(le.fromDom(r))},Ql=e=>ve(e,le.fromDom),Jo=e=>e.dom.innerHTML,Zu=(e,n)=>{const r=Sl(e).dom,c=le.fromDom(r.createDocumentFragment()),u=vu(n,r);Zs(c,u),sl(e),da(e,c)},_g=e=>{const n=le.fromTag("div"),o=le.fromDom(e.dom.cloneNode(!0));return da(n,o),Jo(n)},Cg=(e,n,o,r,c,u,m)=>({target:e,x:n,y:o,stop:r,prevent:c,kill:u,raw:m}),tb=e=>{const n=le.fromDom(Uu(e).getOr(e.target)),o=()=>e.stopPropagation(),r=()=>e.preventDefault(),c=E(r,o);return Cg(n,e.clientX,e.clientY,o,r,c,e)},Sp=(e,n)=>o=>{e(o)&&n(tb(o))},lm=(e,n,o,r,c)=>{const u=Sp(o,r);return e.dom.addEventListener(n,u,c),{unbind:et(pf,e,n,u,c)}},Sg=(e,n,o,r)=>lm(e,n,o,r,!1),pf=(e,n,o,r)=>{e.dom.removeEventListener(n,o,r)},C=(e,n)=>({left:e,top:n,translate:(r,c)=>C(e+r,n+c)}),z=C,H=e=>{const n=e.getBoundingClientRect();return z(n.left,n.top)},ce=(e,n)=>e!==void 0?e:n!==void 0?n:0,ye=e=>{const n=e.dom.ownerDocument,o=n.body,r=n.defaultView,c=n.documentElement;if(o===e.dom)return z(o.offsetLeft,o.offsetTop);const u=ce(r==null?void 0:r.pageYOffset,c.scrollTop),m=ce(r==null?void 0:r.pageXOffset,c.scrollLeft),b=ce(c.clientTop,o.clientTop),v=ce(c.clientLeft,o.clientLeft);return Rt(e).translate(m-v,u-b)},Rt=e=>{const n=e.dom,r=n.ownerDocument.body;return r===n?z(r.offsetLeft,r.offsetTop):Cd(e)?H(n):z(0,0)},Rn=e=>{const n=e!==void 0?e.dom:document,o=n.body.scrollLeft||n.documentElement.scrollLeft,r=n.body.scrollTop||n.documentElement.scrollTop;return z(o,r)},Do=(e,n,o)=>{const c=(o!==void 0?o.dom:document).defaultView;c&&c.scrollTo(e,n)},xo=(e,n)=>{qs().browser.isSafari()&&ae(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(n)},lo=e=>{const n=e===void 0?window:e;return qs().browser.isFirefox()?F.none():F.from(n.visualViewport)},zr=(e,n,o,r)=>({x:e,y:n,width:o,height:r,right:e+o,bottom:n+r}),ja=e=>{const n=e===void 0?window:e,o=n.document,r=Rn(le.fromDom(o));return lo(n).fold(()=>{const c=n.document.documentElement,u=c.clientWidth,m=c.clientHeight;return zr(r.left,r.top,u,m)},c=>zr(Math.max(c.pageLeft,r.left),Math.max(c.pageTop,r.top),c.width,c.height))},ci=(e,n)=>Ze(ya(e),n),eu=(e,n)=>{let o=[];return re(ya(e),r=>{n(r)&&(o=o.concat([r])),o=o.concat(eu(r,n))}),o},tc=(e,n)=>gg(n,e),av=(e,n,o)=>Jl(e,n,o).isSome();class wr{constructor(n,o){this.node=n,this.rootNode=o,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}current(){return this.node}next(n){return this.node=this.findSibling(this.node,"firstChild","nextSibling",n),this.node}prev(n){return this.node=this.findSibling(this.node,"lastChild","previousSibling",n),this.node}prev2(n){return this.node=this.findPreviousNode(this.node,n),this.node}findSibling(n,o,r,c){if(n){if(!c&&n[o])return n[o];if(n!==this.rootNode){let u=n[r];if(u)return u;for(let m=n.parentNode;m&&m!==this.rootNode;m=m.parentNode)if(u=m[r],u)return u}}}findPreviousNode(n,o){if(n){const r=n.previousSibling;if(this.rootNode&&r===this.rootNode)return;if(r){if(!o){for(let u=r.lastChild;u;u=u.lastChild)if(!u.lastChild)return u}return r}const c=n.parentNode;if(c&&c!==this.rootNode)return c}}}const Kn=e=>n=>!!n&&n.nodeType===e,ku=e=>!!e&&!Object.getPrototypeOf(e),Cn=Kn(1),tu=e=>Cn(e)&&Mr(le.fromDom(e)),Wy=e=>Cn(e)&&e.namespaceURI==="http://www.w3.org/2000/svg",wu=e=>{const n=e.toLowerCase();return o=>Ie(o)&&o.nodeName.toLowerCase()===n},ka=e=>{const n=e.map(o=>o.toLowerCase());return o=>{if(o&&o.nodeName){const r=o.nodeName.toLowerCase();return ee(n,r)}return!1}},qu=(e,n)=>{const o=n.toLowerCase().split(" ");return r=>{if(Cn(r)){const c=r.ownerDocument.defaultView;if(c)for(let u=0;un=>Cn(n)&&n.hasAttribute(e),nc=(e,n)=>o=>Cn(o)&&o.getAttribute(e)===n,nu=e=>Cn(e)&&e.hasAttribute("data-mce-bogus"),xp=e=>Cn(e)&&e.getAttribute("data-mce-bogus")==="all",_u=e=>Cn(e)&&e.tagName==="TABLE",Zy=e=>n=>!!(tu(n)&&(n.contentEditable===e||n.getAttribute("data-mce-contenteditable")===e)),Tg=ka(["textarea","input"]),Mt=Kn(3),qy=Kn(4),Td=Kn(7),Gu=Kn(8),Eg=Kn(9),Lr=Kn(11),er=wu("br"),Gc=wu("img"),$c=Zy("true"),hs=Zy("false"),um=ka(["td","th"]),hc=ka(["td","th","caption"]),ca=ka(["video","audio","object","embed"]),Tp=wu("li"),_t=wu("details"),Ai=wu("summary"),Ag="\uFEFF",Ms=" ",ou=e=>e===Ag,Gy=e=>e.replace(/\uFEFF/g,""),nb=((e,n)=>{const o=u=>{if(!e(u))throw new Error("Can only get "+n+" value of a "+n+" node");return r(u).getOr("")},r=u=>e(u)?F.from(u.dom.nodeValue):F.none();return{get:o,getOption:r,set:(u,m)=>{if(!e(u))throw new Error("Can only set raw "+n+" value of a "+n+" node");u.dom.nodeValue=m}}})(Ja,"text"),Al=e=>nb.get(e),ob=e=>nb.getOption(e),Li=(e,n)=>nb.set(e,n),js=["td","th"],Cu=["thead","tbody","tfoot"],hf=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],bc=["li","dd","dt"],sb=["ul","ol","dl"],bf=["pre","script","textarea","style"],yf=e=>{let n;return o=>(n=n||Ln(e,at),Wn(n,rs(o)))},Kc=e=>rs(e)==="table",Ed=e=>gc(e)&&rs(e)==="br",Le=yf(hf),ii=yf(sb),rl=yf(bc),al=yf(Cu),li=yf(js),$a=yf(bf),Wa=e=>{const n=[];let o=e.dom;for(;o;)n.push(le.fromDom(o)),o=o.lastChild;return n},Ky=e=>{const n=tc(e,"br"),o=Ze(Wa(e).slice(-1),Ed);n.length===o.length&&re(o,Ts)},ui=()=>{const e=le.fromTag("br");return mr(e,"data-mce-bogus","1"),e},Su=e=>{sl(e),da(e,ui())},ao=(e,n)=>{Ii(e).each(o=>{Ei(o).each(r=>{n.isBlock(rs(e))&&Ed(o)&&n.isBlock(rs(r))&&Ts(o)})})},w=Ag,T=ou,L=Gy,K=e=>e.insertContent(w,{preserve_zwsp:!0}),_e=Cn,dt=Mt,Pt=e=>(dt(e)&&(e=e.parentNode),_e(e)&&e.hasAttribute("data-mce-caret")),Qt=e=>dt(e)&&T(e.data),Yn=e=>Pt(e)||Qt(e),Vo=e=>e.firstChild!==e.lastChild||!er(e.firstChild),ta=(e,n)=>{var o;const c=((o=e.ownerDocument)!==null&&o!==void 0?o:document).createTextNode(w),u=e.parentNode;if(n){const m=e.previousSibling;if(dt(m)){if(Yn(m))return m;if(cl(m))return m.splitText(m.data.length-1)}u==null||u.insertBefore(c,e)}else{const m=e.nextSibling;if(dt(m)){if(Yn(m))return m;if(di(m))return m.splitText(1),m}e.nextSibling?u==null||u.insertBefore(c,e.nextSibling):u==null||u.appendChild(c)}return c},Hs=e=>{const n=e.container();return Mt(n)?n.data.charAt(e.offset())===w||e.isAtStart()&&Qt(n.previousSibling):!1},Or=e=>{const n=e.container();return Mt(n)?n.data.charAt(e.offset()-1)===w||e.isAtEnd()&&Qt(n.nextSibling):!1},Oi=(e,n,o)=>{var r;const u=((r=n.ownerDocument)!==null&&r!==void 0?r:document).createElement(e);u.setAttribute("data-mce-caret",o?"before":"after"),u.setAttribute("data-mce-bogus","all"),u.appendChild(ui().dom);const m=n.parentNode;return o?m==null||m.insertBefore(u,n):n.nextSibling?m==null||m.insertBefore(u,n.nextSibling):m==null||m.appendChild(u),u},di=e=>dt(e)&&e.data[0]===w,cl=e=>dt(e)&&e.data[e.data.length-1]===w,Ad=e=>{var n;const o=e.getElementsByTagName("br"),r=o[o.length-1];nu(r)&&((n=r.parentNode)===null||n===void 0||n.removeChild(r))},ru=e=>e&&e.hasAttribute("data-mce-caret")?(Ad(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("data-mce-style"),e.removeAttribute("_moz_abspos"),e):null,Og=e=>Pt(e.startContainer),dm=$c,vf=hs,Dg=er,Ra=Mt,il=ka(["script","style","textarea"]),fm=ka(["img","input","textarea","hr","iframe","video","audio","object","embed"]),kf=ka(["table"]),Ps=Yn,ms=e=>Ps(e)?!1:Ra(e)?!il(e.parentNode):fm(e)||Dg(e)||kf(e)||Ic(e),oc=e=>Cn(e)&&e.getAttribute("unselectable")==="true",Ic=e=>!oc(e)&&vf(e),rb=(e,n)=>{for(let o=e.parentNode;o&&o!==n;o=o.parentNode){if(Ic(o))return!1;if(dm(o))return!0}return!0},Ku=e=>Ic(e)?!Q(cs(e.getElementsByTagName("*")),(n,o)=>n||dm(o),!1):!1,Lc=e=>fm(e)||Ku(e),wf=(e,n)=>ms(e)&&rb(e,n),xu=/^[ \t\r\n]*$/,mm=e=>xu.test(e),zg=e=>{for(const n of e)if(!ou(n))return!1;return!0},Ep=e=>" \f \v".indexOf(e)!==-1,_f=e=>e===` +import{p as Gq,t as Kq,R as tZ,v as Yq,w as Xq,x as Jq,y as Qq,z as eG,D as nZ,G as tG,H as _q}from"./index-5zY5TMAp.js";var Cq={exports:{}};(function(as){(function(){var So=function(e){if(e===null)return"null";if(e===void 0)return"undefined";var n=typeof e;return n==="object"&&(Array.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="Array")?"array":n==="object"&&(String.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="String")?"string":n},wo=function(e){return["undefined","boolean","number","string","function","xml","null"].indexOf(e)!==-1},Vn=function(e,n){var o=Array.prototype.slice.call(e);return o.sort(n)},co=function(e,n){return fo(function(o,r){return e.eq(n(o),n(r))})},fo=function(e){return{eq:e}},Bn=fo(function(e,n){return e===n}),Qe=Bn,mn=function(e){return fo(function(n,o){if(n.length!==o.length)return!1;for(var r=n.length,c=0;c{var r;return o(e,n.prototype)?!0:((r=e.constructor)===null||r===void 0?void 0:r.name)===n.name},Ht=e=>{const n=typeof e;return e===null?"null":n==="object"&&Array.isArray(e)?"array":n==="object"&&Wt(e,String,(o,r)=>r.isPrototypeOf(o))?"string":n},nn=e=>n=>Ht(n)===e,nt=e=>n=>typeof n===e,Dt=e=>n=>e===n,At=(e,n)=>Be(e)&&Wt(e,n,(o,r)=>un(o)===r),W=nn("string"),Be=nn("object"),Bo=e=>At(e,Object),mt=nn("array"),U=Dt(null),it=nt("boolean"),pn=Dt(void 0),on=e=>e==null,Ie=e=>!on(e),ae=nt("function"),po=nt("number"),Se=(e,n)=>{if(mt(e)){for(let o=0,r=e.length;o{},E=(e,n)=>(...o)=>e(n.apply(null,o)),rn=(e,n)=>o=>e(n(o)),st=e=>()=>e,In=e=>e,Yt=(e,n)=>e===n;function et(e,...n){return(...o)=>{const r=n.concat(o);return e.apply(null,r)}}const ro=e=>n=>!e(n),Wo=e=>()=>{throw new Error(e)},wt=e=>e(),fn=e=>{e()},Ne=st(!1),at=st(!0);class F{constructor(n,o){this.tag=n,this.value=o}static some(n){return new F(!0,n)}static none(){return F.singletonNone}fold(n,o){return this.tag?o(this.value):n()}isSome(){return this.tag}isNone(){return!this.tag}map(n){return this.tag?F.some(n(this.value)):F.none()}bind(n){return this.tag?n(this.value):F.none()}exists(n){return this.tag&&n(this.value)}forall(n){return!this.tag||n(this.value)}filter(n){return!this.tag||n(this.value)?this:F.none()}getOr(n){return this.tag?this.value:n}or(n){return this.tag?this:n}getOrThunk(n){return this.tag?this.value:n()}orThunk(n){return this.tag?this:n()}getOrDie(n){if(this.tag)return this.value;throw new Error(n??"Called getOrDie on None")}static from(n){return Ie(n)?F.some(n):F.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(n){this.tag&&n(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}F.singletonNone=new F(!1);const Go=Array.prototype.slice,to=Array.prototype.indexOf,lt=Array.prototype.push,gt=(e,n)=>to.call(e,n),an=(e,n)=>{const o=gt(e,n);return o===-1?F.none():F.some(o)},ee=(e,n)=>gt(e,n)>-1,be=(e,n)=>{for(let o=0,r=e.length;o{const o=e.length,r=new Array(o);for(let c=0;c{for(let o=0,r=e.length;o{for(let o=e.length-1;o>=0;o--){const r=e[o];n(r,o)}},Fe=(e,n)=>{const o=[],r=[];for(let c=0,u=e.length;c{const o=[];for(let r=0,c=e.length;r(Ee(e,(r,c)=>{o=n(o,r,c)}),o),Q=(e,n,o)=>(re(e,(r,c)=>{o=n(o,r,c)}),o),Ce=(e,n,o)=>{for(let r=0,c=e.length;rCe(e,n,Ne),zt=(e,n)=>{for(let o=0,r=e.length;o{const n=[];for(let o=0,r=e.length;oqn(ve(e,n)),zn=(e,n)=>{for(let o=0,r=e.length;o{const n=Go.call(e,0);return n.reverse(),n},Lo=(e,n)=>Ze(e,o=>!ee(n,o)),Ln=(e,n)=>{const o={};for(let r=0,c=e.length;r{const o=Go.call(e,0);return o.sort(n),o},Jn=(e,n)=>n>=0&&nJn(e,0),ho=e=>Jn(e,e.length-1),cs=ae(Array.from)?Array.from:e=>Go.call(e),Bs=(e,n)=>{for(let o=0;o{const o=[],r=ae(n)?c=>be(o,u=>n(u,c)):c=>ee(o,c);for(let c=0,u=e.length;c{const o=ts(e);for(let r=0,c=o.length;rir(e,(o,r)=>({k:r,v:n(o,r)})),ir=(e,n)=>{const o={};return Ot(e,(r,c)=>{const u=n(r,c);o[u.k]=u.v}),o},Kr=e=>(n,o)=>{e[o]=n},ga=(e,n,o,r)=>{Ot(e,(c,u)=>{(n(c,u)?o:r)(c,u)})},Pr=(e,n)=>{const o={},r={};return ga(e,n,Kr(o),Kr(r)),{t:o,f:r}},Cs=(e,n)=>{const o={};return ga(e,n,Kr(o),Re),o},ra=(e,n)=>{const o=[];return Ot(e,(r,c)=>{o.push(n(r,c))}),o},Rr=e=>ra(e,In),Ss=(e,n)=>Wn(e,n)?F.from(e[n]):F.none(),Wn=(e,n)=>Aa.call(e,n),or=(e,n)=>Wn(e,n)&&e[n]!==void 0&&e[n]!==null,ze=(e,n,o=bo)=>An(o).eq(e,n),Ye=e=>{const n={};return re(e,o=>{n[o]={}}),ts(n)},jt=e=>e.length!==void 0,yn=Array.isArray,_o=e=>{if(yn(e))return e;{const n=[];for(let o=0,r=e.length;o{if(!e)return!1;if(o=o||e,jt(e)){for(let r=0,c=e.length;r{const o=[];return ns(e,(r,c)=>{o.push(n(r,c,e))}),o},Fr=(e,n)=>{const o=[];return ns(e,(r,c)=>{(!n||n(r,c,e))&&o.push(r)}),o},lr=(e,n)=>{if(e){for(let o=0,r=e.length;o{let c=pn(o)?e[0]:o;for(let u=0;u{for(let r=0,c=e.length;re[e.length-1],ct=e=>{let n=!1,o;return(...r)=>(n||(n=!0,o=e.apply(null,r)),o)},En=(e,n,o,r)=>{const c=e.isiOS()&&/ipad/i.test(o)===!0,u=e.isiOS()&&!c,m=e.isiOS()||e.isAndroid(),b=m||r("(pointer:coarse)"),v=c||!u&&m&&r("(min-device-width:768px)"),x=u||m&&!v,R=n.isSafari()&&e.isiOS()&&/safari/i.test(o)===!1,N=!x&&!v&&!R;return{isiPad:st(c),isiPhone:st(u),isTablet:st(v),isPhone:st(x),isTouch:st(b),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:st(R),isDesktop:st(N)}},Pn=(e,n)=>{for(let o=0;o{const o=Pn(e,n);if(!o)return{major:0,minor:0};const r=c=>Number(n.replace(o,"$"+c));return yo(r(1),r(2))},Us=(e,n)=>{const o=String(n).toLowerCase();return e.length===0?ke():Po(e,o)},ke=()=>yo(0,0),yo=(e,n)=>({major:e,minor:n}),de={nu:yo,detect:Us,unknown:ke},me=(e,n)=>Bs(n.brands,o=>{const r=o.brand.toLowerCase();return Ve(e,c=>{var u;return r===((u=c.brand)===null||u===void 0?void 0:u.toLowerCase())}).map(c=>({current:c.name,version:de.nu(parseInt(o.version,10),0)}))}),ht=(e,n)=>{const o=String(n).toLowerCase();return Ve(e,r=>r.search(o))},xt=(e,n)=>ht(e,n).map(o=>{const r=de.detect(o.versionRegexes,n);return{current:o.name,version:r}}),Xt=(e,n)=>ht(e,n).map(o=>{const r=de.detect(o.versionRegexes,n);return{current:o.name,version:r}}),Fn=(e,n)=>e.substring(n),xn=(e,n,o)=>n===""||e.length>=n.length&&e.substr(o,o+n.length)===n,Tn=(e,n)=>Qn(e,n)?Fn(e,n.length):e,On=(e,n,o=0,r)=>{const c=e.indexOf(n,o);return c!==-1?pn(r)?!0:c+n.length<=r:!1},Qn=(e,n)=>xn(e,n,0),ss=(e,n)=>xn(e,n,e.length-n.length),$s=e=>n=>n.replace(e,""),Ba=$s(/^\s+|\s+$/g),Ya=$s(/^\s+/g),fc=$s(/\s+$/g),mo=e=>e.length>0,is=e=>!mo(e),vs=(e,n)=>n<=0?"":new Array(n+1).join(e),pa=(e,n=10)=>{const o=parseInt(e,n);return isNaN(o)?F.none():F.some(o)},jr=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ur=e=>n=>On(n,e),Ws=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>On(e,"edge/")&&On(e,"chrome")&&On(e,"safari")&&On(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,jr],search:e=>On(e,"chrome")&&!On(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>On(e,"msie")||On(e,"trident")},{name:"Opera",versionRegexes:[jr,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ur("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ur("firefox")},{name:"Safari",versionRegexes:[jr,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(On(e,"safari")||On(e,"mobile/"))&&On(e,"applewebkit")}],Ha=[{name:"Windows",search:ur("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>On(e,"iphone")||On(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ur("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:ur("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ur("linux"),versionRegexes:[]},{name:"Solaris",search:ur("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ur("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ur("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],Bi={browsers:st(Ws),oses:st(Ha)},Ns="Edge",la="Chromium",Pa="IE",$r="Opera",wc="Firefox",Dc="Safari",ha=()=>zc({current:void 0,version:de.unknown()}),zc=e=>{const n=e.current,o=e.version,r=c=>()=>n===c;return{current:n,version:o,isEdge:r(Ns),isChromium:r(la),isIE:r(Pa),isOpera:r($r),isFirefox:r(wc),isSafari:r(Dc)}},Rc={unknown:ha,nu:zc,edge:st(Ns),chromium:st(la),ie:st(Pa),opera:st($r),firefox:st(wc),safari:st(Dc)},Ji="Windows",mc="iOS",Qi="Android",Fa="Linux",ri="macOS",wi="Solaris",el="FreeBSD",Yl="ChromeOS",Z=()=>ge({current:void 0,version:de.unknown()}),ge=e=>{const n=e.current,o=e.version,r=c=>()=>n===c;return{current:n,version:o,isWindows:r(Ji),isiOS:r(mc),isAndroid:r(Qi),isMacOS:r(ri),isLinux:r(Fa),isSolaris:r(wi),isFreeBSD:r(el),isChromeOS:r(Yl)}},De={unknown:Z,nu:ge,windows:st(Ji),ios:st(mc),android:st(Qi),linux:st(Fa),macos:st(ri),solaris:st(wi),freebsd:st(el),chromeos:st(Yl)},Nt={detect:(e,n,o)=>{const r=Bi.browsers(),c=Bi.oses(),u=n.bind(v=>me(r,v)).orThunk(()=>xt(r,e)).fold(Rc.unknown,Rc.nu),m=Xt(c,e).fold(De.unknown,De.nu),b=En(m,u,e,o);return{browser:u,os:m,deviceType:b}}},no=e=>window.matchMedia(e).matches;let Is=ct(()=>Nt.detect(navigator.userAgent,F.from(navigator.userAgentData),no));const qs=()=>Is(),Ls=navigator.userAgent,Qs=qs(),fs=Qs.browser,yr=Qs.os,Va=Qs.deviceType,_i=Ls.indexOf("Windows Phone")!==-1,tn={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:fs.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!fs.isIE(),windowsPhone:_i,browser:{current:fs.current,version:fs.version,isChromium:fs.isChromium,isEdge:fs.isEdge,isFirefox:fs.isFirefox,isIE:fs.isIE,isOpera:fs.isOpera,isSafari:fs.isSafari},os:{current:yr.current,version:yr.version,isAndroid:yr.isAndroid,isChromeOS:yr.isChromeOS,isFreeBSD:yr.isFreeBSD,isiOS:yr.isiOS,isLinux:yr.isLinux,isMacOS:yr.isMacOS,isSolaris:yr.isSolaris,isWindows:yr.isWindows},deviceType:{isDesktop:Va.isDesktop,isiPad:Va.isiPad,isiPhone:Va.isiPhone,isPhone:Va.isPhone,isTablet:Va.isTablet,isTouch:Va.isTouch,isWebView:Va.isWebView}},wl=/^\s*|\s*$/g,vr=e=>on(e)?"":(""+e).replace(wl,""),B=(e,n)=>n?n==="array"&&yn(e)?!0:typeof e===n:e!==void 0,Y=(e,n,o={})=>{const r=W(e)?e.split(n||","):e||[];let c=r.length;for(;c--;)o[r[c]]={};return o},se=Wn,Ke=(e,...n)=>{for(let o=0;on.call(r,c,u,o)===!1?!1:(Kt(c,n,o,r),!0)))},Et={trim:vr,isArray:yn,is:B,toArray:_o,makeMap:Y,each:ns,map:Nr,grep:Fr,inArray:lr,hasOwn:se,extend:Ke,walk:Kt,resolve:(e,n=window)=>{const o=e.split(".");for(let r=0,c=o.length;rmt(e)?e:e===""?[]:Nr(e.split(n||","),vr),_addCacheSuffix:e=>{const n=tn.cacheSuffix;return n&&(e+=(e.indexOf("?")===-1?"?":"&")+n),e}},Gs=(e,n,o=Yt)=>e.exists(r=>o(r,n)),Xa=(e,n,o=Yt)=>Yr(e,n,o).getOr(e.isNone()&&n.isNone()),fr=e=>{const n=[],o=r=>{n.push(r)};for(let r=0;re.isSome()&&n.isSome()?F.some(o(e.getOrDie(),n.getOrDie())):F.none(),Ci=(e,n,o,r)=>e.isSome()&&n.isSome()&&o.isSome()?F.some(r(e.getOrDie(),n.getOrDie(),o.getOrDie())):F.none(),q=(e,n)=>e?F.some(n):F.none(),ue=typeof window<"u"?window:Function("return this;")(),Pe=(e,n)=>{let o=n??ue;for(let r=0;r{const o=e.split(".");return Pe(o,n)},Jt=(e,n)=>pt(e,n),os=(e,n)=>{const o=Jt(e,n);if(o==null)throw new Error(e+" not available on this browser");return o},Er=Object.getPrototypeOf,Oa=e=>os("HTMLElement",e),ls=e=>{const n=pt("ownerDocument.defaultView",e);return Be(e)&&(Oa(n).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Er(e).constructor.name))},Xr=8,Wr=9,ua=11,ba=1,mu=3,rs=e=>e.dom.nodeName.toLowerCase(),kr=e=>e.dom.nodeType,Jr=e=>n=>kr(n)===e,ig=e=>kr(e)===Xr||rs(e)==="#comment",Mr=e=>gc(e)&&ls(e.dom),gc=Jr(ba),Ja=Jr(mu),hp=Jr(Wr),lg=Jr(ua),Si=e=>n=>gc(n)&&rs(n)===e,sm=(e,n,o)=>{if(W(o)||it(o)||po(o))e.setAttribute(n,o+"");else throw console.error("Invalid call to Attribute.set. Key ",n,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple")},mr=(e,n,o)=>{sm(e.dom,n,o)},Pi=(e,n)=>{const o=e.dom;Ot(n,(r,c)=>{sm(o,c,r)})},_c=(e,n)=>{const o=e.dom.getAttribute(n);return o===null?void 0:o},_l=(e,n)=>F.from(_c(e,n)),Da=(e,n)=>{const o=e.dom;return o&&o.hasAttribute?o.hasAttribute(n):!1},Qr=(e,n)=>{e.dom.removeAttribute(n)},Fi=e=>{const n=e.dom.attributes;return n==null||n.length===0},Lu=e=>Q(e.dom.attributes,(n,o)=>(n[o.name]=o.value,n),{}),Hu=(e,n)=>{const o=_c(e,n);return o===void 0||o===""?[]:o.split(" ")},rm=(e,n,o)=>{const c=Hu(e,n).concat([o]);return mr(e,n,c.join(" ")),!0},lf=(e,n,o)=>{const r=Ze(Hu(e,n),c=>c!==o);return r.length>0?mr(e,n,r.join(" ")):Qr(e,n),!1},Nc=e=>e.dom.classList!==void 0,uf=e=>Hu(e,"class"),Mc=(e,n)=>rm(e,"class",n),tl=(e,n)=>lf(e,"class",n),df=(e,n)=>ee(uf(e),n)?tl(e,n):Mc(e,n),gu=(e,n)=>{Nc(e)?e.dom.classList.add(n):Mc(e,n)},ff=e=>{(Nc(e)?e.dom.classList:uf(e)).length===0&&Qr(e,"class")},Cl=(e,n)=>{Nc(e)?e.dom.classList.remove(n):tl(e,n),ff(e)},ug=(e,n)=>{const o=Nc(e)?e.dom.classList.toggle(n):df(e,n);return ff(e),o},Xl=(e,n)=>Nc(e)&&e.dom.classList.contains(n),dg=(e,n)=>{const r=(n||document).createElement("div");if(r.innerHTML=e,!r.hasChildNodes()||r.childNodes.length>1){const c="HTML does not have a single root node";throw console.error(c,e),new Error(c)}return Vu(r.childNodes[0])},fg=(e,n)=>{const r=(n||document).createElement(e);return Vu(r)},mg=(e,n)=>{const r=(n||document).createTextNode(e);return Vu(r)},Vu=e=>{if(e==null)throw new Error("Node cannot be null or undefined");return{dom:e}},le={fromHtml:dg,fromTag:fg,fromText:mg,fromDom:Vu,fromPoint:(e,n,o)=>F.from(e.dom.elementFromPoint(n,o)).map(Vu)},pu=(e,n)=>{const o=[],r=u=>(o.push(u),n(u));let c=n(e);do c=c.bind(r);while(c.isSome());return o},xi=(e,n)=>{const o=e.dom;if(o.nodeType!==ba)return!1;{const r=o;if(r.matches!==void 0)return r.matches(n);if(r.msMatchesSelector!==void 0)return r.msMatchesSelector(n);if(r.webkitMatchesSelector!==void 0)return r.webkitMatchesSelector(n);if(r.mozMatchesSelector!==void 0)return r.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")}},kd=e=>e.nodeType!==ba&&e.nodeType!==Wr&&e.nodeType!==ua||e.childElementCount===0,gg=(e,n)=>{const o=n===void 0?document:n.dom;return kd(o)?[]:ve(o.querySelectorAll(e),le.fromDom)},eb=(e,n)=>{const o=n===void 0?document:n.dom;return kd(o)?F.none():F.from(o.querySelector(e)).map(le.fromDom)},xs=(e,n)=>e.dom===n.dom,pc=(e,n)=>{const o=e.dom,r=n.dom;return o===r?!1:o.contains(r)},Sl=e=>le.fromDom(e.dom.ownerDocument),Ti=e=>hp(e)?e:Sl(e),hu=e=>le.fromDom(Ti(e).dom.documentElement),$i=e=>le.fromDom(Ti(e).dom.defaultView),Qa=e=>F.from(e.dom.parentNode).map(le.fromDom),nl=e=>F.from(e.dom.parentElement).map(le.fromDom),pg=(e,n)=>{const o=ae(n)?n:Ne;let r=e.dom;const c=[];for(;r.parentNode!==null&&r.parentNode!==void 0;){const u=r.parentNode,m=le.fromDom(u);if(c.push(m),o(m)===!0)break;r=u}return c},yp=e=>{const n=o=>Ze(o,r=>!xs(e,r));return Qa(e).map(ya).map(n).getOr([])},Ei=e=>F.from(e.dom.previousSibling).map(le.fromDom),xl=e=>F.from(e.dom.nextSibling).map(le.fromDom),hg=e=>Un(pu(e,Ei)),Cc=e=>pu(e,xl),ya=e=>ve(e.dom.childNodes,le.fromDom),bu=(e,n)=>{const o=e.dom.childNodes;return F.from(o[n]).map(le.fromDom)},wd=e=>bu(e,0),Ii=e=>bu(e,e.dom.childNodes.length-1),Sc=e=>e.dom.childNodes.length,bg=e=>e.dom.hasChildNodes(),vp=e=>{const n=e.dom.head;if(n==null)throw new Error("Head is not available yet");return le.fromDom(n)},mf=e=>lg(e)&&Ie(e.dom.host),am=ae(Element.prototype.attachShadow)&&ae(Node.prototype.getRootNode),_d=st(am),Tl=am?e=>le.fromDom(e.dom.getRootNode()):Ti,kp=e=>mf(e)?e:vp(Ti(e)),jy=e=>mf(e)?e:le.fromDom(Ti(e).dom.body),yg=e=>{const n=Tl(e);return mf(n)?F.some(n):F.none()},vg=e=>le.fromDom(e.dom.host),Uu=e=>{if(_d()&&Ie(e.target)){const n=le.fromDom(e.target);if(gc(n)&&gf(n)&&e.composed&&e.composedPath){const o=e.composedPath();if(o)return gn(o)}}return F.from(e.target)},gf=e=>Ie(e.dom.shadowRoot),Cd=e=>{const n=Ja(e)?e.dom.parentNode:e.dom;if(n==null||n.ownerDocument===null)return!1;const o=n.ownerDocument;return yg(le.fromDom(n)).fold(()=>o.body.contains(n),rn(Cd,vg))};var Ar=(e,n,o,r,c)=>e(o,r)?F.some(o):ae(c)&&c(o)?F.none():n(o,r,c);const Ir=(e,n,o)=>{let r=e.dom;const c=ae(o)?o:Ne;for(;r.parentNode;){r=r.parentNode;const u=le.fromDom(r);if(n(u))return F.some(u);if(c(u))break}return F.none()},Bc=(e,n,o)=>Ar((c,u)=>u(c),Ir,e,n,o),kg=(e,n)=>{const o=e.dom;return o.parentNode?wp(le.fromDom(o.parentNode),r=>!xs(e,r)&&n(r)):F.none()},wp=(e,n)=>{const o=c=>n(le.fromDom(c));return Ve(e.dom.childNodes,o).map(le.fromDom)},Ua=(e,n)=>{const o=r=>{for(let c=0;cIr(e,r=>xi(r,n),o),Pc=(e,n)=>eb(n,e),El=(e,n,o)=>Ar((c,u)=>xi(c,u),Jl,e,n,o),cm=e=>El(e,"[contenteditable]"),Ho=(e,n=!1)=>Cd(e)?e.dom.isContentEditable:cm(e).fold(st(n),o=>qc(o)==="true"),qc=e=>e.dom.contentEditable,yu=e=>e.style!==void 0&&ae(e.style.getPropertyValue),Sd=(e,n,o)=>{if(!W(o))throw console.error("Invalid call to CSS.set. Property ",n,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);yu(e)&&e.style.setProperty(n,o)},im=(e,n)=>{yu(e)&&e.style.removeProperty(n)},_p=(e,n,o)=>{const r=e.dom;Sd(r,n,o)},ec=(e,n)=>{const o=e.dom;Ot(n,(r,c)=>{Sd(o,c,r)})},aa=(e,n)=>{const o=e.dom,c=window.getComputedStyle(o).getPropertyValue(n);return c===""&&!Cd(e)?ai(o,n):c},ai=(e,n)=>yu(e)?e.style.getPropertyValue(n):"",va=(e,n)=>{const o=e.dom,r=ai(o,n);return F.from(r).filter(c=>c.length>0)},xd=e=>{const n={},o=e.dom;if(yu(o))for(let r=0;r{const o=e.dom;im(o,n),Gs(_l(e,"style").map(Ba),"")&&Qr(e,"style")},ea=e=>e.dom.offsetWidth,za=(e,n)=>{Qa(e).each(r=>{r.dom.insertBefore(n.dom,e.dom)})},ol=(e,n)=>{xl(e).fold(()=>{Qa(e).each(c=>{da(c,n)})},r=>{za(r,n)})},Wu=(e,n)=>{wd(e).fold(()=>{da(e,n)},r=>{e.dom.insertBefore(n.dom,r.dom)})},da=(e,n)=>{e.dom.appendChild(n.dom)},wg=(e,n)=>{za(e,n),da(n,e)},Cp=(e,n)=>{re(n,(o,r)=>{const c=r===0?e:n[r-1];ol(c,o)})},Zs=(e,n)=>{re(n,o=>{da(e,o)})},sl=e=>{e.dom.textContent="",re(ya(e),n=>{Ts(n)})},Ts=e=>{const n=e.dom;n.parentNode!==null&&n.parentNode.removeChild(n)},Fc=e=>{const n=ya(e);n.length>0&&Cp(e,n),Ts(e)},vu=(e,n)=>{const r=(n||document).createElement("div");return r.innerHTML=e,ya(le.fromDom(r))},Ql=e=>ve(e,le.fromDom),Jo=e=>e.dom.innerHTML,Zu=(e,n)=>{const r=Sl(e).dom,c=le.fromDom(r.createDocumentFragment()),u=vu(n,r);Zs(c,u),sl(e),da(e,c)},_g=e=>{const n=le.fromTag("div"),o=le.fromDom(e.dom.cloneNode(!0));return da(n,o),Jo(n)},Cg=(e,n,o,r,c,u,m)=>({target:e,x:n,y:o,stop:r,prevent:c,kill:u,raw:m}),tb=e=>{const n=le.fromDom(Uu(e).getOr(e.target)),o=()=>e.stopPropagation(),r=()=>e.preventDefault(),c=E(r,o);return Cg(n,e.clientX,e.clientY,o,r,c,e)},Sp=(e,n)=>o=>{e(o)&&n(tb(o))},lm=(e,n,o,r,c)=>{const u=Sp(o,r);return e.dom.addEventListener(n,u,c),{unbind:et(pf,e,n,u,c)}},Sg=(e,n,o,r)=>lm(e,n,o,r,!1),pf=(e,n,o,r)=>{e.dom.removeEventListener(n,o,r)},C=(e,n)=>({left:e,top:n,translate:(r,c)=>C(e+r,n+c)}),z=C,H=e=>{const n=e.getBoundingClientRect();return z(n.left,n.top)},ce=(e,n)=>e!==void 0?e:n!==void 0?n:0,ye=e=>{const n=e.dom.ownerDocument,o=n.body,r=n.defaultView,c=n.documentElement;if(o===e.dom)return z(o.offsetLeft,o.offsetTop);const u=ce(r==null?void 0:r.pageYOffset,c.scrollTop),m=ce(r==null?void 0:r.pageXOffset,c.scrollLeft),b=ce(c.clientTop,o.clientTop),v=ce(c.clientLeft,o.clientLeft);return Rt(e).translate(m-v,u-b)},Rt=e=>{const n=e.dom,r=n.ownerDocument.body;return r===n?z(r.offsetLeft,r.offsetTop):Cd(e)?H(n):z(0,0)},Rn=e=>{const n=e!==void 0?e.dom:document,o=n.body.scrollLeft||n.documentElement.scrollLeft,r=n.body.scrollTop||n.documentElement.scrollTop;return z(o,r)},Do=(e,n,o)=>{const c=(o!==void 0?o.dom:document).defaultView;c&&c.scrollTo(e,n)},xo=(e,n)=>{qs().browser.isSafari()&&ae(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(n)},lo=e=>{const n=e===void 0?window:e;return qs().browser.isFirefox()?F.none():F.from(n.visualViewport)},zr=(e,n,o,r)=>({x:e,y:n,width:o,height:r,right:e+o,bottom:n+r}),ja=e=>{const n=e===void 0?window:e,o=n.document,r=Rn(le.fromDom(o));return lo(n).fold(()=>{const c=n.document.documentElement,u=c.clientWidth,m=c.clientHeight;return zr(r.left,r.top,u,m)},c=>zr(Math.max(c.pageLeft,r.left),Math.max(c.pageTop,r.top),c.width,c.height))},ci=(e,n)=>Ze(ya(e),n),eu=(e,n)=>{let o=[];return re(ya(e),r=>{n(r)&&(o=o.concat([r])),o=o.concat(eu(r,n))}),o},tc=(e,n)=>gg(n,e),av=(e,n,o)=>Jl(e,n,o).isSome();class wr{constructor(n,o){this.node=n,this.rootNode=o,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}current(){return this.node}next(n){return this.node=this.findSibling(this.node,"firstChild","nextSibling",n),this.node}prev(n){return this.node=this.findSibling(this.node,"lastChild","previousSibling",n),this.node}prev2(n){return this.node=this.findPreviousNode(this.node,n),this.node}findSibling(n,o,r,c){if(n){if(!c&&n[o])return n[o];if(n!==this.rootNode){let u=n[r];if(u)return u;for(let m=n.parentNode;m&&m!==this.rootNode;m=m.parentNode)if(u=m[r],u)return u}}}findPreviousNode(n,o){if(n){const r=n.previousSibling;if(this.rootNode&&r===this.rootNode)return;if(r){if(!o){for(let u=r.lastChild;u;u=u.lastChild)if(!u.lastChild)return u}return r}const c=n.parentNode;if(c&&c!==this.rootNode)return c}}}const Kn=e=>n=>!!n&&n.nodeType===e,ku=e=>!!e&&!Object.getPrototypeOf(e),Cn=Kn(1),tu=e=>Cn(e)&&Mr(le.fromDom(e)),Wy=e=>Cn(e)&&e.namespaceURI==="http://www.w3.org/2000/svg",wu=e=>{const n=e.toLowerCase();return o=>Ie(o)&&o.nodeName.toLowerCase()===n},ka=e=>{const n=e.map(o=>o.toLowerCase());return o=>{if(o&&o.nodeName){const r=o.nodeName.toLowerCase();return ee(n,r)}return!1}},qu=(e,n)=>{const o=n.toLowerCase().split(" ");return r=>{if(Cn(r)){const c=r.ownerDocument.defaultView;if(c)for(let u=0;un=>Cn(n)&&n.hasAttribute(e),nc=(e,n)=>o=>Cn(o)&&o.getAttribute(e)===n,nu=e=>Cn(e)&&e.hasAttribute("data-mce-bogus"),xp=e=>Cn(e)&&e.getAttribute("data-mce-bogus")==="all",_u=e=>Cn(e)&&e.tagName==="TABLE",Zy=e=>n=>!!(tu(n)&&(n.contentEditable===e||n.getAttribute("data-mce-contenteditable")===e)),Tg=ka(["textarea","input"]),Mt=Kn(3),qy=Kn(4),Td=Kn(7),Gu=Kn(8),Eg=Kn(9),Lr=Kn(11),er=wu("br"),Gc=wu("img"),$c=Zy("true"),hs=Zy("false"),um=ka(["td","th"]),hc=ka(["td","th","caption"]),ca=ka(["video","audio","object","embed"]),Tp=wu("li"),_t=wu("details"),Ai=wu("summary"),Ag="\uFEFF",Ms=" ",ou=e=>e===Ag,Gy=e=>e.replace(/\uFEFF/g,""),nb=((e,n)=>{const o=u=>{if(!e(u))throw new Error("Can only get "+n+" value of a "+n+" node");return r(u).getOr("")},r=u=>e(u)?F.from(u.dom.nodeValue):F.none();return{get:o,getOption:r,set:(u,m)=>{if(!e(u))throw new Error("Can only set raw "+n+" value of a "+n+" node");u.dom.nodeValue=m}}})(Ja,"text"),Al=e=>nb.get(e),ob=e=>nb.getOption(e),Li=(e,n)=>nb.set(e,n),js=["td","th"],Cu=["thead","tbody","tfoot"],hf=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],bc=["li","dd","dt"],sb=["ul","ol","dl"],bf=["pre","script","textarea","style"],yf=e=>{let n;return o=>(n=n||Ln(e,at),Wn(n,rs(o)))},Kc=e=>rs(e)==="table",Ed=e=>gc(e)&&rs(e)==="br",Le=yf(hf),ii=yf(sb),rl=yf(bc),al=yf(Cu),li=yf(js),$a=yf(bf),Wa=e=>{const n=[];let o=e.dom;for(;o;)n.push(le.fromDom(o)),o=o.lastChild;return n},Ky=e=>{const n=tc(e,"br"),o=Ze(Wa(e).slice(-1),Ed);n.length===o.length&&re(o,Ts)},ui=()=>{const e=le.fromTag("br");return mr(e,"data-mce-bogus","1"),e},Su=e=>{sl(e),da(e,ui())},ao=(e,n)=>{Ii(e).each(o=>{Ei(o).each(r=>{n.isBlock(rs(e))&&Ed(o)&&n.isBlock(rs(r))&&Ts(o)})})},w=Ag,T=ou,L=Gy,K=e=>e.insertContent(w,{preserve_zwsp:!0}),_e=Cn,dt=Mt,Pt=e=>(dt(e)&&(e=e.parentNode),_e(e)&&e.hasAttribute("data-mce-caret")),Qt=e=>dt(e)&&T(e.data),Yn=e=>Pt(e)||Qt(e),Vo=e=>e.firstChild!==e.lastChild||!er(e.firstChild),ta=(e,n)=>{var o;const c=((o=e.ownerDocument)!==null&&o!==void 0?o:document).createTextNode(w),u=e.parentNode;if(n){const m=e.previousSibling;if(dt(m)){if(Yn(m))return m;if(cl(m))return m.splitText(m.data.length-1)}u==null||u.insertBefore(c,e)}else{const m=e.nextSibling;if(dt(m)){if(Yn(m))return m;if(di(m))return m.splitText(1),m}e.nextSibling?u==null||u.insertBefore(c,e.nextSibling):u==null||u.appendChild(c)}return c},Hs=e=>{const n=e.container();return Mt(n)?n.data.charAt(e.offset())===w||e.isAtStart()&&Qt(n.previousSibling):!1},Or=e=>{const n=e.container();return Mt(n)?n.data.charAt(e.offset()-1)===w||e.isAtEnd()&&Qt(n.nextSibling):!1},Oi=(e,n,o)=>{var r;const u=((r=n.ownerDocument)!==null&&r!==void 0?r:document).createElement(e);u.setAttribute("data-mce-caret",o?"before":"after"),u.setAttribute("data-mce-bogus","all"),u.appendChild(ui().dom);const m=n.parentNode;return o?m==null||m.insertBefore(u,n):n.nextSibling?m==null||m.insertBefore(u,n.nextSibling):m==null||m.appendChild(u),u},di=e=>dt(e)&&e.data[0]===w,cl=e=>dt(e)&&e.data[e.data.length-1]===w,Ad=e=>{var n;const o=e.getElementsByTagName("br"),r=o[o.length-1];nu(r)&&((n=r.parentNode)===null||n===void 0||n.removeChild(r))},ru=e=>e&&e.hasAttribute("data-mce-caret")?(Ad(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("data-mce-style"),e.removeAttribute("_moz_abspos"),e):null,Og=e=>Pt(e.startContainer),dm=$c,vf=hs,Dg=er,Ra=Mt,il=ka(["script","style","textarea"]),fm=ka(["img","input","textarea","hr","iframe","video","audio","object","embed"]),kf=ka(["table"]),Ps=Yn,ms=e=>Ps(e)?!1:Ra(e)?!il(e.parentNode):fm(e)||Dg(e)||kf(e)||Ic(e),oc=e=>Cn(e)&&e.getAttribute("unselectable")==="true",Ic=e=>!oc(e)&&vf(e),rb=(e,n)=>{for(let o=e.parentNode;o&&o!==n;o=o.parentNode){if(Ic(o))return!1;if(dm(o))return!0}return!0},Ku=e=>Ic(e)?!Q(cs(e.getElementsByTagName("*")),(n,o)=>n||dm(o),!1):!1,Lc=e=>fm(e)||Ku(e),wf=(e,n)=>ms(e)&&rb(e,n),xu=/^[ \t\r\n]*$/,mm=e=>xu.test(e),zg=e=>{for(const n of e)if(!ou(n))return!1;return!0},Ep=e=>" \f \v".indexOf(e)!==-1,_f=e=>e===` `||e==="\r",tT=(e,n)=>n=0?_f(e[n]):!1,Rg=(e,n=4,o=!0,r=!0)=>{const c=vs(" ",n),u=e.replace(/\t/g,c);return Q(u,(b,v)=>Ep(v)||v===Ms?b.pcIsSpace||b.str===""&&o||b.str.length===u.length-1&&r||tT(u,b.str.length+1)?{pcIsSpace:!1,str:b.str+Ms}:{pcIsSpace:!0,str:b.str+" "}:{pcIsSpace:_f(v),str:b.str+v},{pcIsSpace:!1,str:""}).str},cv=(e,n)=>{const o=le.fromDom(n),r=le.fromDom(e);return av(r,"pre,code",et(xs,o))},T_=(e,n)=>Mt(e)&&mm(e.data)&&!cv(e,n),wa=e=>Cn(e)&&e.nodeName==="A"&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id")),Ap=(e,n)=>ms(e)&&!T_(e,n)||wa(e)||Yu(e),Yu=xg("data-mce-bookmark"),gm=xg("data-mce-bogus"),Ng=nc("data-mce-bogus","all"),Mg=e=>nl(le.fromDom(e)).exists(n=>!Ho(n)),ll=(e,n)=>{let o=0;if(Ap(e,e))return!1;{let r=e.firstChild;if(!r)return!0;const c=new wr(r,e);do{if(n){if(Ng(r)){r=c.next(!0);continue}if(gm(r)){r=c.next();continue}}if($c(r)&&Mg(r))return!1;if(er(r)){o++,r=c.next();continue}if(Ap(r,e))return!1;r=c.next()}while(r);return o<=1}},ia=(e,n=!0)=>ll(e.dom,n),Xu=e=>e.toLowerCase()==="svg",iv=e=>Xu(e.nodeName),ab=e=>(e==null?void 0:e.nodeName)==="svg"?"svg":"html",Yy=["svg"],pm=()=>{let e=[];const n=()=>e[e.length-1];return{track:u=>{iv(u)&&e.push(u);let m=n();return m&&!m.contains(u)&&(e.pop(),m=n()),ab(m)},current:()=>ab(n()),reset:()=>{e=[]}}},cb="data-mce-block",Xy=e=>Ze(ts(e),n=>!/[A-Z]/.test(n)),Od=e=>ve(Xy(e),n=>`${n}:`+ve(Yy,o=>`not(${o} ${n})`).join(":")).join(","),Ju=(e,n)=>Ie(n.querySelector(e))?(n.setAttribute(cb,"true"),n.getAttribute("data-mce-selected")==="inline-boundary"&&n.removeAttribute("data-mce-selected"),!0):(n.removeAttribute(cb),!1),Ol=(e,n)=>{const o=Od(e.getTransparentElements()),r=Od(e.getBlockElements());return Ze(n.querySelectorAll(o),c=>Ju(r,c))},hm=(e,n)=>{var o;const r=n?"lastChild":"firstChild";for(let c=e[r];c;c=c[r])if(ia(le.fromDom(c))){(o=c.parentNode)===null||o===void 0||o.removeChild(c);return}},bm=(e,n)=>{const o=document.createRange(),r=e.parentNode;if(r){o.setStartBefore(e),o.setEndBefore(n);const c=o.extractContents();hm(c,!0),o.setStartAfter(n),o.setEndAfter(e);const u=o.extractContents();hm(u,!1),ia(le.fromDom(c))||r.insertBefore(c,e),ia(le.fromDom(n))||r.insertBefore(n,e),ia(le.fromDom(u))||r.insertBefore(u,e),r.removeChild(e)}},E_=(e,n,o)=>{const r=e.getBlockElements(),c=le.fromDom(n),u=b=>rs(b)in r,m=b=>xs(b,c);re(Ql(o),b=>{Ir(b,u,m).each(v=>{const x=ci(b,R=>u(R)&&!e.isValidChild(rs(v),rs(R)));if(x.length>0){const R=nl(v);re(x,N=>{Ir(N,u,m).each($=>{bm($.dom,N.dom)})}),R.each(N=>Ol(e,N.dom))}})})},Jy=(e,n,o)=>{re([...o,...ks(e,n)?[n]:[]],r=>re(tc(le.fromDom(r),r.nodeName.toLowerCase()),c=>{oo(e,c.dom)&&Fc(c)}))},ib=(e,n)=>{const o=Ol(e,n);E_(e,n,o),Jy(e,n,o)},Qy=(e,n)=>{if(ub(e,n)){const o=Od(e.getBlockElements());Ju(o,n)}},A_=(e,n,o)=>{const r=u=>xs(u,le.fromDom(n)),c=pg(le.fromDom(o),r);Jn(c,c.length-2).filter(gc).fold(()=>ib(e,n),u=>ib(e,u.dom))},e1=e=>e.hasAttribute(cb),lb=(e,n)=>Wn(e.getTransparentElements(),n),ub=(e,n)=>Cn(n)&&lb(e,n.nodeName),ks=(e,n)=>ub(e,n)&&e1(n),oo=(e,n)=>ub(e,n)&&!e1(n),Cf=(e,n)=>n.type===1&&lb(e,n.name)&&W(n.attr(cb)),t1=qs().browser,db=e=>Ve(e,gc),nT=e=>t1.isFirefox()&&rs(e)==="table"?db(ya(e)).filter(n=>rs(n)==="caption").bind(n=>db(Cc(n)).map(o=>{const r=o.dom.offsetTop,c=n.dom.offsetTop,u=n.dom.offsetHeight;return r<=c?-u:0})).getOr(0):0,lv=(e,n)=>e.children&&ee(e.children,n),_r=(e,n,o)=>{let r=0,c=0;const u=e.ownerDocument;if(o=o||e,n){if(o===e&&n.getBoundingClientRect&&aa(le.fromDom(e),"position")==="static"){const b=n.getBoundingClientRect();return r=b.left+(u.documentElement.scrollLeft||e.scrollLeft)-u.documentElement.clientLeft,c=b.top+(u.documentElement.scrollTop||e.scrollTop)-u.documentElement.clientTop,{x:r,y:c}}let m=n;for(;m&&m!==o&&m.nodeType&&!lv(m,o);){const b=m;r+=b.offsetLeft||0,c+=b.offsetTop||0,m=b.offsetParent}for(m=n.parentNode;m&&m!==o&&m.nodeType&&!lv(m,o);)r-=m.scrollLeft||0,c-=m.scrollTop||0,m=m.parentNode;c+=nT(le.fromDom(n))}return{x:r,y:c}},uv=(e,n={})=>{let o=0;const r={},c=le.fromDom(e),u=Ti(c),m=xe=>{n.referrerPolicy=xe},b=xe=>{n.contentCssCors=xe},v=xe=>{da(kp(c),xe)},x=xe=>{const Oe=kp(c);Pc(Oe,"#"+xe).each(Ts)},R=xe=>Ss(r,xe).getOrThunk(()=>({id:"mce-u"+o++,passed:[],failed:[],count:0})),N=xe=>new Promise((Oe,Ae)=>{let Ue;const St=Et._addCacheSuffix(xe),It=R(St);r[St]=It,It.count++;const ln=(Sn,eo)=>{re(Sn,fn),It.status=eo,It.passed=[],It.failed=[],Ue&&(Ue.onload=null,Ue.onerror=null,Ue=null)},ut=()=>ln(It.passed,2),tt=()=>ln(It.failed,3);if(Oe&&It.passed.push(Oe),Ae&&It.failed.push(Ae),It.status===1)return;if(It.status===2){ut();return}if(It.status===3){tt();return}It.status=1;const Ct=le.fromTag("link",u.dom);Pi(Ct,{rel:"stylesheet",type:"text/css",id:It.id}),n.contentCssCors&&mr(Ct,"crossOrigin","anonymous"),n.referrerPolicy&&mr(Ct,"referrerpolicy",n.referrerPolicy),Ue=Ct.dom,Ue.onload=ut,Ue.onerror=tt,v(Ct),mr(Ct,"href",St)}),$=(xe,Oe)=>{const Ae=R(xe);r[xe]=Ae,Ae.count++;const Ue=le.fromTag("style",u.dom);Pi(Ue,{rel:"stylesheet",type:"text/css",id:Ae.id}),Ue.dom.innerHTML=Oe,v(Ue)},J=xe=>Promise.allSettled(ve(xe,Ae=>N(Ae).then(st(Ae)))).then(Ae=>{const Ue=Fe(Ae,St=>St.status==="fulfilled");return Ue.fail.length>0?Promise.reject(ve(Ue.fail,St=>St.reason)):ve(Ue.pass,St=>St.value)}),ne=xe=>{const Oe=Et._addCacheSuffix(xe);Ss(r,Oe).each(Ae=>{--Ae.count===0&&(delete r[Oe],x(Ae.id))})};return{load:N,loadRawCss:$,loadAll:J,unload:ne,unloadRawCss:xe=>{Ss(r,xe).each(Oe=>{--Oe.count===0&&(delete r[xe],x(Oe.id))})},unloadAll:xe=>{re(xe,Oe=>{ne(Oe)})},_setReferrerPolicy:m,_setContentCssCors:b}},fv=(()=>{const e=new WeakMap;return{forElement:(o,r)=>{const u=Tl(o).dom;return F.from(e.get(u)).getOrThunk(()=>{const m=uv(u,r);return e.set(u,m),m})}}})(),vt=e=>e.nodeName.toLowerCase()==="span",n1=(e,n,o)=>Ie(e)&&(Ap(e,n)||o.isInline(e.nodeName.toLowerCase())),oT=(e,n,o)=>{const r=new wr(e,n).prev(!1),c=new wr(e,n).next(!1),u=pn(r)||n1(r,n,o),m=pn(c)||n1(c,n,o);return u&&m},fb=e=>vt(e)&&e.getAttribute("data-mce-type")==="bookmark",sT=(e,n,o)=>Mt(e)&&e.data.length>0&&oT(e,n,o),Op=e=>Cn(e)?e.childNodes.length>0:!1,mv=e=>Lr(e)||Eg(e),Sf=(e,n,o,r)=>{var c;const u=r||n;if(Cn(n)&&fb(n))return n;const m=n.childNodes;for(let b=m.length-1;b>=0;b--)Sf(e,m[b],o,u);if(Cn(n)){const b=n.childNodes;b.length===1&&fb(b[0])&&((c=n.parentNode)===null||c===void 0||c.insertBefore(b[0],n))}return!mv(n)&&!Ap(n,u)&&!Op(n)&&!sT(n,u,o)&&e.remove(n),n},rT=Et.makeMap,Dd=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,gr=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,zd=/[<>&\"\']/g,gv=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Tu={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},xf={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},pv={"<":"<",">":">","&":"&",""":'"',"'":"'"},Bg=e=>{const n=le.fromTag("div").dom;return n.innerHTML=e,n.textContent||n.innerText||e},O_=(e,n)=>{const o={};if(e){const r=e.split(",");n=n||10;for(let c=0;ce.replace(n?Dd:gr,o=>xf[o]||o),aT=e=>(""+e).replace(zd,n=>xf[n]||n),bv=(e,n)=>e.replace(n?Dd:gr,o=>o.length>1?"&#"+((o.charCodeAt(0)-55296)*1024+(o.charCodeAt(1)-56320)+65536)+";":xf[o]||"&#"+o.charCodeAt(0)+";"),Rd=(e,n,o)=>{const r=o||o1;return e.replace(n?Dd:gr,c=>xf[c]||r[c]||c)},ym={encodeRaw:hv,encodeAllRaw:aT,encodeNumeric:bv,encodeNamed:Rd,getEncodeFunc:(e,n)=>{const o=O_(n)||o1,r=(m,b)=>m.replace(b?Dd:gr,v=>xf[v]!==void 0?xf[v]:o[v]!==void 0?o[v]:v.length>1?"&#"+((v.charCodeAt(0)-55296)*1024+(v.charCodeAt(1)-56320)+65536)+";":"&#"+v.charCodeAt(0)+";"),c=(m,b)=>Rd(m,b,o),u=rT(e.replace(/\+/g,","));return u.named&&u.numeric?r:u.named?n?c:Rd:u.numeric?bv:hv},decode:e=>e.replace(gv,(n,o)=>o?(o.charAt(0).toLowerCase()==="x"?o=parseInt(o.substr(1),16):o=parseInt(o,10),o>65535?(o-=65536,String.fromCharCode(55296+(o>>10),56320+(o&1023))):Tu[o]||String.fromCharCode(o)):pv[n]||o1[n]||Bg(n))},Hc=(e,n)=>(e=Et.trim(e),e?e.split(n||" "):[]),_n=e=>new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$"),cT=e=>{const n=/^(~)?(.+)$/;return Dn(Hc(e,","),o=>{const r=n.exec(o);if(r){const c=r[1]==="~",u=c?"span":"div",m=r[2];return[{inline:c,cloneName:u,name:m}]}else return[]})},vv=e=>{let n,o,r;if(n="id accesskey class dir lang style tabindex title role",o="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul",r="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment",e!=="html4"){const u="a ins del canvas map";n+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",o+=" article aside details dialog figure main header footer hgroup section nav "+u,r+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen svg"}e!=="html5-strict"&&(n+=" xml:lang",r=[r,"acronym applet basefont big font strike tt"].join(" "),o=[o,"center dir isindex noframes"].join(" "));const c=[o,r].join(" ");return{globalAttributes:n,blockContent:o,phrasingContent:r,flowContent:c}},iT=e=>{const{globalAttributes:n,phrasingContent:o,flowContent:r}=vv(e),c={},u=(v,x,R)=>{c[v]={attributes:Ln(x,st({})),attributesOrder:x,children:Ln(R,st({}))}},m=(v,x="",R="")=>{const N=Hc(R),$=Hc(v);let J=$.length;const ne=Hc([n,x].join(" "));for(;J--;)u($[J],ne.slice(),N)},b=(v,x)=>{const R=Hc(v),N=Hc(x);let $=R.length;for(;$--;){const J=c[R[$]];for(let ne=0,G=N.length;ne{m(R,"",o)}),re(Hc("center dir isindex noframes"),R=>{m(R,"",r)})),m("html","manifest","head body"),m("head","","base command link meta noscript script style title"),m("title hr noscript br"),m("base","href target"),m("link","href rel media hreflang type sizes hreflang"),m("meta","name http-equiv content charset"),m("style","media type scoped"),m("script","src async defer type charset"),m("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",r),m("dd div","",r),m("address dt caption","",e==="html4"?o:r),m("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",o),m("blockquote","cite",r),m("ol","reversed start type","li"),m("ul","","li"),m("li","value",r),m("dl","","dt dd"),m("a","href target rel media hreflang type",e==="html4"?o:r),m("q","cite",o),m("ins del","cite datetime",r),m("img","src sizes srcset alt usemap ismap width height"),m("iframe","src name width height",r),m("embed","src type width height"),m("object","data type typemustmatch name usemap form width height",[r,"param"].join(" ")),m("param","name value"),m("map","name",[r,"area"].join(" ")),m("area","alt coords shape href target rel media hreflang type"),m("table","border","caption colgroup thead tfoot tbody tr"+(e==="html4"?" col":"")),m("colgroup","span","col"),m("col","span"),m("tbody thead tfoot","","tr"),m("tr","","td th"),m("td","colspan rowspan headers",r),m("th","colspan rowspan headers scope abbr",r),m("form","accept-charset action autocomplete enctype method name novalidate target",r),m("fieldset","disabled form name",[r,"legend"].join(" ")),m("label","form for",o),m("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),m("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value",e==="html4"?r:o),m("select","disabled form multiple name required size","option optgroup"),m("optgroup","disabled label","option"),m("option","disabled label selected value"),m("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),m("menu","type label",[r,"li"].join(" ")),m("noscript","",r),e!=="html4"&&(m("wbr"),m("ruby","",[o,"rt rp"].join(" ")),m("figcaption","",r),m("mark rt rp bdi","",o),m("summary","",[o,"h1 h2 h3 h4 h5 h6"].join(" ")),m("canvas","width height",r),m("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[r,"track source"].join(" ")),m("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[r,"track source"].join(" ")),m("picture","","img source"),m("source","src srcset type media sizes"),m("track","kind src srclang label default"),m("datalist","",[o,"option"].join(" ")),m("article section nav aside main header footer","",r),m("hgroup","","h1 h2 h3 h4 h5 h6"),m("figure","",[r,"figcaption"].join(" ")),m("time","datetime",o),m("dialog","open",r),m("command","type label icon disabled checked radiogroup command"),m("output","for form name",o),m("progress","value max",o),m("meter","value min max low high optimum",o),m("details","open",[r,"summary"].join(" ")),m("keygen","autofocus challenge disabled form keytype name"),u("svg","id tabindex lang xml:space class style x y width height viewBox preserveAspectRatio zoomAndPan transform".split(" "),[])),e!=="html5-strict"&&(b("script","language xml:space"),b("style","xml:space"),b("object","declare classid code codebase codetype archive standby align border hspace vspace"),b("embed","align name hspace vspace"),b("param","valuetype type"),b("a","charset name rev shape coords"),b("br","clear"),b("applet","codebase archive code object alt name width height align hspace vspace"),b("img","name longdesc align border hspace vspace"),b("iframe","longdesc frameborder marginwidth marginheight scrolling align"),b("font basefont","size color face"),b("input","usemap align"),b("select"),b("textarea"),b("h1 h2 h3 h4 h5 h6 div p legend caption","align"),b("ul","type compact"),b("li","type"),b("ol dl menu dir","compact"),b("pre","width xml:space"),b("hr","align noshade size width"),b("isindex","prompt"),b("table","summary width frame rules cellspacing cellpadding align bgcolor"),b("col","width align char charoff valign"),b("colgroup","width align char charoff valign"),b("thead","align char charoff valign"),b("tr","align char charoff valign bgcolor"),b("th","axis align char charoff valign nowrap bgcolor width height"),b("form","accept"),b("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),b("tfoot","align char charoff valign"),b("tbody","align char charoff valign"),b("area","nohref"),b("body","background bgcolor text link vlink alink")),e!=="html4"&&(b("input button select textarea","autofocus"),b("input textarea","placeholder"),b("a","download"),b("link script img","crossorigin"),b("img","loading"),b("iframe","sandbox seamless allow allowfullscreen loading")),e!=="html4"&&re([c.video,c.audio],v=>{delete v.children.audio,delete v.children.video}),re(Hc("a form meter progress dfn"),v=>{c[v]&&delete c[v].children[v]}),delete c.caption.children.table,delete c.script,c},D_=e=>e==="-"?"remove":"add",Pg=e=>{const n=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;return Dn(Hc(e,","),o=>{const r=n.exec(o);if(r){const c=r[1],u=c?D_(c):"replace",m=r[2],b=Hc(r[3],"|");return[{operation:u,name:m,validChildren:b}]}else return[]})},Dp=(e,n)=>{const o=/^([!\-])?(\w+[\\:]:\w+|[^=~<]+)?(?:([=~<])(.*))?$/,r=/[*?+]/,{attributes:c,attributesOrder:u}=n;return re(Hc(e,"|"),m=>{const b=o.exec(m);if(b){const v={},x=b[1],R=b[2].replace(/[\\:]:/g,":"),N=b[3],$=b[4];if(x==="!"&&(n.attributesRequired=n.attributesRequired||[],n.attributesRequired.push(R),v.required=!0),x==="-"){delete c[R],u.splice(Et.inArray(u,R),1);return}if(N&&(N==="="?(n.attributesDefault=n.attributesDefault||[],n.attributesDefault.push({name:R,value:$}),v.defaultValue=$):N==="~"?(n.attributesForced=n.attributesForced||[],n.attributesForced.push({name:R,value:$}),v.forcedValue=$):N==="<"&&(v.validValues=Et.makeMap($,"?"))),r.test(R)){const J=v;n.attributePatterns=n.attributePatterns||[],J.pattern=_n(R),n.attributePatterns.push(J)}else c[R]||u.push(R),c[R]=v}})},mb=(e,n)=>{Ot(e.attributes,(o,r)=>{n.attributes[r]=o}),n.attributesOrder.push(...e.attributesOrder)},zp=(e,n)=>{const o=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/;return Dn(Hc(n,","),r=>{const c=o.exec(r);if(c){const u=c[1],m=c[2],b=c[3],v=c[4],x=c[5],R={attributes:{},attributesOrder:[]};if(e.each(N=>mb(N,R)),u==="#"?R.paddEmpty=!0:u==="-"&&(R.removeEmpty=!0),v==="!"&&(R.removeEmptyAttrs=!0),x&&Dp(x,R),b&&(R.outputName=m),m==="@")if(e.isNone())e=F.some(R);else return[];return[b?{name:m,element:R,aliasName:b}:{name:m,element:R}]}else return[]})},s1={},Tf=Et.makeMap,Qu=Et.each,gb=Et.extend,au=Et.explode,r1=(e,n={})=>{const o=Tf(e," ",Tf(e.toUpperCase()," "));return gb(o,n)},z_=e=>r1("td th li dt dd figcaption caption details summary",e.getTextBlockElements()),Rp=(e,n)=>{if(e){const o={};return W(e)&&(e={"*":e}),Qu(e,(r,c)=>{o[c]=o[c.toUpperCase()]=n==="map"?Tf(r,/[, ]/):au(r,/[, ]/)}),o}else return},Ef=(e={})=>{var n;const o={},r={};let c=[];const u={},m={},b=(Fo,Fs,Tr)=>{const Ur=e[Fo];if(Ur)return Tf(Ur,/[, ]/,Tf(Ur.toUpperCase(),/[, ]/));{let sa=s1[Fo];return sa||(sa=r1(Fs,Tr),s1[Fo]=sa),sa}},v=(n=e.schema)!==null&&n!==void 0?n:"html5",x=iT(v);e.verify_html===!1&&(e.valid_elements="*[*]");const R=Rp(e.valid_styles),N=Rp(e.invalid_styles,"map"),$=Rp(e.valid_classes,"map"),J=b("whitespace_elements","pre script noscript style textarea video audio iframe object code"),ne=b("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),G=b("void_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),oe=b("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls allowfullscreen"),xe="td th iframe video audio object script code",Oe=b("non_empty_elements",xe+" pre svg",G),Ae=b("move_caret_before_on_enter_elements",xe+" table",G),Ue="h1 h2 h3 h4 h5 h6",St=b("text_block_elements",Ue+" p div address pre form blockquote center dir fieldset header footer article section hgroup aside main nav figure"),It=b("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption details summary html body multicol listing",St),ln=b("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp"),ut=b("transparent_elements","a ins del canvas map"),tt=b("wrap_block_elements","pre "+Ue);Qu("script noscript iframe noframes noembed title style textarea xmp plaintext".split(" "),Fo=>{m[Fo]=new RegExp("]*>","gi")});const Ct=Fo=>{const Fs=F.from(o["@"]),Tr=/[*?+]/;re(zp(Fs,Fo??""),({name:Ur,element:sa,aliasName:Zl})=>{if(Zl&&(o[Zl]=sa),Tr.test(Ur)){const nm=sa;nm.pattern=_n(Ur),c.push(nm)}else o[Ur]=sa})},Sn=Fo=>{c=[],re(ts(o),Fs=>{delete o[Fs]}),Ct(Fo)},eo=Fo=>{delete s1.text_block_elements,delete s1.block_elements,re(cT(Fo??""),({inline:Fs,name:Tr,cloneName:Ur})=>{if(r[Tr]=r[Ur],u[Tr]=Ur,Oe[Tr.toUpperCase()]={},Oe[Tr]={},Fs||(It[Tr.toUpperCase()]={},It[Tr]={}),!o[Tr]){let sa=o[Ur];sa=gb({},sa),delete sa.removeEmptyAttrs,delete sa.removeEmpty,o[Tr]=sa}Ot(r,(sa,Zl)=>{sa[Ur]&&(r[Zl]=sa=gb({},r[Zl]),sa[Tr]=sa[Ur])})})},es=Fo=>{re(Pg(Fo??""),({operation:Fs,name:Tr,validChildren:Ur})=>{const sa=Fs==="replace"?{"#comment":{}}:r[Tr];re(Ur,Zl=>{Fs==="remove"?delete sa[Zl]:sa[Zl]={}}),r[Tr]=sa})},Yo=Fo=>{const Fs=o[Fo];if(Fs)return Fs;let Tr=c.length;for(;Tr--;){const Ur=c[Tr];if(Ur.pattern.test(Fo))return Ur}};e.valid_elements?(Sn(e.valid_elements),Qu(x,(Fo,Fs)=>{r[Fs]=Fo.children})):(Qu(x,(Fo,Fs)=>{o[Fs]={attributes:Fo.attributes,attributesOrder:Fo.attributesOrder},r[Fs]=Fo.children}),Qu(Hc("strong/b em/i"),Fo=>{const Fs=Hc(Fo,"/");o[Fs[1]].outputName=Fs[0]}),Qu(ln,(Fo,Fs)=>{o[Fs]&&(e.padd_empty_block_inline_children&&(o[Fs].paddInEmptyBlock=!0),o[Fs].removeEmpty=!0)}),Qu(Hc("ol ul blockquote a table tbody"),Fo=>{o[Fo]&&(o[Fo].removeEmpty=!0)}),Qu(Hc("p h1 h2 h3 h4 h5 h6 th td pre div address caption li summary"),Fo=>{o[Fo]&&(o[Fo].paddEmpty=!0)}),Qu(Hc("span"),Fo=>{o[Fo].removeEmptyAttrs=!0})),delete o.svg,eo(e.custom_elements),es(e.valid_children),Ct(e.extended_valid_elements),es("+ol[ul|ol],+ul[ul|ol]"),Qu({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},(Fo,Fs)=>{o[Fs]&&(o[Fs].parentsRequired=Hc(Fo))}),e.invalid_elements&&Qu(au(e.invalid_elements),Fo=>{o[Fo]&&delete o[Fo]}),Yo("span")||Ct("span[!data-mce-type|*]");const ar=st(R),xr=st(N),Ta=st($),oi=st(oe),nr=st(It),Zt=st(St),jn=st(ln),Xo=st(Object.seal(G)),gs=st(ne),Nn=st(Oe),zo=st(Ae),Vt=st(J),Ro=st(ut),Os=st(tt),hr=st(Object.seal(m)),cr=(Fo,Fs)=>{const Tr=r[Fo.toLowerCase()];return!!(Tr&&Tr[Fs.toLowerCase()])},vc=(Fo,Fs)=>{const Tr=Yo(Fo);if(Tr)if(Fs){if(Tr.attributes[Fs])return!0;const Ur=Tr.attributePatterns;if(Ur){let sa=Ur.length;for(;sa--;)if(Ur[sa].pattern.test(Fs))return!0}}else return!0;return!1},sf=Fo=>Wn(nr(),Fo),ng=Fo=>!Qn(Fo,"#")&&vc(Fo)&&!sf(Fo),vl=Fo=>Wn(Os(),Fo)||ng(Fo),hd=st(u);return{type:v,children:r,elements:o,getValidStyles:ar,getValidClasses:Ta,getBlockElements:nr,getInvalidStyles:xr,getVoidElements:Xo,getTextBlockElements:Zt,getTextInlineElements:jn,getBoolAttrs:oi,getElementRule:Yo,getSelfClosingElements:gs,getNonEmptyElements:Nn,getMoveCaretBeforeOnEnterElements:zo,getWhitespaceElements:Vt,getTransparentElements:Ro,getSpecialElements:hr,isValidChild:cr,isValid:vc,isBlock:sf,isInline:ng,isWrapper:vl,getCustomElements:hd,addValidElements:Ct,setValidElements:Sn,addCustomElements:eo,addValidChildren:es}},lT=e=>({value:Np(e)}),Np=e=>Tn(e,"#").toUpperCase(),Fg=e=>{const n=e.toString(16);return(n.length===1?"0"+n:n).toUpperCase()},Eu=e=>{const n=Fg(e.red)+Fg(e.green)+Fg(e.blue);return lT(n)},ul=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i,uT=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i,R_=(e,n,o,r)=>({red:e,green:n,blue:o,alpha:r}),N_=(e,n,o,r)=>{const c=parseInt(e,10),u=parseInt(n,10),m=parseInt(o,10),b=parseFloat(r);return R_(c,u,m,b)},kv=e=>{if(e==="transparent")return F.some(R_(0,0,0,0));const n=ul.exec(e);if(n!==null)return F.some(N_(n[1],n[2],n[3],"1"));const o=uT.exec(e);return o!==null?F.some(N_(o[1],o[2],o[3],o[4])):F.none()},dl=e=>`rgba(${e.red},${e.green},${e.blue},${e.alpha})`,Mp=e=>kv(e).map(Eu).map(n=>"#"+n.value).getOr(e),a1=(e={},n)=>{const o=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,r=/\s*([^:]+):\s*([^;]+);?/g,c=/\s+$/,u={};let m,b;const v=Ag;n&&(m=n.getValidStyles(),b=n.getInvalidStyles());const x=(`\\" \\' \\; \\: ; : `+v).split(" ");for(let N=0;N{const $={};let J=!1;const ne=e.url_converter,G=e.url_converter_scope||R,oe=(ut,tt,Ct)=>{const Sn=$[ut+"-top"+tt];if(!Sn)return;const eo=$[ut+"-right"+tt];if(!eo)return;const es=$[ut+"-bottom"+tt];if(!es)return;const Yo=$[ut+"-left"+tt];if(!Yo)return;const ar=[Sn,eo,es,Yo];let xr=ar.length-1;for(;xr--&&ar[xr]===ar[xr+1];);xr>-1&&Ct||($[ut+tt]=xr===-1?ar[0]:ar.join(" "),delete $[ut+"-top"+tt],delete $[ut+"-right"+tt],delete $[ut+"-bottom"+tt],delete $[ut+"-left"+tt])},xe=ut=>{const tt=$[ut];if(!tt)return;const Ct=tt.indexOf(",")>-1?[tt]:tt.split(" ");let Sn=Ct.length;for(;Sn--;)if(Ct[Sn]!==Ct[0])return!1;return $[ut]=Ct[0],!0},Oe=(ut,tt,Ct,Sn)=>{xe(tt)&&xe(Ct)&&xe(Sn)&&($[ut]=$[tt]+" "+$[Ct]+" "+$[Sn],delete $[tt],delete $[Ct],delete $[Sn])},Ae=ut=>(J=!0,u[ut]),Ue=(ut,tt)=>(J&&(ut=ut.replace(/\uFEFF[0-9]/g,Ct=>u[Ct])),tt||(ut=ut.replace(/\\([\'\";:])/g,"$1")),ut),St=ut=>String.fromCharCode(parseInt(ut.slice(1),16)),It=ut=>ut.replace(/\\[0-9a-f]+/gi,St),ln=(ut,tt,Ct,Sn,eo,es)=>{if(eo=eo||es,eo)return eo=Ue(eo),"'"+eo.replace(/\'/g,"\\'")+"'";if(tt=Ue(tt||Ct||Sn||""),!e.allow_script_urls){const Yo=tt.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(Yo)||!e.allow_svg_data_urls&&/^data:image\/svg/i.test(Yo))return""}return ne&&(tt=ne.call(G,tt,"style")),"url('"+tt.replace(/\'/g,"\\'")+"')"};if(N){N=N.replace(/[\u0000-\u001F]/g,""),N=N.replace(/\\[\"\';:\uFEFF]/g,Ae).replace(/\"[^\"]+\"|\'[^\']+\'/g,tt=>tt.replace(/[;:]/g,Ae));let ut;for(;ut=r.exec(N);){r.lastIndex=ut.index+ut[0].length;let tt=ut[1].replace(c,"").toLowerCase(),Ct=ut[2].replace(c,"");if(tt&&Ct){if(tt=It(tt),Ct=It(Ct),tt.indexOf(v)!==-1||tt.indexOf('"')!==-1||!e.allow_script_urls&&(tt==="behavior"||/expression\s*\(|\/\*|\*\//.test(Ct)))continue;tt==="font-weight"&&Ct==="700"?Ct="bold":(tt==="color"||tt==="background-color")&&(Ct=Ct.toLowerCase()),W(e.force_hex_color)&&e.force_hex_color!=="off"&&kv(Ct).each(Sn=>{(e.force_hex_color==="always"||Sn.alpha===1)&&(Ct=Mp(dl(Sn)))}),Ct=Ct.replace(o,ln),$[tt]=J?Ue(Ct,!0):Ct}}oe("border","",!0),oe("border","-width"),oe("border","-color"),oe("border","-style"),oe("padding",""),oe("margin",""),Oe("border","border-width","border-style","border-color"),$.border==="medium none"&&delete $.border,$["border-image"]==="none"&&delete $["border-image"]}return $},serialize:(N,$)=>{let J="";const ne=(oe,xe)=>{const Oe=xe[oe];if(Oe)for(let Ae=0,Ue=Oe.length;Ae0?" ":"")+St+": "+It+";")}},G=(oe,xe)=>{if(!b||!xe)return!0;let Oe=b["*"];return Oe&&Oe[oe]?!1:(Oe=b[xe],!(Oe&&Oe[oe]))};return $&&m?(ne("*",m),ne($,m)):Ot(N,(oe,xe)=>{oe&&G(xe,$)&&(J+=(J.length>0?" ":"")+xe+": "+oe+";")}),J}};return R},c1={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},dT=e=>e instanceof Event||ae(e.initEvent),M_=e=>e.isDefaultPrevented===at||e.isDefaultPrevented===Ne,wv=e=>on(e.preventDefault)||dT(e),Bp=(e,n)=>{const o=n??{};for(const r in e)Wn(c1,r)||(o[r]=e[r]);return Ie(e.composedPath)&&(o.composedPath=()=>e.composedPath()),Ie(e.getModifierState)&&(o.getModifierState=r=>e.getModifierState(r)),Ie(e.getTargetRanges)&&(o.getTargetRanges=()=>e.getTargetRanges()),o},Pp=(e,n,o,r)=>{var c;const u=Bp(n,r);return u.type=e,on(u.target)&&(u.target=(c=u.srcElement)!==null&&c!==void 0?c:o),wv(n)&&(u.preventDefault=()=>{u.defaultPrevented=!0,u.isDefaultPrevented=at,ae(n.preventDefault)&&n.preventDefault()},u.stopPropagation=()=>{u.cancelBubble=!0,u.isPropagationStopped=at,ae(n.stopPropagation)&&n.stopPropagation()},u.stopImmediatePropagation=()=>{u.isImmediatePropagationStopped=at,u.stopPropagation()},M_(u)||(u.isDefaultPrevented=u.defaultPrevented===!0?at:Ne,u.isPropagationStopped=u.cancelBubble===!0?at:Ne,u.isImmediatePropagationStopped=Ne)),u},i1="mce-data-",fT=/^(?:mouse|contextmenu)|click/,l1=(e,n,o,r)=>{e.addEventListener(n,o,r||!1)},Fp=(e,n,o,r)=>{e.removeEventListener(n,o,r||!1)},mT=e=>Ie(e)&&fT.test(e.type),pb=(e,n)=>{const o=Pp(e.type,e,document,n);if(mT(e)&&pn(e.pageX)&&!pn(e.clientX)){const r=o.target.ownerDocument||document,c=r.documentElement,u=r.body,m=o;m.pageX=e.clientX+(c&&c.scrollLeft||u&&u.scrollLeft||0)-(c&&c.clientLeft||u&&u.clientLeft||0),m.pageY=e.clientY+(c&&c.scrollTop||u&&u.scrollTop||0)-(c&&c.clientTop||u&&u.clientTop||0)}return o},_v=(e,n,o)=>{const r=e.document,c={type:"ready"};if(o.domLoaded){n(c);return}const u=()=>r.readyState==="complete"||r.readyState==="interactive"&&r.body,m=()=>{Fp(e,"DOMContentLoaded",m),Fp(e,"load",m),o.domLoaded||(o.domLoaded=!0,n(c)),e=null};u()?m():l1(e,"DOMContentLoaded",m),o.domLoaded||l1(e,"load",m)};class fl{constructor(){this.domLoaded=!1,this.events={},this.count=1,this.expando=i1+(+new Date).toString(32),this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}bind(n,o,r,c){const u=this;let m;const b=window,v=$=>{u.executeHandlers(pb($||b.event),x)};if(!n||Mt(n)||Gu(n))return r;let x;n[u.expando]?x=n[u.expando]:(x=u.count++,n[u.expando]=x,u.events[x]={}),c=c||n;const R=o.split(" ");let N=R.length;for(;N--;){let $=R[N],J=v,ne=!1,G=!1;if($==="DOMContentLoaded"&&($="ready"),u.domLoaded&&$==="ready"&&n.readyState==="complete"){r.call(c,pb({type:$}));continue}!u.hasFocusIn&&($==="focusin"||$==="focusout")&&(ne=!0,G=$==="focusin"?"focus":"blur",J=oe=>{const xe=pb(oe||b.event);xe.type=xe.type==="focus"?"focusin":"focusout",u.executeHandlers(xe,x)}),m=u.events[x][$],m?$==="ready"&&u.domLoaded?r(pb({type:$})):m.push({func:r,scope:c}):(u.events[x][$]=m=[{func:r,scope:c}],m.fakeName=G,m.capture=ne,m.nativeHandler=J,$==="ready"?_v(n,J,u):l1(n,G||$,J,ne))}return n=m=null,r}unbind(n,o,r){if(!n||Mt(n)||Gu(n))return this;const c=n[this.expando];if(c){let u=this.events[c];if(o){const m=o.split(" ");let b=m.length;for(;b--;){const v=m[b],x=u[v];if(x){if(r){let R=x.length;for(;R--;)if(x[R].func===r){const N=x.nativeHandler,$=x.fakeName,J=x.capture,ne=x.slice(0,R).concat(x.slice(R+1));ne.nativeHandler=N,ne.fakeName=$,ne.capture=J,u[v]=ne}}(!r||x.length===0)&&(delete u[v],Fp(n,x.fakeName||v,x.nativeHandler,x.capture))}}}else Ot(u,(m,b)=>{Fp(n,m.fakeName||b,m.nativeHandler,m.capture)}),u={};for(const m in u)if(Wn(u,m))return this;delete this.events[c];try{delete n[this.expando]}catch{n[this.expando]=null}}return this}fire(n,o,r){return this.dispatch(n,o,r)}dispatch(n,o,r){if(!n||Mt(n)||Gu(n))return this;const c=pb({type:o,target:n},r);do{const u=n[this.expando];u&&this.executeHandlers(c,u),n=n.parentNode||n.ownerDocument||n.defaultView||n.parentWindow}while(n&&!c.isPropagationStopped());return this}clean(n){if(!n||Mt(n)||Gu(n))return this;if(n[this.expando]&&this.unbind(n),n.getElementsByTagName||(n=n.document),n&&n.getElementsByTagName){this.unbind(n);const o=n.getElementsByTagName("*");let r=o.length;for(;r--;)n=o[r],n[this.expando]&&this.unbind(n)}return this}destroy(){this.events={}}cancel(n){return n&&(n.preventDefault(),n.stopImmediatePropagation()),!1}executeHandlers(n,o){const r=this.events[o],c=r&&r[n.type];if(c)for(let u=0,m=c.length;u{on(o)||o===""?Qr(e,n):mr(e,n,o)},vm=e=>e.replace(/[A-Z]/g,n=>"-"+n.toLowerCase()),Nd=(e,n)=>{let o=0;if(e)for(let r=e.nodeType,c=e.previousSibling;c;c=c.previousSibling){const u=c.nodeType;n&&Mt(c)&&(u===r||!c.data.length)||(o++,r=u)}return o},Cv=(e,n)=>{const o=_c(n,"style"),r=e.serialize(e.parse(o),rs(n));f1(n,d1,r)},$p=(e,n)=>po(e)?Wn(PO,n)?e+"":e+"px":e,m1=(e,n,o)=>{const r=vm(n);on(o)||o===""?ju(e,r):_p(e,r,$p(o,r))},P_=(e,n,o)=>{const r=n.keep_values,c={set:(m,b,v)=>{const x=le.fromDom(m);ae(n.url_converter)&&Ie(b)&&(b=n.url_converter.call(n.url_converter_scope||o(),String(b),v,m));const R="data-mce-"+v;f1(x,R,b),f1(x,v,b)},get:(m,b)=>{const v=le.fromDom(m);return _c(v,"data-mce-"+b)||_c(v,b)}},u={style:{set:(m,b)=>{const v=le.fromDom(m);r&&f1(v,d1,b),Qr(v,"style"),W(b)&&ec(v,e.parse(b))},get:m=>{const b=le.fromDom(m),v=_c(b,d1)||_c(b,"style");return e.serialize(e.parse(v),rs(b))}}};return r&&(u.href=u.src=c),u},Dr=(e,n={})=>{const o={},r=window,c={};let u=0;const m=!0,b=!0,v=fv.forElement(le.fromDom(e),{contentCssCors:n.contentCssCors,referrerPolicy:n.referrerPolicy}),x=[],R=n.schema?n.schema:Ef({}),N=a1({url_converter:n.url_converter,url_converter_scope:n.url_converter_scope,force_hex_color:n.force_hex_color},n.schema),$=n.ownEvents?new fl:fl.Event,J=R.getBlockElements(),ne=We=>W(We)?Wn(J,We):Cn(We)&&(Wn(J,We.nodeName)||ks(R,We)),G=We=>We&&e&&W(We)?e.getElementById(We):We,oe=We=>{const Je=G(We);return Ie(Je)?le.fromDom(Je):null},xe=(We,Je,Ut="")=>{let Ft;const Xn=oe(We);if(Ie(Xn)&&gc(Xn)){const ps=sv[Je];ps&&ps.get?Ft=ps.get(Xn.dom,Je):Ft=_c(Xn,Je)}return Ie(Ft)?Ft:Ut},Oe=We=>{const Je=G(We);return on(Je)?[]:Je.attributes},Ae=(We,Je,Ut)=>{jn(We,Ft=>{if(Cn(Ft)){const Xn=le.fromDom(Ft),ps=Ut===""?null:Ut,Gr=_c(Xn,Je),kl=sv[Je];kl&&kl.set?kl.set(Xn.dom,ps,Je):f1(Xn,Je,ps),Gr!==ps&&n.onSetAttrib&&n.onSetAttrib({attrElm:Xn.dom,attrName:Je,attrValue:ps})}})},Ue=(We,Je)=>We.cloneNode(Je),St=()=>n.root_element||e.body,It=We=>{const Je=ja(We);return{x:Je.x,y:Je.y,w:Je.width,h:Je.height}},ln=(We,Je)=>_r(e.body,G(We),Je),ut=(We,Je,Ut)=>{jn(We,Ft=>{const Xn=le.fromDom(Ft);m1(Xn,Je,Ut),n.update_styles&&Cv(N,Xn)})},tt=(We,Je)=>{jn(We,Ut=>{const Ft=le.fromDom(Ut);Ot(Je,(Xn,ps)=>{m1(Ft,ps,Xn)}),n.update_styles&&Cv(N,Ft)})},Ct=(We,Je,Ut)=>{const Ft=G(We);if(!(on(Ft)||!tu(Ft)&&!Wy(Ft)))return Ut?aa(le.fromDom(Ft),vm(Je)):(Je=Je.replace(/-(\D)/g,(Xn,ps)=>ps.toUpperCase()),Je==="float"&&(Je="cssFloat"),Ft.style?Ft.style[Je]:void 0)},Sn=We=>{const Je=G(We);if(!Je)return{w:0,h:0};let Ut=Ct(Je,"width"),Ft=Ct(Je,"height");return(!Ut||Ut.indexOf("px")===-1)&&(Ut="0"),(!Ft||Ft.indexOf("px")===-1)&&(Ft="0"),{w:parseInt(Ut,10)||Je.offsetWidth||Je.clientWidth,h:parseInt(Ft,10)||Je.offsetHeight||Je.clientHeight}},eo=We=>{const Je=G(We),Ut=ln(Je),Ft=Sn(Je);return{x:Ut.x,y:Ut.y,w:Ft.w,h:Ft.h}},es=(We,Je)=>{if(!We)return!1;const Ut=mt(We)?We:[We];return be(Ut,Ft=>xi(le.fromDom(Ft),Je))},Yo=(We,Je,Ut,Ft)=>{const Xn=[];let ps=G(We);Ft=Ft===void 0;const Gr=Ut||(St().nodeName!=="BODY"?St().parentNode:null);if(W(Je))if(Je==="*")Je=Cn;else{const kl=Je;Je=Oc=>es(Oc,kl)}for(;ps&&!(ps===Gr||on(ps.nodeType)||Eg(ps)||Lr(ps));){if(!Je||Je(ps))if(Ft)Xn.push(ps);else return[ps];ps=ps.parentNode}return Ft?Xn:null},ar=(We,Je,Ut)=>{const Ft=Yo(We,Je,Ut,!1);return Ft&&Ft.length>0?Ft[0]:null},xr=(We,Je,Ut)=>{let Ft=Je;if(We){W(Je)&&(Ft=Xn=>es(Xn,Je));for(let Xn=We[Ut];Xn;Xn=Xn[Ut])if(ae(Ft)&&Ft(Xn))return Xn}return null},Ta=(We,Je)=>xr(We,Je,"nextSibling"),oi=(We,Je)=>xr(We,Je,"previousSibling"),nr=We=>ae(We.querySelectorAll),Zt=(We,Je)=>{var Ut,Ft;const Xn=(Ft=(Ut=G(Je))!==null&&Ut!==void 0?Ut:n.root_element)!==null&&Ft!==void 0?Ft:e;return nr(Xn)?cs(Xn.querySelectorAll(We)):[]},jn=function(We,Je,Ut){const Ft=Ut??this;if(mt(We)){const Xn=[];return u1(We,(ps,Gr)=>{const kl=G(ps);kl&&Xn.push(Je.call(Ft,kl,Gr))}),Xn}else{const Xn=G(We);return Xn?Je.call(Ft,Xn):!1}},Xo=(We,Je)=>{jn(We,Ut=>{Ot(Je,(Ft,Xn)=>{Ae(Ut,Xn,Ft)})})},gs=(We,Je)=>{jn(We,Ut=>{const Ft=le.fromDom(Ut);Zu(Ft,Je)})},Nn=(We,Je,Ut,Ft,Xn)=>jn(We,ps=>{const Gr=W(Je)?e.createElement(Je):Je;return Ie(Ut)&&Xo(Gr,Ut),Ft&&(!W(Ft)&&Ft.nodeType?Gr.appendChild(Ft):W(Ft)&&gs(Gr,Ft)),Xn?Gr:ps.appendChild(Gr)}),zo=(We,Je,Ut)=>Nn(e.createElement(We),We,Je,Ut,!0),Vt=ym.decode,Ro=ym.encodeAllRaw,Os=(We,Je,Ut="")=>{let Ft="<"+We;for(const Xn in Je)or(Je,Xn)&&(Ft+=" "+Xn+'="'+Ro(Je[Xn])+'"');return is(Ut)&&Wn(R.getVoidElements(),We)?Ft+" />":Ft+">"+Ut+""},hr=We=>{const Je=e.createElement("div"),Ut=e.createDocumentFragment();Ut.appendChild(Je),We&&(Je.innerHTML=We);let Ft;for(;Ft=Je.firstChild;)Ut.appendChild(Ft);return Ut.removeChild(Je),Ut},cr=(We,Je)=>jn(We,Ut=>{const Ft=le.fromDom(Ut);return Je&&re(ya(Ft),Xn=>{Ja(Xn)&&Xn.dom.length===0?Ts(Xn):za(Ft,Xn)}),Ts(Ft),Ft.dom}),vc=We=>jn(We,Je=>{const Ut=Je.attributes;for(let Ft=Ut.length-1;Ft>=0;Ft--)Je.removeAttributeNode(Ut.item(Ft))}),sf=We=>N.parse(We),ng=(We,Je)=>N.serialize(We,Je),vl=We=>{if(rg!==Dr.DOM&&e===document){if(o[We])return;o[We]=!0}let Je=e.getElementById("mceDefaultStyles");if(!Je){Je=e.createElement("style"),Je.id="mceDefaultStyles",Je.type="text/css";const Ut=e.head;Ut.firstChild?Ut.insertBefore(Je,Ut.firstChild):Ut.appendChild(Je)}Je.styleSheet?Je.styleSheet.cssText+=We:Je.appendChild(e.createTextNode(We))},hd=We=>{We||(We=""),re(We.split(","),Je=>{c[Je]=!0,v.load(Je).catch(Re)})},Fo=(We,Je,Ut)=>{jn(We,Ft=>{if(Cn(Ft)){const Xn=le.fromDom(Ft),ps=Je.split(" ");re(ps,Gr=>{Ie(Ut)?(Ut?gu:Cl)(Xn,Gr):ug(Xn,Gr)})}})},Fs=(We,Je)=>{Fo(We,Je,!0)},Tr=(We,Je)=>{Fo(We,Je,!1)},Ur=(We,Je)=>{const Ut=oe(We),Ft=Je.split(" ");return Ie(Ut)&&zn(Ft,Xn=>Xl(Ut,Xn))},sa=We=>{jn(We,Je=>ju(le.fromDom(Je),"display"))},Zl=We=>{jn(We,Je=>_p(le.fromDom(Je),"display","none"))},nm=We=>{const Je=oe(We);return Ie(Je)&&Gs(va(Je,"display"),"none")},Yh=We=>(We||"mce_")+u++,b_=We=>{const Je=oe(We);return Ie(Je)?Cn(Je.dom)?Je.dom.outerHTML:_g(Je):""},$y=(We,Je)=>{jn(We,Ut=>{Cn(Ut)&&(Ut.outerHTML=Je)})},tv=(We,Je)=>{const Ut=G(Je);return jn(We,Ft=>{const Xn=Ut==null?void 0:Ut.parentNode,ps=Ut==null?void 0:Ut.nextSibling;return Xn&&(ps?Xn.insertBefore(Ft,ps):Xn.appendChild(Ft)),Ft})},nv=(We,Je,Ut)=>jn(Je,Ft=>{var Xn;const ps=mt(Je)?We.cloneNode(!0):We;return Ut&&u1(B_(Ft.childNodes),Gr=>{ps.appendChild(Gr)}),(Xn=Ft.parentNode)===null||Xn===void 0||Xn.replaceChild(ps,Ft),Ft}),y_=(We,Je)=>{if(We.nodeName!==Je.toUpperCase()){const Ut=zo(Je);return u1(Oe(We),Ft=>{Ae(Ut,Ft.nodeName,xe(We,Ft.nodeName))}),nv(Ut,We,!0),Ut}else return We},Iy=(We,Je)=>{let Ut=We;for(;Ut;){let Ft=Je;for(;Ft&&Ut!==Ft;)Ft=Ft.parentNode;if(Ut===Ft)break;Ut=Ut.parentNode}return!Ut&&We.ownerDocument?We.ownerDocument.documentElement:Ut},Ly=We=>{if(Cn(We)){const Je=We.nodeName.toLowerCase()==="a"&&!xe(We,"href")&&xe(We,"id");if(xe(We,"name")||xe(We,"data-mce-bookmark")||Je)return!0}return!1},rf=(We,Je,Ut)=>{let Ft=0;if(Ly(We))return!1;const Xn=We.firstChild;if(Xn){const ps=new wr(Xn,We),Gr=R?R.getWhitespaceElements():{},kl=Je||(R?R.getNonEmptyElements():null);let Oc=Xn;do{if(Cn(Oc)){const Jh=Oc.getAttribute("data-mce-bogus");if(Jh){Oc=ps.next(Jh==="all");continue}const bd=Oc.nodeName.toLowerCase();if(kl&&kl[bd]){if(bd==="br"){Ft++,Oc=ps.next();continue}return!1}if(Ly(Oc))return!1}if(Gu(Oc)||Mt(Oc)&&!mm(Oc.data)&&(!(Ut!=null&&Ut.includeZwsp)||!zg(Oc.data))||Mt(Oc)&&Oc.parentNode&&Gr[Oc.parentNode.nodeName]&&mm(Oc.data))return!1;Oc=ps.next()}while(Oc)}return Ft<=1},og=()=>e.createRange(),v_=(We,Je,Ut)=>{let Ft=og(),Xn,ps;if(We&&Je&&We.parentNode&&Je.parentNode){const Gr=We.parentNode;return Ft.setStart(Gr,Nd(We)),Ft.setEnd(Je.parentNode,Nd(Je)),Xn=Ft.extractContents(),Ft=og(),Ft.setStart(Je.parentNode,Nd(Je)+1),Ft.setEnd(Gr,Nd(We)+1),ps=Ft.extractContents(),Gr.insertBefore(Sf(rg,Xn,R),We),Ut?Gr.insertBefore(Ut,We):Gr.insertBefore(Je,We),Gr.insertBefore(Sf(rg,ps,R),We),cr(We),Ut||Je}else return},ov=(We,Je,Ut,Ft)=>{if(mt(We)){let Xn=We.length;const ps=[];for(;Xn--;)ps[Xn]=ov(We[Xn],Je,Ut,Ft);return ps}else return n.collect&&(We===e||We===r)&&x.push([We,Je,Ut,Ft]),$.bind(We,Je,Ut,Ft||rg)},Zx=(We,Je,Ut)=>{if(mt(We)){let Ft=We.length;const Xn=[];for(;Ft--;)Xn[Ft]=Zx(We[Ft],Je,Ut);return Xn}else{if(x.length>0&&(We===e||We===r)){let Ft=x.length;for(;Ft--;){const[Xn,ps,Gr]=x[Ft];We===Xn&&(!Je||Je===ps)&&(!Ut||Ut===Gr)&&$.unbind(Xn,ps,Gr)}}return $.unbind(We,Je,Ut)}},sg=(We,Je,Ut)=>$.dispatch(We,Je,Ut),qx=(We,Je,Ut)=>$.dispatch(We,Je,Ut),k_=We=>{if(We&&tu(We)){const Je=We.getAttribute("data-mce-contenteditable");return Je&&Je!=="inherit"?Je:We.contentEditable!=="inherit"?We.contentEditable:null}else return null},rg={doc:e,settings:n,win:r,files:c,stdMode:m,boxModel:b,styleSheetLoader:v,boundEvents:x,styles:N,schema:R,events:$,isBlock:ne,root:null,clone:Ue,getRoot:St,getViewPort:It,getRect:eo,getSize:Sn,getParent:ar,getParents:Yo,get:G,getNext:Ta,getPrev:oi,select:Zt,is:es,add:Nn,create:zo,createHTML:Os,createFragment:hr,remove:cr,setStyle:ut,getStyle:Ct,setStyles:tt,removeAllAttribs:vc,setAttrib:Ae,setAttribs:Xo,getAttrib:xe,getPos:ln,parseStyle:sf,serializeStyle:ng,addStyle:vl,loadCSS:hd,addClass:Fs,removeClass:Tr,hasClass:Ur,toggleClass:Fo,show:sa,hide:Zl,isHidden:nm,uniqueId:Yh,setHTML:gs,getOuterHTML:b_,setOuterHTML:$y,decode:Vt,encode:Ro,insertAfter:tv,replace:nv,rename:y_,findCommonAncestor:Iy,run:jn,getAttribs:Oe,isEmpty:rf,createRng:og,nodeIndex:Nd,split:v_,bind:ov,unbind:Zx,fire:qx,dispatch:sg,getContentEditable:k_,getContentEditableParent:We=>{const Je=St();let Ut=null;for(let Ft=We;Ft&&Ft!==Je&&(Ut=k_(Ft),Ut===null);Ft=Ft.parentNode);return Ut},isEditable:We=>{if(Ie(We)){const Je=Cn(We)?We:We.parentElement;return Ie(Je)&&tu(Je)&&Ho(le.fromDom(Je))}else return!1},destroy:()=>{if(x.length>0){let We=x.length;for(;We--;){const[Je,Ut,Ft]=x[We];$.unbind(Je,Ut,Ft)}}Ot(c,(We,Je)=>{v.unload(Je),delete c[Je]})},isChildOf:(We,Je)=>We===Je||Je.contains(We),dumpRng:We=>"startContainer: "+We.startContainer.nodeName+", startOffset: "+We.startOffset+", endContainer: "+We.endContainer.nodeName+", endOffset: "+We.endOffset},sv=P_(N,n,st(rg));return rg};Dr.DOM=Dr(document),Dr.nodeIndex=Nd;const gT=Dr.DOM,_a=0,F_=1,Zr=2,Ip=3;class Za{constructor(n={}){this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=!1,this.settings=n}_setReferrerPolicy(n){this.settings.referrerPolicy=n}loadScript(n){return new Promise((o,r)=>{const c=gT;let u;const m=()=>{c.remove(x),u&&(u.onerror=u.onload=u=null)},b=()=>{m(),o()},v=()=>{m(),r("Failed to load script: "+n)},x=c.uniqueId();u=document.createElement("script"),u.id=x,u.type="text/javascript",u.src=Et._addCacheSuffix(n),this.settings.referrerPolicy&&c.setAttrib(u,"referrerpolicy",this.settings.referrerPolicy),u.onload=b,u.onerror=v,(document.getElementsByTagName("head")[0]||document.body).appendChild(u)})}isDone(n){return this.states[n]===Zr}markDone(n){this.states[n]=Zr}add(n){const o=this;return o.queue.push(n),o.states[n]===void 0&&(o.states[n]=_a),new Promise((c,u)=>{o.scriptLoadedCallbacks[n]||(o.scriptLoadedCallbacks[n]=[]),o.scriptLoadedCallbacks[n].push({resolve:c,reject:u})})}load(n){return this.add(n)}remove(n){delete this.states[n],delete this.scriptLoadedCallbacks[n]}loadQueue(){const n=this.queue;return this.queue=[],this.loadScripts(n)}loadScripts(n){const o=this,r=(v,x)=>{Ss(o.scriptLoadedCallbacks,x).each(R=>{re(R,N=>N[v](x))}),delete o.scriptLoadedCallbacks[x]},c=v=>{const x=Ze(v,R=>R.status==="rejected");return x.length>0?Promise.reject(Dn(x,({reason:R})=>mt(R)?R:[R])):Promise.resolve()},u=v=>Promise.allSettled(ve(v,x=>o.states[x]===Zr?(r("resolve",x),Promise.resolve()):o.states[x]===Ip?(r("reject",x),Promise.reject(x)):(o.states[x]=F_,o.loadScript(x).then(()=>{o.states[x]=Zr,r("resolve",x);const R=o.queue;return R.length>0?(o.queue=[],u(R).then(c)):Promise.resolve()},()=>(o.states[x]=Ip,r("reject",x),Promise.reject(x)))))),m=v=>(o.loading=!0,u(v).then(x=>{o.loading=!1;const R=o.queueLoadedCallbacks.shift();return F.from(R).each(fn),c(x)})),b=Ye(n);return o.loading?new Promise((v,x)=>{o.queueLoadedCallbacks.push(()=>{m(b).then(v,x)})}):m(b)}}Za.ScriptLoader=new Za;const na=e=>{let n=e;return{get:()=>n,set:c=>{n=c}}},Dl=(e,n)=>{const o=e.indexOf(n);return o!==-1&&e.indexOf(n,o+1)>o},Sv=e=>Be(e)&&Wn(e,"raw"),Vc=e=>mt(e)&&e.length>1,hb={},Lp=na("en"),Md=()=>Ss(hb,Lp.get()),Au={getData:()=>Zo(hb,e=>({...e})),setCode:e=>{e&&Lp.set(e)},getCode:()=>Lp.get(),add:(e,n)=>{let o=hb[e];o||(hb[e]=o={});const r=ve(ts(n),c=>c.toLowerCase());Ot(n,(c,u)=>{const m=u.toLowerCase();m!==u&&Dl(r,m)?(Wn(n,m)||(o[m]=c),o[u]=c):o[m]=c})},translate:e=>{const n=Md().getOr({}),o=m=>ae(m)?Object.prototype.toString.call(m):r(m)?"":""+m,r=m=>m===""||m===null||m===void 0,c=m=>{const b=o(m);return Wn(n,b)?o(n[b]):Ss(n,b.toLowerCase()).map(o).getOr(b)},u=m=>m.replace(/{context:\w+}$/,"");if(r(e))return"";if(Sv(e))return o(e.raw);if(Vc(e)){const m=e.slice(1),b=c(e[0]).replace(/\{([0-9]+)\}/g,(v,x)=>Wn(m,x)?o(m[x]):v);return u(b)}return u(c(e))},isRtl:()=>Md().bind(e=>Ss(e,"_dir")).exists(e=>e==="rtl"),hasCode:e=>Wn(hb,e)},fi=()=>{const e=[],n={},o={},r=[],c=(G,oe)=>{const xe=Ze(r,Oe=>Oe.name===G&&Oe.state===oe);re(xe,Oe=>Oe.resolve())},u=G=>Wn(n,G),m=G=>Wn(o,G),b=G=>{if(o[G])return o[G].instance},v=(G,oe)=>{const xe=Au.getCode(),Oe=","+(oe||"")+",";!xe||oe&&Oe.indexOf(","+xe+",")===-1||Za.ScriptLoader.add(n[G]+"/langs/"+xe+".js")},x=(G,oe)=>{fi.languageLoad!==!1&&(u(G)?v(G,oe):ne(G,"loaded").then(()=>v(G,oe)))},R=(G,oe)=>(e.push(oe),o[G]={instance:oe},c(G,"added"),oe),N=G=>{delete n[G],delete o[G]},$=(G,oe)=>W(oe)?W(G)?{prefix:"",resource:oe,suffix:""}:{prefix:G.prefix,resource:oe,suffix:G.suffix}:oe,J=(G,oe)=>{if(n[G])return Promise.resolve();let xe=W(oe)?oe:oe.prefix+oe.resource+oe.suffix;xe.indexOf("/")!==0&&xe.indexOf("://")===-1&&(xe=fi.baseURL+"/"+xe),n[G]=xe.substring(0,xe.lastIndexOf("/"));const Oe=()=>(c(G,"loaded"),Promise.resolve());return o[G]?Oe():Za.ScriptLoader.add(xe).then(Oe)},ne=(G,oe="added")=>oe==="added"&&m(G)||oe==="loaded"&&u(G)?Promise.resolve():new Promise(xe=>{r.push({name:G,state:oe,resolve:xe})});return{items:e,urls:n,lookup:o,get:b,requireLangPack:x,add:R,remove:N,createUrl:$,load:J,waitFor:ne}};fi.languageLoad=!0,fi.baseURL="",fi.PluginManager=fi(),fi.ThemeManager=fi(),fi.ModelManager=fi();const hT=e=>{const n=na(F.none()),o=()=>n.get().each(e);return{clear:()=>{o(),n.set(F.none())},isSet:()=>n.get().isSome(),get:()=>n.get(),set:b=>{o(),n.set(F.some(b))}}},bT=e=>{const n=na(F.none()),o=()=>n.get().each(b=>clearInterval(b));return{clear:()=>{o(),n.set(F.none())},isSet:()=>n.get().isSome(),get:()=>n.get(),set:b=>{o(),n.set(F.some(setInterval(b,e)))}}},wm=()=>{const e=hT(Re);return{...e,on:o=>e.get().each(o)}},bb=(e,n)=>{let o=null;return{cancel:()=>{U(o)||(clearTimeout(o),o=null)},throttle:(...u)=>{U(o)&&(o=setTimeout(()=>{o=null,e.apply(null,u)},n))}}},g1=(e,n)=>{let o=null;const r=()=>{U(o)||(clearTimeout(o),o=null)};return{cancel:r,throttle:(...u)=>{r(),o=setTimeout(()=>{o=null,e.apply(null,u)},n)}}},p1=st("mce-annotation"),Bd=st("data-mce-annotation"),Vp=st("data-mce-annotation-uid"),Up=st("data-mce-annotation-active"),jp=st("data-mce-annotation-classes"),$g=st("data-mce-annotation-attrs"),I_=e=>n=>xs(n,e),fa=(e,n)=>{const o=e.selection.getRng(),r=le.fromDom(o.startContainer),c=le.fromDom(e.getBody()),u=n.fold(()=>"."+p1(),v=>`[${Bd()}="${v}"]`),m=bu(r,o.startOffset).getOr(r);return El(m,u,I_(c)).bind(v=>_l(v,`${Vp()}`).bind(x=>_l(v,`${Bd()}`).map(R=>{const N=H_(e,x);return{uid:x,name:R,elements:N}})))},L_=e=>gc(e)&&Xl(e,p1()),Wp=(e,n)=>Da(e,"data-mce-bogus")||av(e,'[data-mce-bogus="all"]',I_(n)),H_=(e,n)=>{const o=le.fromDom(e.getBody()),r=tc(o,`[${Vp()}="${n}"]`);return Ze(r,c=>!Wp(c,o))},h1=(e,n)=>{const o=le.fromDom(e.getBody()),r=tc(o,`[${Bd()}="${n}"]`),c={};return re(r,u=>{if(!Wp(u,o)){const m=_c(u,Vp()),b=Ss(c,m).getOr([]);c[m]=b.concat([u])}}),c},Yc=(e,n)=>{const o=na({}),r=()=>({listeners:[],previous:wm()}),c=(N,$)=>{u(N,J=>($(J),J))},u=(N,$)=>{const J=o.get(),ne=Ss(J,N).getOrThunk(r),G=$(ne);J[N]=G,o.set(J)},m=(N,$,J)=>{c(N,ne=>{re(ne.listeners,G=>G(!0,N,{uid:$,nodes:ve(J,oe=>oe.dom)}))})},b=N=>{c(N,$=>{re($.listeners,J=>J(!1,N))})},v=(N,$)=>{re(H_(e,N),J=>{$?mr(J,Up(),"true"):Qr(J,Up())})},x=g1(()=>{const N=Gn(n.getNames());re(N,$=>{u($,J=>{const ne=J.previous.get();return fa(e,F.some($)).fold(()=>{ne.each(G=>{b($),J.previous.clear(),v(G,!1)})},({uid:G,name:oe,elements:xe})=>{Gs(ne,G)||(ne.each(Oe=>v(Oe,!1)),m(oe,G,xe),J.previous.set(G),v(G,!0))}),{previous:J.previous,listeners:J.listeners}})})},30);return e.on("remove",()=>{x.cancel()}),e.on("NodeChange",()=>{x.throttle()}),{addListener:(N,$)=>{u(N,J=>({previous:J.previous,listeners:J.listeners.concat([$])}))}}},zl=(e,n)=>{const o=Bd(),r=u=>F.from(u.attr(o)).bind(n.lookup),c=u=>{var m,b;u.attr(Vp(),null),u.attr(Bd(),null),u.attr(Up(),null);const v=F.from(u.attr($g())).map($=>$.split(",")).getOr([]),x=F.from(u.attr(jp())).map($=>$.split(",")).getOr([]);re(v,$=>u.attr($,null));const R=(b=(m=u.attr("class"))===null||m===void 0?void 0:m.split(" "))!==null&&b!==void 0?b:[],N=Lo(R,[p1()].concat(x));u.attr("class",N.length>0?N.join(" "):null),u.attr(jp(),null),u.attr($g(),null)};e.serializer.addTempAttr(Up()),e.serializer.addAttributeFilter(o,u=>{for(const m of u)r(m).each(b=>{b.persistent===!1&&(m.name==="span"?m.unwrap():c(m))})})},V_=()=>{const e={};return{register:(c,u)=>{e[c]={name:c,settings:u}},lookup:c=>Ss(e,c).map(u=>u.settings),getNames:()=>ts(e)}};let b1=0;const Ig=e=>{const o=new Date().getTime(),r=Math.floor(Math.random()*1e9);return b1++,e+"_"+r+b1+String(o)},yT=(e,n)=>{re(n,o=>{gu(e,o)})},U_=(e,n)=>{re(n,o=>{Cl(e,o)})},xv=(e,n)=>le.fromDom(e.dom.cloneNode(n)),ml=e=>xv(e,!1),y1=e=>xv(e,!0),Ca=(e,n)=>{const o=le.fromTag(n),r=Lu(e);return Pi(o,r),o},ed=(e,n)=>{const o=Ca(e,n);ol(e,o);const r=ya(e);return Zs(o,r),Ts(e),o},Zp=(e,n,o=Ne)=>{const r=new wr(e,n),c=u=>{let m;do m=r[u]();while(m&&!Mt(m)&&!o(m));return F.from(m).filter(Mt)};return{current:()=>F.from(r.current()).filter(Mt),next:()=>c("next"),prev:()=>c("prev"),prev2:()=>c("prev2")}},_m=(e,n)=>{const o=n||(m=>e.isBlock(m)||er(m)||hs(m)),r=(m,b,v,x)=>{if(Mt(m)){const R=x(m,b,m.data);if(R!==-1)return F.some({container:m,offset:R})}return v().bind(R=>r(R.container,R.offset,v,x))};return{backwards:(m,b,v,x)=>{const R=Zp(m,x??e.getRoot(),o);return r(m,b,()=>R.prev().map(N=>({container:N,offset:N.length})),v).getOrNull()},forwards:(m,b,v,x)=>{const R=Zp(m,x??e.getRoot(),o);return r(m,b,()=>R.next().map(N=>({container:N,offset:0})),v).getOrNull()}}},Lg=Math.round,Hg=e=>e?{left:Lg(e.left),top:Lg(e.top),bottom:Lg(e.bottom),right:Lg(e.right),width:Lg(e.width),height:Lg(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0},Of=(e,n)=>(e=Hg(e),n||(e.left=e.left+e.width),e.right=e.left,e.width=0,e),j_=(e,n)=>e.left===n.left&&e.top===n.top&&e.bottom===n.bottom&&e.right===n.right,Vg=(e,n,o)=>e>=0&&e<=Math.min(n.height,o.height)/2,Cm=(e,n)=>{const o=Math.min(n.height/2,e.height/2);return e.bottom-on.bottom?!1:Vg(n.top-e.bottom,e,n)},Ug=(e,n)=>e.top>n.bottom?!0:e.bottomn>=e.left&&n<=e.right&&o>=e.top&&o<=e.bottom,vT=e=>Q(e,(n,o)=>n.fold(()=>F.some(o),r=>{const c=Math.min(o.left,r.left),u=Math.min(o.top,r.top),m=Math.max(o.right,r.right),b=Math.max(o.bottom,r.bottom);return F.some({top:u,right:m,bottom:b,left:c,width:m-c,height:b-u})}),F.none()),Tv=(e,n,o)=>{const r=Math.max(Math.min(n,e.left+e.width),e.left),c=Math.max(Math.min(o,e.top+e.height),e.top);return Math.sqrt((n-r)*(n-r)+(o-c)*(o-c))},kT=(e,n)=>Math.max(0,Math.min(e.bottom,n.bottom)-Math.max(e.top,n.top)),v1=(e,n,o)=>Math.min(Math.max(e,n),o),Ev=e=>{const n=e.startContainer,o=e.startOffset;return n===e.endContainer&&n.hasChildNodes()&&e.endOffset===o+1?n.childNodes[o]:null},gl=(e,n)=>{if(Cn(e)&&e.hasChildNodes()){const o=e.childNodes,r=v1(n,0,o.length-1);return o[r]}else return e},Z_=(e,n)=>{if(!(n<0&&Cn(e)&&e.hasChildNodes()))return gl(e,n)},qp=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹᷀-᷵᷼-᷿‌-‍⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⵿⳱ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]"),q_=e=>W(e)&&e.charCodeAt(0)>=768&&qp.test(e),wT=(...e)=>n=>{for(let o=0;on=>{for(let o=0;oe?e.createRange():Dr.DOM.createRng(),xm=e=>W(e)&&/[\r\n\t ]/.test(e),Dv=e=>!!e.setStart&&!!e.setEnd,w1=e=>{const n=e.startContainer,o=e.startOffset;if(xm(e.toString())&&Av(n.parentNode)&&Mt(n)){const r=n.data;if(xm(r[o-1])||xm(r[o+1]))return!0}return!1},kb=e=>{const n=e.ownerDocument,o=Pd(n),r=n.createTextNode(Ms),c=e.parentNode;c.insertBefore(r,e),o.setStart(r,0),o.setEnd(r,1);const u=Hg(o.getBoundingClientRect());return c.removeChild(r),u},zv=e=>{const n=e.startContainer,o=e.endContainer,r=e.startOffset,c=e.endOffset;if(n===o&&Mt(o)&&r===0&&c===1){const u=e.cloneRange();return u.setEndAfter(o),Fd(u)}else return null},_1=e=>e.left===0&&e.right===0&&e.top===0&&e.bottom===0,Fd=e=>{var n;let o;const r=e.getClientRects();return r.length>0?o=Hg(r[0]):o=Hg(e.getBoundingClientRect()),!Dv(e)&&vb(e)&&_1(o)?kb(e):_1(o)&&Dv(e)&&(n=zv(e))!==null&&n!==void 0?n:o},Df=(e,n)=>{const o=Of(e,n);return o.width=1,o.right=o.left+1,o},_T=e=>{const n=[],o=m=>{m.height!==0&&(n.length>0&&j_(m,n[n.length-1])||n.push(m))},r=(m,b)=>{const v=Pd(m.ownerDocument);if(b0&&(v.setStart(m,b-1),v.setEnd(m,b),w1(v)||o(Df(Fd(v),!1))),b{const r=()=>(tr(e),n===0),c=()=>tr(e)?n>=e.data.length:n>=e.childNodes.length,u=()=>{const R=Pd(e.ownerDocument);return R.setStart(e,n),R.setEnd(e,n),R},m=()=>(o||(o=_T(Xe(e,n))),o),b=()=>m().length>0,v=R=>R&&e===R.container()&&n===R.offset(),x=R=>sc(e,R?n-1:n);return{container:st(e),offset:st(n),toRange:u,getClientRects:m,isVisible:b,isAtStart:r,isAtEnd:c,isEqual:v,getNode:x}};Xe.fromRangeStart=e=>Xe(e.startContainer,e.startOffset),Xe.fromRangeEnd=e=>Xe(e.endContainer,e.endOffset),Xe.after=e=>Xe(e.parentNode,Ov(e)+1),Xe.before=e=>Xe(e.parentNode,Ov(e)),Xe.isAbove=(e,n)=>Yr(gn(n.getClientRects()),ho(e.getClientRects()),Cm).getOr(!1),Xe.isBelow=(e,n)=>Yr(ho(n.getClientRects()),gn(e.getClientRects()),Ug).getOr(!1),Xe.isAtStart=e=>e?e.isAtStart():!1,Xe.isAtEnd=e=>e?e.isAtEnd():!1,Xe.isTextPosition=e=>e?Mt(e.container()):!1,Xe.isElementPosition=e=>!Xe.isTextPosition(e);const wb=(e,n)=>{Mt(n)&&n.data.length===0&&e.remove(n)},Gp=(e,n,o)=>{n.insertNode(o),wb(e,o.previousSibling),wb(e,o.nextSibling)},Rl=(e,n,o)=>{const r=F.from(o.firstChild),c=F.from(o.lastChild);n.insertNode(o),r.each(u=>wb(e,u.previousSibling)),c.each(u=>wb(e,u.nextSibling))},Rv=(e,n,o)=>{Lr(o)?Rl(e,n,o):Gp(e,n,o)},Hr=Mt,C1=nu,zf=Dr.nodeIndex,Nv=e=>{const n=e.parentNode;return C1(n)?Nv(n):n},S1=e=>e?fe(e.childNodes,(n,o)=>(C1(o)&&o.nodeName!=="BR"?n=n.concat(S1(o)):n.push(o),n),[]):[],Mv=(e,n)=>{let o=e;for(;(o=o.previousSibling)&&Hr(o);)n+=o.data.length;return n},_b=e=>n=>e===n,Kp=e=>{let n,o;n=S1(Nv(e)),o=ie(n,_b(e),e),n=n.slice(0,o+1);const r=fe(n,(c,u,m)=>(Hr(u)&&Hr(n[m-1])&&c++,c),0);return n=Fr(n,ka([e.nodeName])),o=ie(n,_b(e),e),o-r},Bv=e=>(Hr(e)?"text()":e.nodeName.toLowerCase())+"["+Kp(e)+"]",CT=(e,n,o)=>{const r=[];for(let c=n.parentNode;c&&c!==e&&!(o&&o(c));c=c.parentNode)r.push(c);return r},Di=(e,n)=>{let o=[],r=n.container(),c=n.offset(),u;if(Hr(r))u=Mv(r,c);else{const b=r.childNodes;c>=b.length?(u="after",c=b.length-1):u="before",r=b[c]}o.push(Bv(r));let m=CT(e,r);return m=Fr(m,ro(nu)),o=o.concat(Nr(m,b=>Bv(b))),o.reverse().join("/")+","+u},rc=(e,n,o)=>{let r=S1(e);return r=Fr(r,(c,u)=>!Hr(c)||!Hr(r[u-1])),r=Fr(r,ka([n])),r[o]},Uc=(e,n)=>{let o=e,r=0;for(;Hr(o);){const c=o.data.length;if(n>=r&&n<=r+c){e=o,n=n-r;break}if(!Hr(o.nextSibling)){e=o,n=c;break}r+=c,o=o.nextSibling}return Hr(e)&&n>e.data.length&&(n=e.data.length),Xe(e,n)},zi=(e,n)=>{if(!n)return null;const o=n.split(","),r=o[0].split("/"),c=o.length>1?o[1]:"before",u=fe(r,(m,b)=>{const v=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(b);return v?(v[1]==="text()"&&(v[1]="#text"),rc(m,v[1],parseInt(v[2],10))):null},e);if(!u)return null;if(!Hr(u)&&u.parentNode){let m;return c==="after"?m=zf(u)+1:m=zf(u),Xe(u.parentNode,m)}return Uc(u,parseInt(c,10))},Xc=hs,mi=(e,n,o)=>{let r=e(n.data.slice(0,o)).length;for(let c=n.previousSibling;c&&Mt(c);c=c.previousSibling)r+=e(c.data).length;return r},ac=(e,n,o,r,c)=>{const u=c?r.startContainer:r.endContainer;let m=c?r.startOffset:r.endOffset;const b=[],v=e.getRoot();if(Mt(u))b.push(o?mi(n,u,m):m);else{let x=0;const R=u.childNodes;m>=R.length&&R.length&&(x=1,m=Math.max(0,R.length-1)),b.push(e.nodeIndex(R[m],o)+x)}for(let x=u;x&&x!==v;x=x.parentNode)b.push(e.nodeIndex(x,o));return b},Pv=(e,n,o,r)=>{const c=n.dom,u=ac(c,e,o,r,!0),m=n.isForward(),b=Og(r)?{isFakeCaret:!0}:{};if(n.isCollapsed())return{start:u,forward:m,...b};{const v=ac(c,e,o,r,!1);return{start:u,end:v,forward:m,...b}}},Cb=(e,n,o)=>{let r=0;return Et.each(e.select(n),c=>{if(c.getAttribute("data-mce-bogus")!=="all"){if(c===o)return!1;r++;return}}),r},Fv=(e,n)=>{let o=n?e.startContainer:e.endContainer,r=n?e.startOffset:e.endOffset;if(Cn(o)&&o.nodeName==="TR"){const c=o.childNodes;o=c[Math.min(n?r:r-1,c.length-1)],o&&(r=n?0:o.childNodes.length,n?e.setStart(o,r):e.setEnd(o,r))}},Sb=e=>(Fv(e,!0),Fv(e,!1),e),$v=(e,n)=>{if(Cn(e)&&(e=gl(e,n),Xc(e)))return e;if(Yn(e)){Mt(e)&&Pt(e)&&(e=e.parentNode);let o=e.previousSibling;if(Xc(o)||(o=e.nextSibling,Xc(o)))return o}},G_=e=>$v(e.startContainer,e.startOffset)||$v(e.endContainer,e.endOffset),x1=(e,n,o)=>{const r=o.getNode(),c=o.getRng();if(r.nodeName==="IMG"||Xc(r)){const m=r.nodeName;return{name:m,index:Cb(o.dom,m,r)}}const u=G_(c);if(u){const m=u.tagName;return{name:m,index:Cb(o.dom,m,u)}}return Pv(e,o,n,c)},Iv=e=>{const n=e.getRng();return{start:Di(e.dom.getRoot(),Xe.fromRangeStart(n)),end:Di(e.dom.getRoot(),Xe.fromRangeEnd(n)),forward:e.isForward()}},ST=e=>({rng:e.getRng(),forward:e.isForward()}),xT=(e,n,o)=>{const r={"data-mce-type":"bookmark",id:n,style:"overflow:hidden;line-height:0px"};return o?e.create("span",r,""):e.create("span",r)},K_=(e,n)=>{const o=e.dom;let r=e.getRng();const c=o.uniqueId(),u=e.isCollapsed(),m=e.getNode(),b=m.nodeName,v=e.isForward();if(b==="IMG")return{name:b,index:Cb(o,b,m)};const x=Sb(r.cloneRange());if(!u){x.collapse(!1);const N=xT(o,c+"_end",n);Rv(o,x,N)}r=Sb(r),r.collapse(!0);const R=xT(o,c+"_start",n);return Rv(o,r,R),e.moveToBookmark({id:c,keep:!0,forward:v}),{id:c,forward:v}},TT=(e,n,o=!1)=>n===2?x1(L,o,e):n===3?Iv(e):n?ST(e):K_(e,!1),Yp=et(x1,In,!0),T1=e=>{const n=u=>u(e),o=st(e),r=()=>c,c={tag:!0,inner:e,fold:(u,m)=>m(e),isValue:at,isError:Ne,map:u=>Hi.value(u(e)),mapError:r,bind:n,exists:n,forall:n,getOr:o,or:r,getOrThunk:o,orThunk:r,getOrDie:o,each:u=>{u(e)},toOptional:()=>F.some(e)};return c},Y_=e=>{const n=()=>o,o={tag:!1,inner:e,fold:(r,c)=>r(e),isValue:Ne,isError:at,map:n,mapError:r=>Hi.error(r(e)),bind:n,exists:Ne,forall:at,getOr:In,or:In,getOrThunk:wt,orThunk:wt,getOrDie:Wo(String(e)),each:Re,toOptional:F.none};return o},Hi={value:T1,error:Y_,fromOption:(e,n)=>e.fold(()=>Y_(n),T1)},nd={generate:e=>{if(!mt(e))throw new Error("cases must be an array");if(e.length===0)throw new Error("there must be at least one case");const n=[],o={};return re(e,(r,c)=>{const u=ts(r);if(u.length!==1)throw new Error("one and only one name per case");const m=u[0],b=r[m];if(o[m]!==void 0)throw new Error("duplicate key detected:"+m);if(m==="cata")throw new Error("cannot have a case named cata (sorry)");if(!mt(b))throw new Error("case arguments must be an array");n.push(m),o[m]=(...v)=>{const x=v.length;if(x!==b.length)throw new Error("Wrong number of arguments to case "+m+". Expected "+b.length+" ("+b+"), got "+x);return{fold:(...N)=>{if(N.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+N.length);return N[c].apply(null,v)},match:N=>{const $=ts(N);if(n.length!==$.length)throw new Error("Wrong number of arguments to match. Expected: "+n.join(",")+` Actual: `+$.join(","));if(!zn(n,ne=>ee($,ne)))throw new Error("Not all branches were specified when using match. Specified: "+$.join(", ")+` Required: `+n.join(", "));return N[m].apply(null,v)},log:N=>{console.log(N,{constructors:n,constructor:m,params:v})}}}}),o}};nd.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const Lt=e=>{const n=[],o=[];return re(e,r=>{r.fold(c=>{n.push(c)},c=>{o.push(c)})}),{errors:n,values:o}},Lv=e=>e.type==="inline-command"||e.type==="inline-format",cc=e=>e.type==="block-command"||e.type==="block-format",X_=e=>{const n=r=>Hi.error({message:r,pattern:e}),o=(r,c,u)=>{if(e.format!==void 0){let m;if(mt(e.format)){if(!zn(e.format,W))return n(r+" pattern has non-string items in the `format` array");m=e.format}else if(W(e.format))m=[e.format];else return n(r+" pattern has non-string `format` parameter");return Hi.value(c(m))}else return e.cmd!==void 0?W(e.cmd)?Hi.value(u(e.cmd,e.value)):n(r+" pattern has non-string `cmd` parameter"):n(r+" pattern is missing both `format` and `cmd` parameters")};if(!Be(e))return n("Raw pattern is not an object");if(!W(e.start))return n("Raw pattern is missing `start` parameter");if(e.end!==void 0){if(!W(e.end))return n("Inline pattern has non-string `end` parameter");if(e.start.length===0&&e.end.length===0)return n("Inline pattern has empty `start` and `end` parameters");let r=e.start,c=e.end;return c.length===0&&(c=r,r=""),o("Inline",u=>({type:"inline-format",start:r,end:c,format:u}),(u,m)=>({type:"inline-command",start:r,end:c,cmd:u,value:m}))}else return e.replacement!==void 0?W(e.replacement)?e.start.length===0?n("Replacement pattern has empty `start` parameter"):Hi.value({type:"inline-command",start:"",end:e.start,cmd:"mceInsertContent",value:e.replacement}):n("Replacement pattern has non-string `replacement` parameter"):e.start.length===0?n("Block pattern has empty `start` parameter"):o("Block",r=>({type:"block-format",start:e.start,format:r[0]}),(r,c)=>({type:"block-command",start:e.start,cmd:r,value:c}))},E1=e=>Ze(e,cc),Hv=e=>Ze(e,Lv),Vi=(e,n)=>({inlinePatterns:Hv(e),blockPatterns:E1(e),dynamicPatternsLookup:n}),ET=e=>{const n=Lt(ve(e,X_));return re(n.errors,o=>console.error(o.message,o.pattern)),n.values},J_=e=>n=>{const o=e(n);return ET(o)},Ui=qs().deviceType,Xp=Ui.isTouch(),xb=Dr.DOM,$d=e=>{const n=e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(",");return Q(n,(o,r)=>{const c=r.split("="),u=c[0],m=c.length>1?c[1]:u;return o[Ba(u)]=Ba(m),o},{})},Ou=e=>At(e,RegExp),hn=e=>n=>n.options.get(e),Nl=e=>W(e)||Be(e),Q_=(e,n="")=>o=>{const r=W(o);if(r)if(o.indexOf("=")!==-1){const c=$d(o);return{value:Ss(c,e.id).getOr(n),valid:r}}else return{value:o,valid:r};else return{valid:!1,message:"Must be a string."}},e2=e=>{const n=e.options.register;n("id",{processor:"string",default:e.id}),n("selector",{processor:"string"}),n("target",{processor:"object"}),n("suffix",{processor:"string"}),n("cache_suffix",{processor:"string"}),n("base_url",{processor:"string"}),n("referrer_policy",{processor:"string",default:""}),n("language_load",{processor:"boolean",default:!0}),n("inline",{processor:"boolean",default:!1}),n("iframe_attrs",{processor:"object",default:{}}),n("doctype",{processor:"string",default:""}),n("document_base_url",{processor:"string",default:e.documentBaseUrl}),n("body_id",{processor:Q_(e,"tinymce"),default:"tinymce"}),n("body_class",{processor:Q_(e),default:""}),n("content_security_policy",{processor:"string",default:""}),n("br_in_pre",{processor:"boolean",default:!0}),n("forced_root_block",{processor:o=>{const r=W(o)&&mo(o);return r?{value:o,valid:r}:{valid:!1,message:"Must be a non-empty string."}},default:"p"}),n("forced_root_block_attrs",{processor:"object",default:{}}),n("newline_behavior",{processor:o=>{const r=ee(["block","linebreak","invert","default"],o);return r?{value:o,valid:r}:{valid:!1,message:"Must be one of: block, linebreak, invert or default."}},default:"default"}),n("br_newline_selector",{processor:"string",default:".mce-toc h2,figcaption,caption"}),n("no_newline_selector",{processor:"string",default:""}),n("keep_styles",{processor:"boolean",default:!0}),n("end_container_on_empty_block",{processor:o=>it(o)?{valid:!0,value:o}:W(o)?{valid:!0,value:o}:{valid:!1,message:"Must be boolean or a string"},default:"blockquote"}),n("font_size_style_values",{processor:"string",default:"xx-small,x-small,small,medium,large,x-large,xx-large"}),n("font_size_legacy_values",{processor:"string",default:"xx-small,small,medium,large,x-large,xx-large,300%"}),n("font_size_classes",{processor:"string",default:""}),n("automatic_uploads",{processor:"boolean",default:!0}),n("images_reuse_filename",{processor:"boolean",default:!1}),n("images_replace_blob_uris",{processor:"boolean",default:!0}),n("icons",{processor:"string",default:""}),n("icons_url",{processor:"string",default:""}),n("images_upload_url",{processor:"string",default:""}),n("images_upload_base_path",{processor:"string",default:""}),n("images_upload_credentials",{processor:"boolean",default:!1}),n("images_upload_handler",{processor:"function"}),n("language",{processor:"string",default:"en"}),n("language_url",{processor:"string",default:""}),n("entity_encoding",{processor:"string",default:"named"}),n("indent",{processor:"boolean",default:!0}),n("indent_before",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"}),n("indent_after",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,details,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"}),n("indent_use_margin",{processor:"boolean",default:!1}),n("indentation",{processor:"string",default:"40px"}),n("content_css",{processor:o=>{const r=o===!1||W(o)||Se(o,W);return r?W(o)?{value:ve(o.split(","),Ba),valid:r}:mt(o)?{value:o,valid:r}:o===!1?{value:[],valid:r}:{value:o,valid:r}:{valid:!1,message:"Must be false, a string or an array of strings."}},default:Qv(e)?[]:["default"]}),n("content_style",{processor:"string"}),n("content_css_cors",{processor:"boolean",default:!1}),n("font_css",{processor:o=>{const r=W(o)||Se(o,W);return r?{value:mt(o)?o:ve(o.split(","),Ba),valid:r}:{valid:!1,message:"Must be a string or an array of strings."}},default:[]}),n("inline_boundaries",{processor:"boolean",default:!0}),n("inline_boundaries_selector",{processor:"string",default:"a[href],code,span.mce-annotation"}),n("object_resizing",{processor:o=>{const r=it(o)||W(o);return r?o===!1||Ui.isiPhone()||Ui.isiPad()?{value:"",valid:r}:{value:o===!0?"table,img,figure.image,div,video,iframe":o,valid:r}:{valid:!1,message:"Must be boolean or a string"}},default:!Xp}),n("resize_img_proportional",{processor:"boolean",default:!0}),n("event_root",{processor:"object"}),n("service_message",{processor:"string"}),n("theme",{processor:o=>o===!1||W(o)||ae(o),default:"silver"}),n("theme_url",{processor:"string"}),n("formats",{processor:"object"}),n("format_empty_lines",{processor:"boolean",default:!1}),n("format_noneditable_selector",{processor:"string",default:""}),n("preview_styles",{processor:o=>{const r=o===!1||W(o);return r?{value:o===!1?"":o,valid:r}:{valid:!1,message:"Must be false or a string"}},default:"font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"}),n("custom_ui_selector",{processor:"string",default:""}),n("hidden_input",{processor:"boolean",default:!0}),n("submit_patch",{processor:"boolean",default:!0}),n("encoding",{processor:"string"}),n("add_form_submit_trigger",{processor:"boolean",default:!0}),n("add_unload_trigger",{processor:"boolean",default:!0}),n("custom_undo_redo_levels",{processor:"number",default:0}),n("disable_nodechange",{processor:"boolean",default:!1}),n("readonly",{processor:"boolean",default:!1}),n("editable_root",{processor:"boolean",default:!0}),n("plugins",{processor:"string[]",default:[]}),n("external_plugins",{processor:"object"}),n("forced_plugins",{processor:"string[]"}),n("model",{processor:"string",default:e.hasPlugin("rtc")?"plugin":"dom"}),n("model_url",{processor:"string"}),n("block_unsupported_drop",{processor:"boolean",default:!0}),n("visual",{processor:"boolean",default:!0}),n("visual_table_class",{processor:"string",default:"mce-item-table"}),n("visual_anchor_class",{processor:"string",default:"mce-item-anchor"}),n("iframe_aria_text",{processor:"string",default:"Rich Text Area. Press ALT-0 for help."}),n("setup",{processor:"function"}),n("init_instance_callback",{processor:"function"}),n("url_converter",{processor:"function",default:e.convertURL}),n("url_converter_scope",{processor:"object",default:e}),n("urlconverter_callback",{processor:"function"}),n("allow_conditional_comments",{processor:"boolean",default:!1}),n("allow_html_data_urls",{processor:"boolean",default:!1}),n("allow_svg_data_urls",{processor:"boolean"}),n("allow_html_in_named_anchor",{processor:"boolean",default:!1}),n("allow_script_urls",{processor:"boolean",default:!1}),n("allow_unsafe_link_target",{processor:"boolean",default:!1}),n("convert_fonts_to_spans",{processor:"boolean",default:!0,deprecated:!0}),n("fix_list_elements",{processor:"boolean",default:!1}),n("preserve_cdata",{processor:"boolean",default:!1}),n("remove_trailing_brs",{processor:"boolean",default:!0}),n("pad_empty_with_br",{processor:"boolean",default:!1}),n("inline_styles",{processor:"boolean",default:!0,deprecated:!0}),n("element_format",{processor:"string",default:"html"}),n("entities",{processor:"string"}),n("schema",{processor:"string",default:"html5"}),n("convert_urls",{processor:"boolean",default:!0}),n("relative_urls",{processor:"boolean",default:!0}),n("remove_script_host",{processor:"boolean",default:!0}),n("custom_elements",{processor:"string"}),n("extended_valid_elements",{processor:"string"}),n("invalid_elements",{processor:"string"}),n("invalid_styles",{processor:Nl}),n("valid_children",{processor:"string"}),n("valid_classes",{processor:Nl}),n("valid_elements",{processor:"string"}),n("valid_styles",{processor:Nl}),n("verify_html",{processor:"boolean",default:!0}),n("auto_focus",{processor:o=>W(o)||o===!0}),n("browser_spellcheck",{processor:"boolean",default:!1}),n("protect",{processor:"array"}),n("images_file_types",{processor:"string",default:"jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp"}),n("deprecation_warnings",{processor:"boolean",default:!0}),n("a11y_advanced_options",{processor:"boolean",default:!1}),n("api_key",{processor:"string"}),n("paste_block_drop",{processor:"boolean",default:!1}),n("paste_data_images",{processor:"boolean",default:!0}),n("paste_preprocess",{processor:"function"}),n("paste_postprocess",{processor:"function"}),n("paste_webkit_styles",{processor:"string",default:"none"}),n("paste_remove_styles_if_webkit",{processor:"boolean",default:!0}),n("paste_merge_formats",{processor:"boolean",default:!0}),n("smart_paste",{processor:"boolean",default:!0}),n("paste_as_text",{processor:"boolean",default:!1}),n("paste_tab_spaces",{processor:"number",default:4}),n("text_patterns",{processor:o=>Se(o,Be)||o===!1?{value:ET(o===!1?[]:o),valid:!0}:{valid:!1,message:"Must be an array of objects or false."},default:[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}]}),n("text_patterns_lookup",{processor:o=>ae(o)?{value:J_(o),valid:!0}:{valid:!1,message:"Must be a single function"},default:o=>[]}),n("noneditable_class",{processor:"string",default:"mceNonEditable"}),n("editable_class",{processor:"string",default:"mceEditable"}),n("noneditable_regexp",{processor:o=>Se(o,Ou)?{value:o,valid:!0}:Ou(o)?{value:[o],valid:!0}:{valid:!1,message:"Must be a RegExp or an array of RegExp."},default:[]}),n("table_tab_navigation",{processor:"boolean",default:!0}),n("highlight_on_focus",{processor:"boolean",default:!1}),n("xss_sanitization",{processor:"boolean",default:!0}),n("details_initial_state",{processor:o=>{const r=ee(["inherited","collapsed","expanded"],o);return r?{value:o,valid:r}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),n("details_serialized_state",{processor:o=>{const r=ee(["inherited","collapsed","expanded"],o);return r?{value:o,valid:r}:{valid:!1,message:"Must be one of: inherited, collapsed, or expanded."}},default:"inherited"}),n("init_content_sync",{processor:"boolean",default:!1}),n("newdocument_content",{processor:"string",default:""}),n("force_hex_color",{processor:o=>{const r=["always","rgb_only","off"],c=ee(r,o);return c?{value:o,valid:c}:{valid:!1,message:`Must be one of: ${r.join(", ")}.`}},default:"off"}),n("sandbox_iframes",{processor:"boolean",default:!1}),n("convert_unsafe_embeds",{processor:"boolean",default:!1}),e.on("ScriptsLoaded",()=>{n("directionality",{processor:"string",default:Au.isRtl()?"rtl":void 0}),n("placeholder",{processor:"string",default:xb.getAttrib(e.getElement(),"placeholder")})})},Vv=hn("iframe_attrs"),t2=hn("doctype"),Uv=hn("document_base_url"),jv=hn("body_id"),AT=hn("body_class"),Wv=hn("content_security_policy"),OT=hn("br_in_pre"),gi=hn("forced_root_block"),Tb=hn("forced_root_block_attrs"),DT=hn("newline_behavior"),zT=hn("br_newline_selector"),Zv=hn("no_newline_selector"),RT=hn("keep_styles"),n2=hn("end_container_on_empty_block"),o2=hn("automatic_uploads"),Eb=hn("images_reuse_filename"),s2=hn("images_replace_blob_uris"),qv=hn("icons"),jg=hn("icons_url"),NT=hn("images_upload_url"),MT=hn("images_upload_base_path"),Gv=hn("images_upload_credentials"),BT=hn("images_upload_handler"),Rf=hn("content_css_cors"),us=hn("referrer_policy"),Kv=hn("language"),pi=hn("language_url"),A1=hn("indent_use_margin"),Yv=hn("indentation"),Xv=hn("content_css"),O1=hn("content_style"),r2=hn("font_css"),PT=hn("directionality"),FT=hn("inline_boundaries_selector"),Jp=hn("object_resizing"),a2=hn("resize_img_proportional"),HO=hn("placeholder"),Tm=hn("event_root"),$T=hn("service_message"),Qp=hn("theme"),IT=hn("theme_url"),Jv=hn("model"),c2=hn("model_url"),Wg=hn("inline_boundaries"),LT=hn("formats"),i2=hn("preview_styles"),l2=hn("format_empty_lines"),eh=hn("format_noneditable_selector"),u2=hn("custom_ui_selector"),Qv=hn("inline"),HT=hn("hidden_input"),d2=hn("submit_patch"),Id=hn("add_form_submit_trigger"),Ab=hn("add_unload_trigger"),Ob=hn("custom_undo_redo_levels"),D1=hn("disable_nodechange"),Db=hn("readonly"),cu=hn("editable_root"),th=hn("content_css_cors"),zb=hn("plugins"),Em=hn("external_plugins"),z1=hn("block_unsupported_drop"),VT=hn("visual"),UT=hn("visual_table_class"),f2=hn("visual_anchor_class"),jT=hn("iframe_aria_text"),ek=hn("setup"),WT=hn("init_instance_callback"),ZT=hn("urlconverter_callback"),m2=hn("auto_focus"),qT=hn("browser_spellcheck"),g2=hn("protect"),GT=hn("paste_block_drop"),R1=hn("paste_data_images"),KT=hn("paste_preprocess"),p2=hn("paste_postprocess"),nh=hn("newdocument_content"),tk=hn("paste_webkit_styles"),nk=hn("paste_remove_styles_if_webkit"),ok=hn("paste_merge_formats"),h2=hn("smart_paste"),sk=hn("paste_as_text"),YT=hn("paste_tab_spaces"),N1=hn("allow_html_data_urls"),M1=hn("text_patterns"),XT=hn("text_patterns_lookup"),rk=hn("noneditable_class"),b2=hn("editable_class"),JT=hn("noneditable_regexp"),ak=hn("preserve_cdata"),QT=hn("highlight_on_focus"),oh=hn("xss_sanitization"),eE=hn("init_content_sync"),ck=e=>e.options.isSet("text_patterns_lookup"),tE=e=>Et.explode(e.options.get("font_size_style_values")),nE=e=>Et.explode(e.options.get("font_size_classes")),oE=e=>e.options.get("encoding")==="xml",y2=e=>Et.explode(e.options.get("images_file_types")),sE=hn("table_tab_navigation"),xc=hn("details_initial_state"),VO=hn("details_serialized_state"),sh=hn("force_hex_color"),B1=hn("sandbox_iframes"),v2=Cn,ik=Mt,k2=e=>{const n=e.parentNode;n&&n.removeChild(e)},w2=e=>{const n=L(e);return{count:e.length-n.length,text:n}},Zg=e=>{let n;for(;(n=e.data.lastIndexOf(w))!==-1;)e.deleteData(n,1)},Rb=(e,n)=>(ic(e),n),rE=(e,n)=>{const o=w2(e.data.substr(0,n.offset())),r=w2(e.data.substr(n.offset()));return(o.text+r.text).length>0?(Zg(e),Xe(e,n.offset()-o.count)):n},aE=(e,n)=>{const o=n.container(),r=an(cs(o.childNodes),e).map(c=>cik(e)&&n.container()===e?rE(e,n):Rb(e,n),lk=(e,n)=>n.container()===e.parentNode?aE(e,n):Rb(e,n),_2=(e,n)=>Xe.isTextPosition(n)?Nb(e,n):lk(e,n),ic=e=>{v2(e)&&Yn(e)&&(Vo(e)?e.removeAttribute("data-mce-caret"):k2(e)),ik(e)&&(Zg(e),e.data.length===0&&k2(e))},C2=hs,uk=ca,UO=um,rh="*[contentEditable=false],video,audio,embed,object",cE=(e,n,o)=>{const r=Of(n.getBoundingClientRect(),o);let c,u;if(e.tagName==="BODY"){const b=e.ownerDocument.documentElement;c=e.scrollLeft||b.scrollLeft,u=e.scrollTop||b.scrollTop}else{const b=e.getBoundingClientRect();c=e.scrollLeft-b.left,u=e.scrollTop-b.top}r.left+=c,r.right+=c,r.top+=u,r.bottom+=u,r.width=1;let m=n.offsetWidth-n.clientWidth;return m>0&&(o&&(m*=-1),r.left+=m,r.right+=m),r},S2=e=>{var n,o;const r=tc(le.fromDom(e),rh);for(let c=0;c{const c=wm();let u,m;const b=gi(e),v=e.dom,x=(G,oe)=>{let xe;if(R(),UO(oe))return null;if(o(oe)){const Oe=Oi(b,oe,G),Ae=cE(n,oe,G);v.setStyle(Oe,"top",Ae.top),m=Oe;const Ue=v.create("div",{class:"mce-visual-caret","data-mce-bogus":"all"});v.setStyles(Ue,{...Ae}),v.add(n,Ue),c.set({caret:Ue,element:oe,before:G}),G&&v.addClass(Ue,"mce-visual-caret-before"),N(),xe=oe.ownerDocument.createRange(),xe.setStart(Oe,0),xe.setEnd(Oe,0)}else return m=ta(oe,G),xe=oe.ownerDocument.createRange(),P1(m.nextSibling)?(xe.setStart(m,0),xe.setEnd(m,0)):(xe.setStart(m,1),xe.setEnd(m,1)),xe;return xe},R=()=>{S2(n),m&&(ic(m),m=null),c.on(G=>{v.remove(G.caret),c.clear()}),u&&(clearInterval(u),u=void 0)},N=()=>{u=setInterval(()=>{c.on(G=>{r()?v.toggleClass(G.caret,"mce-visual-caret-hidden"):v.addClass(G.caret,"mce-visual-caret-hidden")})},500)};return{show:x,hide:R,getCss:()=>".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}",reposition:()=>{c.on(G=>{const oe=cE(n,G.element,G.before);v.setStyles(G.caret,{...oe})})},destroy:()=>clearInterval(u)}},Mb=()=>tn.browser.isFirefox(),P1=e=>C2(e)||uk(e),ah=e=>(P1(e)||_u(e)&&Mb())&&nl(le.fromDom(e)).exists(Ho),iE=$c,Am=hs,x2=ca,Om=qu("display","block table table-cell table-caption list-item"),Dm=Yn,fk=Pt,T2=Cn,jO=Mt,mk=ms,zm=e=>e>0,Ld=e=>e<0,Bb=(e,n)=>{let o;for(;o=e(n);)if(!fk(o))return o;return null},ch=(e,n,o,r,c)=>{const u=new wr(e,r),m=Am(e)||fk(e);let b;if(Ld(n)){if(m&&(b=Bb(u.prev.bind(u),!0),o(b)))return b;for(;b=Bb(u.prev.bind(u),c);)if(o(b))return b}if(zm(n)){if(m&&(b=Bb(u.next.bind(u),!0),o(b)))return b;for(;b=Bb(u.next.bind(u),c);)if(o(b))return b}return null},gk=(e,n)=>{const o=c=>iE(c.dom),r=c=>c.dom===n;return Ir(le.fromDom(e),o,r).map(c=>c.dom).getOr(n)},Nf=(e,n)=>{for(;e&&e!==n;){if(Om(e))return e;e=e.parentNode}return null},od=(e,n,o)=>Nf(e.container(),o)===Nf(n.container(),o),Pb=(e,n)=>{if(!n)return F.none();const o=n.container(),r=n.offset();return T2(o)?F.from(o.childNodes[r+e]):F.none()},F1=(e,n)=>{var o;const c=((o=n.ownerDocument)!==null&&o!==void 0?o:document).createRange();return e?(c.setStartBefore(n),c.setEndBefore(n)):(c.setStartAfter(n),c.setEndAfter(n)),c},Fb=(e,n,o)=>Nf(n,e)===Nf(o,e),pk=(e,n,o)=>{const r=e?"previousSibling":"nextSibling";let c=o;for(;c&&c!==n;){let u=c[r];if(u&&Dm(u)&&(u=u[r]),Am(u)||x2(u)){if(Fb(n,u,c))return u;break}if(mk(u))break;c=c.parentNode}return null},ih=et(F1,!0),$b=et(F1,!1),hk=(e,n,o)=>{let r;const c=et(pk,!0,n),u=et(pk,!1,n),m=o.startContainer,b=o.startOffset;if(Pt(m)){const v=jO(m)?m.parentNode:m,x=v.getAttribute("data-mce-caret");if(x==="before"&&(r=v.nextSibling,ah(r)))return ih(r);if(x==="after"&&(r=v.previousSibling,ah(r)))return $b(r)}if(!o.collapsed)return o;if(Mt(m)){if(Dm(m)){if(e===1){if(r=u(m),r)return ih(r);if(r=c(m),r)return $b(r)}if(e===-1){if(r=c(m),r)return $b(r);if(r=u(m),r)return ih(r)}return o}if(cl(m)&&b>=m.data.length-1)return e===1&&(r=u(m),r)?ih(r):o;if(di(m)&&b<=1)return e===-1&&(r=c(m),r)?$b(r):o;if(b===m.data.length)return r=u(m),r?ih(r):o;if(b===0)return r=c(m),r?$b(r):o}return o},E2=(e,n)=>Pb(e?0:-1,n).filter(Am),Rm=(e,n,o)=>{const r=hk(e,n,o);return e===-1?Xe.fromRangeStart(r):Xe.fromRangeEnd(r)},$1=e=>F.from(e.getNode()).map(le.fromDom),lE=e=>F.from(e.getNode(!0)).map(le.fromDom),A2=(e,n)=>{let o=n;for(;o=e(o);)if(o.isVisible())return o;return o},bk=(e,n)=>{const o=od(e,n);return!o&&er(e.getNode())?!0:o};var Sa;(function(e){e[e.Backwards=-1]="Backwards",e[e.Forwards=1]="Forwards"})(Sa||(Sa={}));const WO=hs,Mf=Mt,O2=Cn,I1=er,Nm=ms,Jc=Lc,lh=wf,Ib=(e,n)=>{const o=[];let r=e;for(;r&&r!==n;)o.push(r),r=r.parentNode;return o},uh=(e,n)=>e.hasChildNodes()&&n{if(zm(e)){if(Nm(n.previousSibling)&&!Mf(n.previousSibling))return Xe.before(n);if(Mf(n))return Xe(n,0)}if(Ld(e)){if(Nm(n.nextSibling)&&!Mf(n.nextSibling))return Xe.after(n);if(Mf(n))return Xe(n,n.data.length)}return Ld(e)?I1(n)?Xe.before(n):Xe.after(n):Xe.before(n)},dh=(e,n)=>{const o=n.nextSibling;return o&&Nm(o)?Mf(o)?Xe(o,0):Xe.before(o):qg(Sa.Forwards,Xe.after(n),e)},qg=(e,n,o)=>{let r,c,u,m;if(!O2(o)||!n)return null;if(n.isEqual(Xe.after(o))&&o.lastChild){if(m=Xe.after(o.lastChild),Ld(e)&&Nm(o.lastChild)&&O2(o.lastChild))return I1(o.lastChild)?Xe.before(o.lastChild):m}else m=n;const b=m.container();let v=m.offset();if(Mf(b)){if(Ld(e)&&v>0)return Xe(b,--v);if(zm(e)&&v0&&(c=uh(b,v-1),Nm(c)))return!Jc(c)&&(u=ch(c,e,lh,c),u)?Mf(u)?Xe(u,u.data.length):Xe.after(u):Mf(c)?Xe(c,c.data.length):Xe.before(c);if(zm(e)&&v({next:n=>qg(Sa.Forwards,n,e),prev:n=>qg(Sa.Backwards,n,e)}),uE=(e,n,o)=>{const r=e?Xe.before(o):Xe.after(o);return Tc(e,n,r)},dE=e=>er(e)?Xe.before(e):Xe.after(e),Mm=e=>Xe.isTextPosition(e)?e.offset()===0:ms(e.getNode()),fh=e=>{if(Xe.isTextPosition(e)){const n=e.container();return e.offset()===n.data.length}else return ms(e.getNode(!0))},L1=(e,n)=>!Xe.isTextPosition(e)&&!Xe.isTextPosition(n)&&e.getNode()===n.getNode(!0),Hd=e=>!Xe.isTextPosition(e)&&er(e.getNode()),vk=(e,n,o)=>e?!L1(n,o)&&!Hd(n)&&fh(n)&&Mm(o):!L1(o,n)&&Mm(n)&&fh(o),Tc=(e,n,o)=>{const r=sd(n);return F.from(e?r.next(o):r.prev(o))},Bf=(e,n,o)=>Tc(e,n,o).bind(r=>od(o,r,n)&&vk(e,o,r)?Tc(e,n,r):F.some(r)),Du=(e,n,o,r)=>Bf(e,n,o).bind(c=>r(c)?Du(e,n,c,r):F.some(c)),mh=(e,n)=>{const o=e?n.firstChild:n.lastChild;return Mt(o)?F.some(Xe(o,e?0:o.data.length)):o?ms(o)?F.some(e?Xe.before(o):dE(o)):uE(e,n,o):F.none()},hi=et(Tc,!0),ji=et(Tc,!1),Ri=et(mh,!0),zu=et(mh,!1),H1="_mce_caret",Ml=e=>Cn(e)&&e.id===H1,Gg=(e,n)=>{let o=n;for(;o&&o!==e;){if(Ml(o))return o;o=o.parentNode}return null},kk=e=>W(e.start),fE=e=>Wn(e,"rng"),D2=e=>Wn(e,"id"),Lb=e=>Wn(e,"name"),z2=e=>Et.isArray(e.start),Hb=e=>!Lb(e)&&it(e.forward)?e.forward:!0,V1=(e,n)=>(Cn(n)&&e.isBlock(n)&&!n.innerHTML&&(n.innerHTML='
'),n),mE=(e,n)=>{const o=F.from(zi(e.getRoot(),n.start)),r=F.from(zi(e.getRoot(),n.end));return Yr(o,r,(c,u)=>{const m=e.createRng();return m.setStart(c.container(),c.offset()),m.setEnd(u.container(),u.offset()),{range:m,forward:Hb(n)}})},R2=(e,n)=>{var o;const c=((o=e.ownerDocument)!==null&&o!==void 0?o:document).createTextNode(w);e.appendChild(c),n.setStart(c,0),n.setEnd(c,0)},gE=e=>!e.hasChildNodes(),ZO=(e,n)=>zu(e).fold(Ne,o=>(n.setStart(o.container(),o.offset()),n.setEnd(o.container(),o.offset()),!0)),N2=(e,n,o)=>gE(n)&&Gg(e,n)?(R2(n,o),!0):!1,ws=(e,n,o,r)=>{const c=o[n?"start":"end"],u=e.getRoot();if(c){let m=u,b=c[0];for(let v=c.length-1;m&&v>=1;v--){const x=m.childNodes;if(N2(u,m,r))return!0;if(c[v]>x.length-1)return N2(u,m,r)?!0:ZO(m,r);m=x[c[v]]}Mt(m)&&(b=Math.min(c[0],m.data.length)),Cn(m)&&(b=Math.min(c[0],m.childNodes.length)),n?r.setStart(m,b):r.setEnd(m,b)}return!0},rd=e=>Mt(e)&&e.data.length>0,Kg=(e,n,o)=>{const r=e.get(o.id+"_"+n),c=r==null?void 0:r.parentNode,u=o.keep;if(r&&c){let m,b;if(n==="start"?u?r.hasChildNodes()?(m=r.firstChild,b=1):rd(r.nextSibling)?(m=r.nextSibling,b=0):rd(r.previousSibling)?(m=r.previousSibling,b=r.previousSibling.data.length):(m=c,b=e.nodeIndex(r)+1):(m=c,b=e.nodeIndex(r)):u?r.hasChildNodes()?(m=r.firstChild,b=1):rd(r.previousSibling)?(m=r.previousSibling,b=r.previousSibling.data.length):(m=c,b=e.nodeIndex(r)):(m=c,b=e.nodeIndex(r)),!u){const v=r.previousSibling,x=r.nextSibling;Et.each(Et.grep(r.childNodes),N=>{Mt(N)&&(N.data=N.data.replace(/\uFEFF/g,""))});let R;for(;R=e.get(o.id+"_"+n);)e.remove(R,!0);if(Mt(x)&&Mt(v)&&!tn.browser.isOpera()){const N=v.data.length;v.appendData(x.data),e.remove(x),m=v,b=N}}return F.some(Xe(m,b))}else return F.none()},wk=(e,n)=>{const o=e.createRng();return ws(e,!0,n,o)&&ws(e,!1,n,o)?F.some({range:o,forward:Hb(n)}):F.none()},M2=(e,n)=>{const o=Kg(e,"start",n),r=Kg(e,"end",n);return Yr(o,r.or(o),(c,u)=>{const m=e.createRng();return m.setStart(V1(e,c.container()),c.offset()),m.setEnd(V1(e,u.container()),u.offset()),{range:m,forward:Hb(n)}})},Vb=(e,n)=>F.from(e.select(n.name)[n.index]).map(o=>{const r=e.createRng();return r.selectNode(o),{range:r,forward:!0}}),pE=(e,n)=>{const o=e.dom;if(n){if(z2(n))return wk(o,n);if(kk(n))return mE(o,n);if(D2(n))return M2(o,n);if(Lb(n))return Vb(o,n);if(fE(n))return F.some({range:n.rng,forward:Hb(n)})}return F.none()},gh=(e,n,o)=>TT(e,n,o),U1=(e,n)=>{pE(e,n).each(({range:o,forward:r})=>{e.setRng(o,r)})},Bl=e=>Cn(e)&&e.tagName==="SPAN"&&e.getAttribute("data-mce-type")==="bookmark",j1=(e=>n=>e===n)(Ms),ph=e=>e!==""&&` \f diff --git a/admin-views/dist/assets/Tinymce-XRTkSsnQ.js.gz b/admin-views/dist/assets/Tinymce-XRTkSsnQ.js.gz new file mode 100644 index 00000000..feefdaef Binary files /dev/null and b/admin-views/dist/assets/Tinymce-XRTkSsnQ.js.gz differ diff --git a/admin-views/dist/assets/codemirror-BlsDEKcO.js.gz b/admin-views/dist/assets/codemirror-BlsDEKcO.js.gz deleted file mode 100644 index caafa037..00000000 Binary files a/admin-views/dist/assets/codemirror-BlsDEKcO.js.gz and /dev/null differ diff --git a/admin-views/dist/assets/codemirror-BlsDEKcO.js b/admin-views/dist/assets/codemirror-DJVdi8fy.js similarity index 99% rename from admin-views/dist/assets/codemirror-BlsDEKcO.js rename to admin-views/dist/assets/codemirror-DJVdi8fy.js index 6f8d3667..8e2d8ef8 100644 --- a/admin-views/dist/assets/codemirror-BlsDEKcO.js +++ b/admin-views/dist/assets/codemirror-DJVdi8fy.js @@ -1,4 +1,4 @@ -import{p as cu,q as du}from"./index-B4ouchdD.js";function pu(Xt,gi){for(var X=0;XMe[oe]})}}}return Object.freeze(Object.defineProperty(Xt,Symbol.toStringTag,{value:"Module"}))}var Yo={exports:{}};(function(Xt,gi){(function(X,Me){Xt.exports=Me()})(du,function(){var X=navigator.userAgent,Me=navigator.platform,oe=/gecko\/\d/i.test(X),bt=/MSIE \d/.test(X),Hn=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(X),Nr=/Edge\/(\d+)/.exec(X),A=bt||Hn||Nr,E=A&&(bt?document.documentMode||6:+(Nr||Hn)[1]),ie=!Nr&&/WebKit\//.test(X),Zo=ie&&/Qt\/\d+\.\d+/.test(X),Ge=!Nr&&/Chrome\/(\d+)/.exec(X),Fn=Ge&&+Ge[1],we=/Opera\//.test(X),Ar=/Apple Computer/.test(navigator.vendor),Qo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(X),Jo=/PhantomJS/.test(X),Yt=Ar&&(/Mobile\/\w+/.test(X)||navigator.maxTouchPoints>2),Or=/Android/.test(X),qt=Yt||Or||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(X),me=Yt||/Mac/.test(Me),jo=/\bCrOS\b/.test(X),Vo=/win/i.test(Me),et=we&&X.match(/Version\/(\d*\.\d*)/);et&&(et=Number(et[1])),et&&et>=15&&(we=!1,ie=!0);var Pn=me&&(Zo||we&&(et==null||et<12.11)),yi=oe||A&&E>=9;function xt(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var tt=function(e,t){var i=e.className,r=xt(t).exec(i);if(r){var n=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(n?r[1]+n:"")}};function Ue(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function ve(e,t){return Ue(e).appendChild(t)}function k(e,t,i,r){var n=document.createElement(e);if(i&&(n.className=i),r&&(n.style.cssText=r),typeof t=="string")n.appendChild(document.createTextNode(t));else if(t)for(var l=0;l=t)return o+(t-l);o+=a-l,o+=i-o%i,l=a+1}}var _e=function(){this.id=null,this.f=null,this.time=0,this.handler=bi(this.onTimeout,this)};_e.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},_e.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i=t)return r+Math.min(o,t-n);if(n+=l-r,n+=i-n%i,r=l+1,n>=t)return r}}var Fr=[""];function wi(e){for(;Fr.length<=e;)Fr.push(W(Fr)+" ");return Fr[e]}function W(e){return e[e.length-1]}function Pr(e,t){for(var i=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||ea.test(e))}function Er(e,t){return t?t.source.indexOf("\\w")>-1&&Si(e)?!0:t.test(e):Si(e)}function Bn(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ta=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Li(e){return e.charCodeAt(0)>=768&&ta.test(e)}function zn(e,t,i){for(;(i<0?t>0:ti?-1:1;;){if(t==i)return t;var n=(t+i)/2,l=r<0?Math.ceil(n):Math.floor(n);if(l==t)return e(l)?t:i;e(l)?i=l:t=l+r}}function ra(e,t,i,r){if(!e)return r(t,i,"ltr",0);for(var n=!1,l=0;lt||t==i&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,i),o.level==1?"rtl":"ltr",l),n=!0)}n||r(t,i,"ltr")}var Vt=null;function $t(e,t,i){var r;Vt=null;for(var n=0;nt)return n;l.to==t&&(l.from!=l.to&&i=="before"?r=n:Vt=n),l.from==t&&(l.from!=l.to&&i!="before"?r=n:Vt=n)}return r??Vt}var ia=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,l=/[LRr]/,o=/[Lb1n]/,a=/[1n]/;function s(u,f,h){this.level=u,this.from=f,this.to=h}return function(u,f){var h=f=="ltr"?"L":"R";if(u.length==0||f=="ltr"&&!r.test(u))return!1;for(var d=u.length,c=[],p=0;p-1&&(r[t]=n.slice(0,l).concat(n.slice(l+1)))}}}function G(e,t){var i=ki(e,t);if(i.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n0}function St(e){e.prototype.on=function(t,i){T(this,t,i)},e.prototype.off=function(t,i){ge(this,t,i)}}function ae(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Kn(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ti(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function er(e){ae(e),Kn(e)}function Mi(e){return e.target||e.srcElement}function _n(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),me&&e.ctrlKey&&t==1&&(t=3),t}var na=function(){if(A&&E<9)return!1;var e=k("div");return"draggable"in e||"dragDrop"in e}(),Di;function la(e){if(Di==null){var t=k("span","​");ve(e,k("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Di=t.offsetWidth<=1&&t.offsetHeight>2&&!(A&&E<8))}var i=Di?k("span","​"):k("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var Ni;function oa(e){if(Ni!=null)return Ni;var t=ve(e,document.createTextNode("AخA")),i=rt(t,0,1).getBoundingClientRect(),r=rt(t,1,2).getBoundingClientRect();return Ue(e),!i||i.left==i.right?!1:Ni=r.right-i.right<3}var Ai=` +import{p as cu,q as du}from"./index-5zY5TMAp.js";function pu(Xt,gi){for(var X=0;XMe[oe]})}}}return Object.freeze(Object.defineProperty(Xt,Symbol.toStringTag,{value:"Module"}))}var Yo={exports:{}};(function(Xt,gi){(function(X,Me){Xt.exports=Me()})(du,function(){var X=navigator.userAgent,Me=navigator.platform,oe=/gecko\/\d/i.test(X),bt=/MSIE \d/.test(X),Hn=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(X),Nr=/Edge\/(\d+)/.exec(X),A=bt||Hn||Nr,E=A&&(bt?document.documentMode||6:+(Nr||Hn)[1]),ie=!Nr&&/WebKit\//.test(X),Zo=ie&&/Qt\/\d+\.\d+/.test(X),Ge=!Nr&&/Chrome\/(\d+)/.exec(X),Fn=Ge&&+Ge[1],we=/Opera\//.test(X),Ar=/Apple Computer/.test(navigator.vendor),Qo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(X),Jo=/PhantomJS/.test(X),Yt=Ar&&(/Mobile\/\w+/.test(X)||navigator.maxTouchPoints>2),Or=/Android/.test(X),qt=Yt||Or||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(X),me=Yt||/Mac/.test(Me),jo=/\bCrOS\b/.test(X),Vo=/win/i.test(Me),et=we&&X.match(/Version\/(\d*\.\d*)/);et&&(et=Number(et[1])),et&&et>=15&&(we=!1,ie=!0);var Pn=me&&(Zo||we&&(et==null||et<12.11)),yi=oe||A&&E>=9;function xt(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var tt=function(e,t){var i=e.className,r=xt(t).exec(i);if(r){var n=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(n?r[1]+n:"")}};function Ue(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function ve(e,t){return Ue(e).appendChild(t)}function k(e,t,i,r){var n=document.createElement(e);if(i&&(n.className=i),r&&(n.style.cssText=r),typeof t=="string")n.appendChild(document.createTextNode(t));else if(t)for(var l=0;l=t)return o+(t-l);o+=a-l,o+=i-o%i,l=a+1}}var _e=function(){this.id=null,this.f=null,this.time=0,this.handler=bi(this.onTimeout,this)};_e.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},_e.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i=t)return r+Math.min(o,t-n);if(n+=l-r,n+=i-n%i,r=l+1,n>=t)return r}}var Fr=[""];function wi(e){for(;Fr.length<=e;)Fr.push(W(Fr)+" ");return Fr[e]}function W(e){return e[e.length-1]}function Pr(e,t){for(var i=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||ea.test(e))}function Er(e,t){return t?t.source.indexOf("\\w")>-1&&Si(e)?!0:t.test(e):Si(e)}function Bn(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ta=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Li(e){return e.charCodeAt(0)>=768&&ta.test(e)}function zn(e,t,i){for(;(i<0?t>0:ti?-1:1;;){if(t==i)return t;var n=(t+i)/2,l=r<0?Math.ceil(n):Math.floor(n);if(l==t)return e(l)?t:i;e(l)?i=l:t=l+r}}function ra(e,t,i,r){if(!e)return r(t,i,"ltr",0);for(var n=!1,l=0;lt||t==i&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,i),o.level==1?"rtl":"ltr",l),n=!0)}n||r(t,i,"ltr")}var Vt=null;function $t(e,t,i){var r;Vt=null;for(var n=0;nt)return n;l.to==t&&(l.from!=l.to&&i=="before"?r=n:Vt=n),l.from==t&&(l.from!=l.to&&i!="before"?r=n:Vt=n)}return r??Vt}var ia=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,l=/[LRr]/,o=/[Lb1n]/,a=/[1n]/;function s(u,f,h){this.level=u,this.from=f,this.to=h}return function(u,f){var h=f=="ltr"?"L":"R";if(u.length==0||f=="ltr"&&!r.test(u))return!1;for(var d=u.length,c=[],p=0;p-1&&(r[t]=n.slice(0,l).concat(n.slice(l+1)))}}}function G(e,t){var i=ki(e,t);if(i.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n0}function St(e){e.prototype.on=function(t,i){T(this,t,i)},e.prototype.off=function(t,i){ge(this,t,i)}}function ae(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Kn(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ti(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function er(e){ae(e),Kn(e)}function Mi(e){return e.target||e.srcElement}function _n(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),me&&e.ctrlKey&&t==1&&(t=3),t}var na=function(){if(A&&E<9)return!1;var e=k("div");return"draggable"in e||"dragDrop"in e}(),Di;function la(e){if(Di==null){var t=k("span","​");ve(e,k("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Di=t.offsetWidth<=1&&t.offsetHeight>2&&!(A&&E<8))}var i=Di?k("span","​"):k("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var Ni;function oa(e){if(Ni!=null)return Ni;var t=ve(e,document.createTextNode("AخA")),i=rt(t,0,1).getBoundingClientRect(),r=rt(t,1,2).getBoundingClientRect();return Ue(e),!i||i.left==i.right?!1:Ni=r.right-i.right<3}var Ai=` b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],r=e.length;t<=r;){var n=e.indexOf(` `,t);n==-1&&(n=e.length);var l=e.slice(t,e.charAt(n-1)=="\r"?n-1:n),o=l.indexOf("\r");o!=-1?(i.push(l.slice(0,o)),t+=o+1):(i.push(l),t=n+1)}return i}:function(e){return e.split(/\r\n?|\n/)},aa=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},sa=function(){var e=k("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Oi=null;function ua(e){if(Oi!=null)return Oi;var t=ve(e,k("span","x")),i=t.getBoundingClientRect(),r=rt(t,0,1).getBoundingClientRect();return Oi=Math.abs(i.left-r.left)>1}var Wi={},Lt={};function fa(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Wi[e]=t}function ha(e,t){Lt[e]=t}function Ir(e){if(typeof e=="string"&&Lt.hasOwnProperty(e))e=Lt[e];else if(e&&typeof e.name=="string"&&Lt.hasOwnProperty(e.name)){var t=Lt[e.name];typeof t=="string"&&(t={name:t}),e=Rn(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Hi(e,t){t=Ir(t);var i=Wi[t.name];if(!i)return Hi(e,"text/plain");var r=i(e,t);if(kt.hasOwnProperty(t.name)){var n=kt[t.name];for(var l in n)n.hasOwnProperty(l)&&(r.hasOwnProperty(l)&&(r["_"+l]=r[l]),r[l]=n[l])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var kt={};function ca(e,t){var i=kt.hasOwnProperty(e)?kt[e]:kt[e]={};lt(t,i)}function ot(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var r in t){var n=t[r];n instanceof Array&&(n=n.concat([])),i[r]=n}return i}function Fi(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}function Xn(e,t,i){return e.startState?e.startState(t,i):!0}var U=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};U.prototype.eol=function(){return this.pos>=this.string.length},U.prototype.sol=function(){return this.pos==this.lineStart},U.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},U.prototype.next=function(){if(this.post},U.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},U.prototype.skipToEnd=function(){this.pos=this.string.length},U.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},U.prototype.backUp=function(e){this.pos-=e},U.prototype.column=function(){return this.lastColumnPos0?null:(l&&t!==!1&&(this.pos+=l[0].length),l)}},U.prototype.current=function(){return this.string.slice(this.start,this.pos)},U.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},U.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},U.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function w(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var r=0;;++r){var n=i.children[r],l=n.chunkSize();if(t=e.first&&ti?g(i,w(e,i).text.length):da(t,w(e,t.line).text.length)}function da(e,t){var i=e.ch;return i==null||i>t?g(e.line,t):i<0?g(e.line,0):e}function qn(e,t){for(var i=[],r=0;rthis.maxLookAhead&&(this.maxLookAhead=e),t},Ae.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Ae.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ae.fromSaved=function(e,t,i){return t instanceof zr?new Ae(e,ot(e.mode,t.state),i,t.lookAhead):new Ae(e,ot(e.mode,t),i)},Ae.prototype.save=function(e){var t=e!==!1?ot(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new zr(t,this.maxLookAhead):t};function Zn(e,t,i,r){var n=[e.state.modeGen],l={};el(e,t.text,e.doc.mode,i,function(u,f){return n.push(u,f)},l,r);for(var o=i.state,a=function(u){i.baseTokens=n;var f=e.state.overlays[u],h=1,d=0;i.state=!0,el(e,t.text,f.mode,i,function(c,p){for(var v=h;dc&&n.splice(h,1,c,n[h+1],y),h+=2,d=Math.min(c,y)}if(p)if(f.opaque)n.splice(v,h-v,c,"overlay "+p),h=v+2;else for(;ve.options.maxHighlightLength&&ot(e.doc.mode,r.state),l=Zn(e,t,r);n&&(r.state=n),t.stateAfter=r.save(!n),t.styles=l.styles,l.classes?t.styleClasses=l.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function rr(e,t,i){var r=e.doc,n=e.display;if(!r.mode.startState)return new Ae(r,!0,t);var l=pa(e,t,i),o=l>r.first&&w(r,l-1).stateAfter,a=o?Ae.fromSaved(r,o,l):new Ae(r,Xn(r.mode),l);return r.iter(l,t,function(s){Bi(e,s.text,a);var u=a.line;s.stateAfter=u==t-1||u%5==0||u>=n.viewFrom&&ut.start)return l}throw new Error("Mode "+e.name+" failed to advance stream.")}var jn=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function Vn(e,t,i,r){var n=e.doc,l=n.mode,o;t=D(n,t);var a=w(n,t.line),s=rr(e,t.line,i),u=new U(a.text,e.options.tabSize,s),f;for(r&&(f=[]);(r||u.pose.options.maxHighlightLength?(a=!1,o&&Bi(e,t,r,f.pos),f.pos=t.length,h=null):h=$n(zi(i,f,r.state,d),l),d){var c=d[0].name;c&&(h="m-"+(h?c+" "+h:c))}if(!a||u!=h){for(;so;--a){if(a<=l.first)return l.first;var s=w(l,a-1),u=s.stateAfter;if(u&&(!i||a+(u instanceof zr?u.lookAhead:0)<=l.modeFrontier))return a;var f=xe(s.text,null,e.options.tabSize);(n==null||r>f)&&(n=a-1,r=f)}return n}function va(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontieri;r--){var n=w(e,r).stateAfter;if(n&&(!(n instanceof zr)||r+n.lookAhead=t:l.to>t);(r||(r=[])).push(new Gr(o,l.from,s?null:l.to))}}return r}function Ca(e,t,i){var r;if(e)for(var n=0;n=t:l.to>t);if(a||l.from==t&&o.type=="bookmark"&&(!i||l.marker.insertLeft)){var s=l.from==null||(o.inclusiveLeft?l.from<=t:l.from0&&a)for(var C=0;C0)){var f=[s,1],h=M(u.from,a.from),d=M(u.to,a.to);(h<0||!o.inclusiveLeft&&!h)&&f.push({from:u.from,to:a.from}),(d>0||!o.inclusiveRight&&!d)&&f.push({from:a.to,to:u.to}),n.splice.apply(n,f),s+=f.length-3}}return n}function il(e){var t=e.markedSpans;if(t){for(var i=0;it)&&(!r||Ui(r,l.marker)<0)&&(r=l.marker)}return r}function al(e,t,i,r,n){var l=w(e,t),o=Pe&&l.markedSpans;if(o)for(var a=0;a=0&&h<=0||f<=0&&h>=0)&&(f<=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?M(u.to,i)>=0:M(u.to,i)>0)||f>=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?M(u.from,r)<=0:M(u.from,r)<0)))return!0}}}function Se(e){for(var t;t=ol(e);)e=t.find(-1,!0).line;return e}function La(e){for(var t;t=_r(e);)e=t.find(1,!0).line;return e}function ka(e){for(var t,i;t=_r(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function Ki(e,t){var i=w(e,t),r=Se(i);return i==r?t:H(r)}function sl(e,t){if(t>e.lastLine())return t;var i=w(e,t),r;if(!Xe(e,i))return t;for(;r=_r(i);)i=r.find(1,!0).line;return H(i)+1}function Xe(e,t){var i=Pe&&t.markedSpans;if(i){for(var r=void 0,n=0;nt.maxLineLength&&(t.maxLineLength=n,t.maxLine=r)})}var Tt=function(e,t,i){this.text=e,nl(this,t),this.height=i?i(this):1};Tt.prototype.lineNo=function(){return H(this)},St(Tt);function Ta(e,t,i,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),il(e),nl(e,i);var n=r?r(e):1;n!=e.height&&Ne(e,n)}function Ma(e){e.parent=null,il(e)}var Da={},Na={};function ul(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Na:Da;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function fl(e,t){var i=Ct("span",null,null,ie?"padding-right: .1px":null),r={pre:Ct("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var n=0;n<=(t.rest?t.rest.length:0);n++){var l=n?t.rest[n-1]:t.line,o=void 0;r.pos=0,r.addToken=Oa,oa(e.display.measure)&&(o=Fe(l,e.doc.direction))&&(r.addToken=Ha(r.addToken,o)),r.map=[];var a=t!=e.display.externalMeasured&&H(l);Fa(l,r,Qn(e,l,a)),l.styleClasses&&(l.styleClasses.bgClass&&(r.bgClass=mi(l.styleClasses.bgClass,r.bgClass||"")),l.styleClasses.textClass&&(r.textClass=mi(l.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(la(e.display.measure))),n==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(ie){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return G(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=mi(r.pre.className,r.textClass||"")),r}function Aa(e){var t=k("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Oa(e,t,i,r,n,l,o){if(t){var a=e.splitSpaces?Wa(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,f;if(!s.test(t))e.col+=t.length,f=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,f),A&&E<9&&(u=!0),e.pos+=t.length;else{f=document.createDocumentFragment();for(var h=0;;){s.lastIndex=h;var d=s.exec(t),c=d?d.index-h:t.length-h;if(c){var p=document.createTextNode(a.slice(h,h+c));A&&E<9?f.appendChild(k("span",[p])):f.appendChild(p),e.map.push(e.pos,e.pos+c,p),e.col+=c,e.pos+=c}if(!d)break;h+=c+1;var v=void 0;if(d[0]==" "){var y=e.cm.options.tabSize,m=y-e.col%y;v=f.appendChild(k("span",wi(m),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text"," "),e.col+=m}else d[0]=="\r"||d[0]==` diff --git a/admin-views/dist/assets/codemirror-DJVdi8fy.js.gz b/admin-views/dist/assets/codemirror-DJVdi8fy.js.gz new file mode 100644 index 00000000..44a28125 Binary files /dev/null and b/admin-views/dist/assets/codemirror-DJVdi8fy.js.gz differ diff --git a/admin-views/dist/assets/cssMode-BXyGtfi-.js.gz b/admin-views/dist/assets/cssMode-BXyGtfi-.js.gz deleted file mode 100644 index a20f40a6..00000000 Binary files a/admin-views/dist/assets/cssMode-BXyGtfi-.js.gz and /dev/null differ diff --git a/admin-views/dist/assets/cssMode-BXyGtfi-.js b/admin-views/dist/assets/cssMode-C9EIlsuu.js similarity index 99% rename from admin-views/dist/assets/cssMode-BXyGtfi-.js rename to admin-views/dist/assets/cssMode-C9EIlsuu.js index 85cb74c3..d52c2b5e 100644 --- a/admin-views/dist/assets/cssMode-BXyGtfi-.js +++ b/admin-views/dist/assets/cssMode-C9EIlsuu.js @@ -1,4 +1,4 @@ -import{e as x,R as Me,l as v,a as T,U as Pe}from"./editor.main-x561mIg5.js";import"./index-B4ouchdD.js";var Fe=2*60*1e3,je=function(){function n(t){var a=this;this._defaults=t,this._worker=null,this._idleCheckInterval=window.setInterval(function(){return a._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return a._stopWorker()})}return n.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},n.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},n.prototype._checkIfIdle=function(){if(this._worker){var t=Date.now()-this._lastUsedTime;t>Fe&&this._stopWorker()}},n.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=x.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client},n.prototype.getLanguageServiceWorker=function(){for(var t=this,a=[],r=0;r0&&(s.arguments=i),s}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.title)&&u.string(e.command)}n.is=a})(P||(P={}));var A;(function(n){function t(i,o){return{range:i,newText:o}}n.replace=t;function a(i,o){return{range:{start:i,end:i},newText:o}}n.insert=a;function r(i){return{range:i,newText:""}}n.del=r;function e(i){var o=i;return u.objectLiteral(o)&&u.string(o.newText)&&m.is(o.range)}n.is=e})(A||(A={}));var R;(function(n){function t(r,e,i){var o={label:r};return e!==void 0&&(o.needsConfirmation=e),i!==void 0&&(o.description=i),o}n.create=t;function a(r){var e=r;return e!==void 0&&u.objectLiteral(e)&&u.string(e.label)&&(u.boolean(e.needsConfirmation)||e.needsConfirmation===void 0)&&(u.string(e.description)||e.description===void 0)}n.is=a})(R||(R={}));var _;(function(n){function t(a){var r=a;return typeof r=="string"}n.is=t})(_||(_={}));var E;(function(n){function t(i,o,s){return{range:i,newText:o,annotationId:s}}n.replace=t;function a(i,o,s){return{range:{start:i,end:i},newText:o,annotationId:s}}n.insert=a;function r(i,o){return{range:i,newText:"",annotationId:o}}n.del=r;function e(i){var o=i;return A.is(o)&&(R.is(o.annotationId)||_.is(o.annotationId))}n.is=e})(E||(E={}));var V;(function(n){function t(r,e){return{textDocument:r,edits:e}}n.create=t;function a(r){var e=r;return u.defined(e)&&O.is(e.textDocument)&&Array.isArray(e.edits)}n.is=a})(V||(V={}));var L;(function(n){function t(r,e,i){var o={kind:"create",uri:r};return e!==void 0&&(e.overwrite!==void 0||e.ignoreIfExists!==void 0)&&(o.options=e),i!==void 0&&(o.annotationId=i),o}n.create=t;function a(r){var e=r;return e&&e.kind==="create"&&u.string(e.uri)&&(e.options===void 0||(e.options.overwrite===void 0||u.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||u.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||_.is(e.annotationId))}n.is=a})(L||(L={}));var S;(function(n){function t(r,e,i,o){var s={kind:"rename",oldUri:r,newUri:e};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}n.create=t;function a(r){var e=r;return e&&e.kind==="rename"&&u.string(e.oldUri)&&u.string(e.newUri)&&(e.options===void 0||(e.options.overwrite===void 0||u.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||u.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||_.is(e.annotationId))}n.is=a})(S||(S={}));var F;(function(n){function t(r,e,i){var o={kind:"delete",uri:r};return e!==void 0&&(e.recursive!==void 0||e.ignoreIfNotExists!==void 0)&&(o.options=e),i!==void 0&&(o.annotationId=i),o}n.create=t;function a(r){var e=r;return e&&e.kind==="delete"&&u.string(e.uri)&&(e.options===void 0||(e.options.recursive===void 0||u.boolean(e.options.recursive))&&(e.options.ignoreIfNotExists===void 0||u.boolean(e.options.ignoreIfNotExists)))&&(e.annotationId===void 0||_.is(e.annotationId))}n.is=a})(F||(F={}));var q;(function(n){function t(a){var r=a;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(e){return u.string(e.kind)?L.is(e)||S.is(e)||F.is(e):V.is(e)}))}n.is=t})(q||(q={}));var W=function(){function n(t,a){this.edits=t,this.changeAnnotations=a}return n.prototype.insert=function(t,a,r){var e,i;if(r===void 0?e=A.insert(t,a):_.is(r)?(i=r,e=E.insert(t,a,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),e=E.insert(t,a,i)),this.edits.push(e),i!==void 0)return i},n.prototype.replace=function(t,a,r){var e,i;if(r===void 0?e=A.replace(t,a):_.is(r)?(i=r,e=E.replace(t,a,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),e=E.replace(t,a,i)),this.edits.push(e),i!==void 0)return i},n.prototype.delete=function(t,a){var r,e;if(a===void 0?r=A.del(t):_.is(a)?(e=a,r=E.del(t,a)):(this.assertChangeAnnotations(this.changeAnnotations),e=this.changeAnnotations.manage(a),r=E.del(t,e)),this.edits.push(r),e!==void 0)return e},n.prototype.add=function(t){this.edits.push(t)},n.prototype.all=function(){return this.edits},n.prototype.clear=function(){this.edits.splice(0,this.edits.length)},n.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},n}(),ae=function(){function n(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}return n.prototype.all=function(){return this._annotations},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),n.prototype.manage=function(t,a){var r;if(_.is(t)?r=t:(r=this.nextId(),a=t),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(a===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=a,this._size++,r},n.prototype.nextId=function(){return this._counter++,this._counter.toString()},n}();(function(){function n(t){var a=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new ae(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(r){if(V.is(r)){var e=new W(r.edits,a._changeAnnotations);a._textEditChanges[r.textDocument.uri]=e}})):t.changes&&Object.keys(t.changes).forEach(function(r){var e=new W(t.changes[r]);a._textEditChanges[r]=e})):this._workspaceEdit={}}return Object.defineProperty(n.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),n.prototype.getTextEditChange=function(t){if(O.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a={uri:t.uri,version:t.version},r=this._textEditChanges[a.uri];if(!r){var e=[],i={textDocument:a,edits:e};this._workspaceEdit.documentChanges.push(i),r=new W(e,this._changeAnnotations),this._textEditChanges[a.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[t];if(!r){var e=[];this._workspaceEdit.changes[t]=e,r=new W(e),this._textEditChanges[t]=r}return r}},n.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ae,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},n.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},n.prototype.createFile=function(t,a,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;R.is(a)||_.is(a)?e=a:r=a;var i,o;if(e===void 0?i=L.create(t,r):(o=_.is(e)?e:this._changeAnnotations.manage(e),i=L.create(t,r,o)),this._workspaceEdit.documentChanges.push(i),o!==void 0)return o},n.prototype.renameFile=function(t,a,r,e){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;R.is(r)||_.is(r)?i=r:e=r;var o,s;if(i===void 0?o=S.create(t,a,e):(s=_.is(i)?i:this._changeAnnotations.manage(i),o=S.create(t,a,e,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s},n.prototype.deleteFile=function(t,a,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;R.is(a)||_.is(a)?e=a:r=a;var i,o;if(e===void 0?i=F.create(t,r):(o=_.is(e)?e:this._changeAnnotations.manage(e),i=F.create(t,r,o)),this._workspaceEdit.documentChanges.push(i),o!==void 0)return o},n})();var oe;(function(n){function t(r){return{uri:r}}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.uri)}n.is=a})(oe||(oe={}));var ue;(function(n){function t(r,e){return{uri:r,version:e}}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.uri)&&u.integer(e.version)}n.is=a})(ue||(ue={}));var O;(function(n){function t(r,e){return{uri:r,version:e}}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.uri)&&(e.version===null||u.integer(e.version))}n.is=a})(O||(O={}));var se;(function(n){function t(r,e,i,o){return{uri:r,languageId:e,version:i,text:o}}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.uri)&&u.string(e.languageId)&&u.integer(e.version)&&u.string(e.text)}n.is=a})(se||(se={}));var j;(function(n){n.PlainText="plaintext",n.Markdown="markdown"})(j||(j={}));(function(n){function t(a){var r=a;return r===n.PlainText||r===n.Markdown}n.is=t})(j||(j={}));var Q;(function(n){function t(a){var r=a;return u.objectLiteral(a)&&j.is(r.kind)&&u.string(r.value)}n.is=t})(Q||(Q={}));var l;(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(l||(l={}));var G;(function(n){n.PlainText=1,n.Snippet=2})(G||(G={}));var ce;(function(n){n.Deprecated=1})(ce||(ce={}));var de;(function(n){function t(r,e,i){return{newText:r,insert:e,replace:i}}n.create=t;function a(r){var e=r;return e&&u.string(e.newText)&&m.is(e.insert)&&m.is(e.replace)}n.is=a})(de||(de={}));var fe;(function(n){n.asIs=1,n.adjustIndentation=2})(fe||(fe={}));var ge;(function(n){function t(a){return{label:a}}n.create=t})(ge||(ge={}));var le;(function(n){function t(a,r){return{items:a||[],isIncomplete:!!r}}n.create=t})(le||(le={}));var z;(function(n){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=t;function a(r){var e=r;return u.string(e)||u.objectLiteral(e)&&u.string(e.language)&&u.string(e.value)}n.is=a})(z||(z={}));var he;(function(n){function t(a){var r=a;return!!r&&u.objectLiteral(r)&&(Q.is(r.contents)||z.is(r.contents)||u.typedArray(r.contents,z.is))&&(a.range===void 0||m.is(a.range))}n.is=t})(he||(he={}));var ve;(function(n){function t(a,r){return r?{label:a,documentation:r}:{label:a}}n.create=t})(ve||(ve={}));var pe;(function(n){function t(a,r){for(var e=[],i=2;i=0;f--){var p=c[f],b=i.offsetAt(p.range.start),d=i.offsetAt(p.range.end);if(d<=g)s=s.substring(0,b)+p.newText+s.substring(d,s.length);else throw new Error("Overlapping edit");g=b}return s}n.applyEdits=r;function e(i,o){if(i.length<=1)return i;var s=i.length/2|0,c=i.slice(0,s),g=i.slice(s);e(c,o),e(g,o);for(var f=0,p=0,b=0;fFe&&this._stopWorker()}},n.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=x.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client},n.prototype.getLanguageServiceWorker=function(){for(var t=this,a=[],r=0;r0&&(s.arguments=i),s}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.title)&&u.string(e.command)}n.is=a})(P||(P={}));var A;(function(n){function t(i,o){return{range:i,newText:o}}n.replace=t;function a(i,o){return{range:{start:i,end:i},newText:o}}n.insert=a;function r(i){return{range:i,newText:""}}n.del=r;function e(i){var o=i;return u.objectLiteral(o)&&u.string(o.newText)&&m.is(o.range)}n.is=e})(A||(A={}));var R;(function(n){function t(r,e,i){var o={label:r};return e!==void 0&&(o.needsConfirmation=e),i!==void 0&&(o.description=i),o}n.create=t;function a(r){var e=r;return e!==void 0&&u.objectLiteral(e)&&u.string(e.label)&&(u.boolean(e.needsConfirmation)||e.needsConfirmation===void 0)&&(u.string(e.description)||e.description===void 0)}n.is=a})(R||(R={}));var _;(function(n){function t(a){var r=a;return typeof r=="string"}n.is=t})(_||(_={}));var E;(function(n){function t(i,o,s){return{range:i,newText:o,annotationId:s}}n.replace=t;function a(i,o,s){return{range:{start:i,end:i},newText:o,annotationId:s}}n.insert=a;function r(i,o){return{range:i,newText:"",annotationId:o}}n.del=r;function e(i){var o=i;return A.is(o)&&(R.is(o.annotationId)||_.is(o.annotationId))}n.is=e})(E||(E={}));var V;(function(n){function t(r,e){return{textDocument:r,edits:e}}n.create=t;function a(r){var e=r;return u.defined(e)&&O.is(e.textDocument)&&Array.isArray(e.edits)}n.is=a})(V||(V={}));var L;(function(n){function t(r,e,i){var o={kind:"create",uri:r};return e!==void 0&&(e.overwrite!==void 0||e.ignoreIfExists!==void 0)&&(o.options=e),i!==void 0&&(o.annotationId=i),o}n.create=t;function a(r){var e=r;return e&&e.kind==="create"&&u.string(e.uri)&&(e.options===void 0||(e.options.overwrite===void 0||u.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||u.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||_.is(e.annotationId))}n.is=a})(L||(L={}));var S;(function(n){function t(r,e,i,o){var s={kind:"rename",oldUri:r,newUri:e};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}n.create=t;function a(r){var e=r;return e&&e.kind==="rename"&&u.string(e.oldUri)&&u.string(e.newUri)&&(e.options===void 0||(e.options.overwrite===void 0||u.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||u.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||_.is(e.annotationId))}n.is=a})(S||(S={}));var F;(function(n){function t(r,e,i){var o={kind:"delete",uri:r};return e!==void 0&&(e.recursive!==void 0||e.ignoreIfNotExists!==void 0)&&(o.options=e),i!==void 0&&(o.annotationId=i),o}n.create=t;function a(r){var e=r;return e&&e.kind==="delete"&&u.string(e.uri)&&(e.options===void 0||(e.options.recursive===void 0||u.boolean(e.options.recursive))&&(e.options.ignoreIfNotExists===void 0||u.boolean(e.options.ignoreIfNotExists)))&&(e.annotationId===void 0||_.is(e.annotationId))}n.is=a})(F||(F={}));var q;(function(n){function t(a){var r=a;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(e){return u.string(e.kind)?L.is(e)||S.is(e)||F.is(e):V.is(e)}))}n.is=t})(q||(q={}));var W=function(){function n(t,a){this.edits=t,this.changeAnnotations=a}return n.prototype.insert=function(t,a,r){var e,i;if(r===void 0?e=A.insert(t,a):_.is(r)?(i=r,e=E.insert(t,a,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),e=E.insert(t,a,i)),this.edits.push(e),i!==void 0)return i},n.prototype.replace=function(t,a,r){var e,i;if(r===void 0?e=A.replace(t,a):_.is(r)?(i=r,e=E.replace(t,a,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),e=E.replace(t,a,i)),this.edits.push(e),i!==void 0)return i},n.prototype.delete=function(t,a){var r,e;if(a===void 0?r=A.del(t):_.is(a)?(e=a,r=E.del(t,a)):(this.assertChangeAnnotations(this.changeAnnotations),e=this.changeAnnotations.manage(a),r=E.del(t,e)),this.edits.push(r),e!==void 0)return e},n.prototype.add=function(t){this.edits.push(t)},n.prototype.all=function(){return this.edits},n.prototype.clear=function(){this.edits.splice(0,this.edits.length)},n.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},n}(),ae=function(){function n(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}return n.prototype.all=function(){return this._annotations},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),n.prototype.manage=function(t,a){var r;if(_.is(t)?r=t:(r=this.nextId(),a=t),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(a===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=a,this._size++,r},n.prototype.nextId=function(){return this._counter++,this._counter.toString()},n}();(function(){function n(t){var a=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new ae(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(r){if(V.is(r)){var e=new W(r.edits,a._changeAnnotations);a._textEditChanges[r.textDocument.uri]=e}})):t.changes&&Object.keys(t.changes).forEach(function(r){var e=new W(t.changes[r]);a._textEditChanges[r]=e})):this._workspaceEdit={}}return Object.defineProperty(n.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),n.prototype.getTextEditChange=function(t){if(O.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a={uri:t.uri,version:t.version},r=this._textEditChanges[a.uri];if(!r){var e=[],i={textDocument:a,edits:e};this._workspaceEdit.documentChanges.push(i),r=new W(e,this._changeAnnotations),this._textEditChanges[a.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[t];if(!r){var e=[];this._workspaceEdit.changes[t]=e,r=new W(e),this._textEditChanges[t]=r}return r}},n.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ae,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},n.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},n.prototype.createFile=function(t,a,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;R.is(a)||_.is(a)?e=a:r=a;var i,o;if(e===void 0?i=L.create(t,r):(o=_.is(e)?e:this._changeAnnotations.manage(e),i=L.create(t,r,o)),this._workspaceEdit.documentChanges.push(i),o!==void 0)return o},n.prototype.renameFile=function(t,a,r,e){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;R.is(r)||_.is(r)?i=r:e=r;var o,s;if(i===void 0?o=S.create(t,a,e):(s=_.is(i)?i:this._changeAnnotations.manage(i),o=S.create(t,a,e,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s},n.prototype.deleteFile=function(t,a,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;R.is(a)||_.is(a)?e=a:r=a;var i,o;if(e===void 0?i=F.create(t,r):(o=_.is(e)?e:this._changeAnnotations.manage(e),i=F.create(t,r,o)),this._workspaceEdit.documentChanges.push(i),o!==void 0)return o},n})();var oe;(function(n){function t(r){return{uri:r}}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.uri)}n.is=a})(oe||(oe={}));var ue;(function(n){function t(r,e){return{uri:r,version:e}}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.uri)&&u.integer(e.version)}n.is=a})(ue||(ue={}));var O;(function(n){function t(r,e){return{uri:r,version:e}}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.uri)&&(e.version===null||u.integer(e.version))}n.is=a})(O||(O={}));var se;(function(n){function t(r,e,i,o){return{uri:r,languageId:e,version:i,text:o}}n.create=t;function a(r){var e=r;return u.defined(e)&&u.string(e.uri)&&u.string(e.languageId)&&u.integer(e.version)&&u.string(e.text)}n.is=a})(se||(se={}));var j;(function(n){n.PlainText="plaintext",n.Markdown="markdown"})(j||(j={}));(function(n){function t(a){var r=a;return r===n.PlainText||r===n.Markdown}n.is=t})(j||(j={}));var Q;(function(n){function t(a){var r=a;return u.objectLiteral(a)&&j.is(r.kind)&&u.string(r.value)}n.is=t})(Q||(Q={}));var l;(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(l||(l={}));var G;(function(n){n.PlainText=1,n.Snippet=2})(G||(G={}));var ce;(function(n){n.Deprecated=1})(ce||(ce={}));var de;(function(n){function t(r,e,i){return{newText:r,insert:e,replace:i}}n.create=t;function a(r){var e=r;return e&&u.string(e.newText)&&m.is(e.insert)&&m.is(e.replace)}n.is=a})(de||(de={}));var fe;(function(n){n.asIs=1,n.adjustIndentation=2})(fe||(fe={}));var ge;(function(n){function t(a){return{label:a}}n.create=t})(ge||(ge={}));var le;(function(n){function t(a,r){return{items:a||[],isIncomplete:!!r}}n.create=t})(le||(le={}));var z;(function(n){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=t;function a(r){var e=r;return u.string(e)||u.objectLiteral(e)&&u.string(e.language)&&u.string(e.value)}n.is=a})(z||(z={}));var he;(function(n){function t(a){var r=a;return!!r&&u.objectLiteral(r)&&(Q.is(r.contents)||z.is(r.contents)||u.typedArray(r.contents,z.is))&&(a.range===void 0||m.is(a.range))}n.is=t})(he||(he={}));var ve;(function(n){function t(a,r){return r?{label:a,documentation:r}:{label:a}}n.create=t})(ve||(ve={}));var pe;(function(n){function t(a,r){for(var e=[],i=2;i=0;f--){var p=c[f],b=i.offsetAt(p.range.start),d=i.offsetAt(p.range.end);if(d<=g)s=s.substring(0,b)+p.newText+s.substring(d,s.length);else throw new Error("Overlapping edit");g=b}return s}n.applyEdits=r;function e(i,o){if(i.length<=1)return i;var s=i.length/2|0,c=i.slice(0,s),g=i.slice(s);e(c,o),e(g,o);for(var f=0,p=0,b=0;f0&&t.push(a.length),this._lineOffsets=t}return this._lineOffsets},n.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var a=this.getLineOffsets(),r=0,e=a.length;if(e===0)return k.create(0,t);for(;rt?e=i:r=i+1}var o=r-1;return k.create(o,t-a[o])},n.prototype.offsetAt=function(t){var a=this.getLineOffsets();if(t.line>=a.length)return this._content.length;if(t.line<0)return 0;var r=a[t.line],e=t.line+1"u"}n.undefined=r;function e(d){return d===!0||d===!1}n.boolean=e;function i(d){return t.call(d)==="[object String]"}n.string=i;function o(d){return t.call(d)==="[object Number]"}n.number=o;function s(d,y,N){return t.call(d)==="[object Number]"&&y<=d&&d<=N}n.numberRange=s;function c(d){return t.call(d)==="[object Number]"&&-2147483648<=d&&d<=2147483647}n.integer=c;function g(d){return t.call(d)==="[object Number]"&&0<=d&&d<=2147483647}n.uinteger=g;function f(d){return t.call(d)==="[object Function]"}n.func=f;function p(d){return d!==null&&typeof d=="object"}n.objectLiteral=p;function b(d,y){return Array.isArray(d)&&d.every(y)}n.typedArray=b})(u||(u={}));var We=function(){function n(t,a,r){var e=this;this._languageId=t,this._worker=a,this._disposables=[],this._listener=Object.create(null);var i=function(s){var c=s.getLanguageId();if(c===e._languageId){var g;e._listener[s.uri.toString()]=s.onDidChangeContent(function(){window.clearTimeout(g),g=window.setTimeout(function(){return e._doValidate(s.uri,c)},500)}),e._doValidate(s.uri,c)}},o=function(s){x.setModelMarkers(s,e._languageId,[]);var c=s.uri.toString(),g=e._listener[c];g&&(g.dispose(),delete e._listener[c])};this._disposables.push(x.onDidCreateModel(i)),this._disposables.push(x.onWillDisposeModel(o)),this._disposables.push(x.onDidChangeModelLanguage(function(s){o(s.model),i(s.model)})),r.onDidChange(function(s){x.getModels().forEach(function(c){c.getLanguageId()===e._languageId&&(o(c),i(c))})}),this._disposables.push({dispose:function(){for(var s in e._listener)e._listener[s].dispose()}}),x.getModels().forEach(i)}return n.prototype.dispose=function(){this._disposables.forEach(function(t){return t&&t.dispose()}),this._disposables=[]},n.prototype._doValidate=function(t,a){this._worker(t).then(function(r){return r.doValidation(t.toString())}).then(function(r){var e=r.map(function(o){return He(t,o)}),i=x.getModel(t);i&&i.getLanguageId()===a&&x.setModelMarkers(i,a,e)}).then(void 0,function(r){console.error(r)})},n}();function Ue(n){switch(n){case I.Error:return T.Error;case I.Warning:return T.Warning;case I.Information:return T.Info;case I.Hint:return T.Hint;default:return T.Info}}function He(n,t){var a=typeof t.code=="number"?String(t.code):t.code;return{severity:Ue(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:a,source:t.source}}function C(n){if(n)return{character:n.column-1,line:n.lineNumber-1}}function Ve(n){if(n)return{start:{line:n.startLineNumber-1,character:n.startColumn-1},end:{line:n.endLineNumber-1,character:n.endColumn-1}}}function w(n){if(n)return new Me(n.start.line+1,n.start.character+1,n.end.line+1,n.end.character+1)}function Oe(n){return typeof n.insert<"u"&&typeof n.replace<"u"}function ze(n){var t=v.CompletionItemKind;switch(n){case l.Text:return t.Text;case l.Method:return t.Method;case l.Function:return t.Function;case l.Constructor:return t.Constructor;case l.Field:return t.Field;case l.Variable:return t.Variable;case l.Class:return t.Class;case l.Interface:return t.Interface;case l.Module:return t.Module;case l.Property:return t.Property;case l.Unit:return t.Unit;case l.Value:return t.Value;case l.Enum:return t.Enum;case l.Keyword:return t.Keyword;case l.Snippet:return t.Snippet;case l.Color:return t.Color;case l.File:return t.File;case l.Reference:return t.Reference}return t.Property}function J(n){if(n)return{range:w(n.range),text:n.newText}}function Xe(n){return n&&n.command==="editor.action.triggerSuggest"?{id:n.command,title:n.title,arguments:n.arguments}:void 0}var $e=function(){function n(t){this._worker=t}return Object.defineProperty(n.prototype,"triggerCharacters",{get:function(){return["/","-",":"]},enumerable:!1,configurable:!0}),n.prototype.provideCompletionItems=function(t,a,r,e){var i=t.uri;return this._worker(i).then(function(o){return o.doComplete(i.toString(),C(a))}).then(function(o){if(o){var s=t.getWordUntilPosition(a),c=new Me(a.lineNumber,s.startColumn,a.lineNumber,s.endColumn),g=o.items.map(function(f){var p={label:f.label,insertText:f.insertText||f.label,sortText:f.sortText,filterText:f.filterText,documentation:f.documentation,detail:f.detail,command:Xe(f.command),range:c,kind:ze(f.kind)};return f.textEdit&&(Oe(f.textEdit)?p.range={insert:w(f.textEdit.insert),replace:w(f.textEdit.replace)}:p.range=w(f.textEdit.range),p.insertText=f.textEdit.newText),f.additionalTextEdits&&(p.additionalTextEdits=f.additionalTextEdits.map(J)),f.insertTextFormat===G.Snippet&&(p.insertTextRules=v.CompletionItemInsertTextRule.InsertAsSnippet),p});return{isIncomplete:o.isIncomplete,suggestions:g}}})},n}();function Be(n){return n&&typeof n=="object"&&typeof n.kind=="string"}function Te(n){return typeof n=="string"?{value:n}:Be(n)?n.kind==="plaintext"?{value:n.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:n.value}:{value:"```"+n.language+` `+n.value+"\n```\n"}}function qe(n){if(n)return Array.isArray(n)?n.map(Te):[Te(n)]}var Qe=function(){function n(t){this._worker=t}return n.prototype.provideHover=function(t,a,r){var e=t.uri;return this._worker(e).then(function(i){return i.doHover(e.toString(),C(a))}).then(function(i){if(i)return{range:w(i.range),contents:qe(i.contents)}})},n}();function Ge(n){switch(n){case M.Read:return v.DocumentHighlightKind.Read;case M.Write:return v.DocumentHighlightKind.Write;case M.Text:return v.DocumentHighlightKind.Text}return v.DocumentHighlightKind.Text}var Je=function(){function n(t){this._worker=t}return n.prototype.provideDocumentHighlights=function(t,a,r){var e=t.uri;return this._worker(e).then(function(i){return i.findDocumentHighlights(e.toString(),C(a))}).then(function(i){if(i)return i.map(function(o){return{range:w(o.range),kind:Ge(o.kind)}})})},n}();function Le(n){return{uri:Pe.parse(n.uri),range:w(n.range)}}var Ye=function(){function n(t){this._worker=t}return n.prototype.provideDefinition=function(t,a,r){var e=t.uri;return this._worker(e).then(function(i){return i.findDefinition(e.toString(),C(a))}).then(function(i){if(i)return[Le(i)]})},n}(),Ze=function(){function n(t){this._worker=t}return n.prototype.provideReferences=function(t,a,r,e){var i=t.uri;return this._worker(i).then(function(o){return o.findReferences(i.toString(),C(a))}).then(function(o){if(o)return o.map(Le)})},n}();function Ke(n){if(!(!n||!n.changes)){var t=[];for(var a in n.changes)for(var r=Pe.parse(a),e=0,i=n.changes[a];eY[R]})}}}return Object.freeze(Object.defineProperty(J,Symbol.toStringTag,{value:"Module"}))}var Tt={exports:{}};const Yt=Rt(Bt);(function(J,rt){(function(Y,R){J.exports=R(Yt)})(self,function($){return(()=>{var Y={"./index.js":(L,K,mt)=>{mt.r(K);var O=mt("echarts/lib/echarts");O.extendSeriesModel({type:"series.wordCloud",visualStyleAccessPath:"textStyle",visualStyleMapper:function(f){return{fill:f.get("color")}},visualDrawType:"fill",optionUpdated:function(){var f=this.option;f.gridSize=Math.max(Math.floor(f.gridSize),4)},getInitialData:function(f,o){var a=O.helper.createDimensions(f.data,{coordDimensions:["value"]}),l=new O.List(a,this);return l.initData(f.data),l},defaultOption:{maskImage:null,shape:"circle",keepAspect:!1,left:"center",top:"center",width:"70%",height:"80%",sizeRange:[12,60],rotationRange:[-90,90],rotationStep:45,gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,textStyle:{fontWeight:"normal"}}}),O.extendChartView({type:"wordCloud",render:function(f,o,a){var l=this.group;l.removeAll();var t=f.getData(),x=f.get("gridSize");f.layoutInstance.ondraw=function(d,r,T,P){var B=t.getItemModel(T),q=B.getModel("textStyle"),b=new O.graphic.Text({style:O.helper.createTextStyle(q),scaleX:1/P.info.mu,scaleY:1/P.info.mu,x:(P.gx+P.info.gw/2)*x,y:(P.gy+P.info.gh/2)*x,rotation:P.rot});b.setStyle({x:P.info.fillTextOffsetX,y:P.info.fillTextOffsetY+r*.5,text:d,verticalAlign:"middle",fill:t.getItemVisual(T,"style").fill,fontSize:r}),l.add(b),t.setItemGraphicEl(T,b),b.ensureState("emphasis").style=O.helper.createTextStyle(B.getModel(["emphasis","textStyle"]),{state:"emphasis"}),b.ensureState("blur").style=O.helper.createTextStyle(B.getModel(["blur","textStyle"]),{state:"blur"}),O.helper.enableHoverEmphasis(b,B.get(["emphasis","focus"]),B.get(["emphasis","blurScope"])),b.stateTransition={duration:f.get("animation")?f.get(["stateAnimation","duration"]):0,easing:f.get(["stateAnimation","easing"])},b.__highDownDispatcher=!0},this._model=f},remove:function(){this.group.removeAll(),this._model.layoutInstance.dispose()},dispose:function(){this._model.layoutInstance.dispose()}});/*! +import{V as Rt,p as Lt}from"./index-5zY5TMAp.js";import{h as Bt}from"./index-C8YrUFHM.js";function Xt(J,rt){for(var $=0;$Y[R]})}}}return Object.freeze(Object.defineProperty(J,Symbol.toStringTag,{value:"Module"}))}var Tt={exports:{}};const Yt=Rt(Bt);(function(J,rt){(function(Y,R){J.exports=R(Yt)})(self,function($){return(()=>{var Y={"./index.js":(L,K,mt)=>{mt.r(K);var O=mt("echarts/lib/echarts");O.extendSeriesModel({type:"series.wordCloud",visualStyleAccessPath:"textStyle",visualStyleMapper:function(f){return{fill:f.get("color")}},visualDrawType:"fill",optionUpdated:function(){var f=this.option;f.gridSize=Math.max(Math.floor(f.gridSize),4)},getInitialData:function(f,o){var a=O.helper.createDimensions(f.data,{coordDimensions:["value"]}),l=new O.List(a,this);return l.initData(f.data),l},defaultOption:{maskImage:null,shape:"circle",keepAspect:!1,left:"center",top:"center",width:"70%",height:"80%",sizeRange:[12,60],rotationRange:[-90,90],rotationStep:45,gridSize:8,drawOutOfBound:!1,shrinkToFit:!1,textStyle:{fontWeight:"normal"}}}),O.extendChartView({type:"wordCloud",render:function(f,o,a){var l=this.group;l.removeAll();var t=f.getData(),x=f.get("gridSize");f.layoutInstance.ondraw=function(d,r,T,P){var B=t.getItemModel(T),q=B.getModel("textStyle"),b=new O.graphic.Text({style:O.helper.createTextStyle(q),scaleX:1/P.info.mu,scaleY:1/P.info.mu,x:(P.gx+P.info.gw/2)*x,y:(P.gy+P.info.gh/2)*x,rotation:P.rot});b.setStyle({x:P.info.fillTextOffsetX,y:P.info.fillTextOffsetY+r*.5,text:d,verticalAlign:"middle",fill:t.getItemVisual(T,"style").fill,fontSize:r}),l.add(b),t.setItemGraphicEl(T,b),b.ensureState("emphasis").style=O.helper.createTextStyle(B.getModel(["emphasis","textStyle"]),{state:"emphasis"}),b.ensureState("blur").style=O.helper.createTextStyle(B.getModel(["blur","textStyle"]),{state:"blur"}),O.helper.enableHoverEmphasis(b,B.get(["emphasis","focus"]),B.get(["emphasis","blurScope"])),b.stateTransition={duration:f.get("animation")?f.get(["stateAnimation","duration"]):0,easing:f.get(["stateAnimation","easing"])},b.__highDownDispatcher=!0},this._model=f},remove:function(){this.group.removeAll(),this._model.layoutInstance.dispose()},dispose:function(){this._model.layoutInstance.dispose()}});/*! * wordcloud2.js * http://timdream.org/wordcloud2.js/ * diff --git a/admin-views/dist/assets/echarts-wordcloud-C7TwGM4W.js.gz b/admin-views/dist/assets/echarts-wordcloud-C7TwGM4W.js.gz new file mode 100644 index 00000000..48e1e8db Binary files /dev/null and b/admin-views/dist/assets/echarts-wordcloud-C7TwGM4W.js.gz differ diff --git a/admin-views/dist/assets/editor.main-x561mIg5.js b/admin-views/dist/assets/editor.main-CrWz42xi.js similarity index 99% rename from admin-views/dist/assets/editor.main-x561mIg5.js rename to admin-views/dist/assets/editor.main-CrWz42xi.js index 6ee590b7..32e50673 100644 --- a/admin-views/dist/assets/editor.main-x561mIg5.js +++ b/admin-views/dist/assets/editor.main-CrWz42xi.js @@ -1,4 +1,4 @@ -import{o as ce}from"./index-B4ouchdD.js";function EB(s,e){let t;return e.length===0?t=s:t=s.replace(/\{(\d+)\}/g,function(i,n){const o=n[0];return typeof e[o]<"u"?e[o]:i}),t}function p(s,e,...t){return EB(e,t)}var Fw;const m_="en";let tb=!1,ib=!1,__=!1,SR=!1,yR=!1,WD=!1,gm,Bw=m_,NB,Na;const Et=typeof self=="object"?self:typeof global=="object"?global:{};let qi;typeof Et.vscode<"u"&&typeof Et.vscode.process<"u"?qi=Et.vscode.process:typeof process<"u"&&(qi=process);const TB=typeof((Fw=qi==null?void 0:qi.versions)===null||Fw===void 0?void 0:Fw.electron)=="string"&&qi.type==="renderer";if(typeof navigator=="object"&&!TB)Na=navigator.userAgent,tb=Na.indexOf("Windows")>=0,ib=Na.indexOf("Macintosh")>=0,WD=(Na.indexOf("Macintosh")>=0||Na.indexOf("iPad")>=0||Na.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,__=Na.indexOf("Linux")>=0,yR=!0,gm=navigator.language,Bw=gm;else if(typeof qi=="object"){tb=qi.platform==="win32",ib=qi.platform==="darwin",__=qi.platform==="linux",__&&qi.env.SNAP&&qi.env.SNAP_REVISION,gm=m_,Bw=m_;const s=qi.env.VSCODE_NLS_CONFIG;if(s)try{const e=JSON.parse(s),t=e.availableLanguages["*"];gm=e.locale,Bw=t||m_,NB=e._translationsConfigFile}catch{}SR=!0}else console.error("Unable to resolve platform.");const Ai=tb,Me=ib,Cn=__,uo=SR,Tu=yR,lr=WD,AB=Na,qS=function(){if(Et.setImmediate)return Et.setImmediate.bind(Et);if(typeof Et.postMessage=="function"&&!Et.importScripts){let t=[];Et.addEventListener("message",n=>{if(n.data&&n.data.vscodeSetImmediateId)for(let o=0,r=t.length;o{const o=++i;t.push({id:o,callback:n}),Et.postMessage({vscodeSetImmediateId:o},"*")}}if(typeof(qi==null?void 0:qi.nextTick)=="function")return qi.nextTick.bind(qi);const e=Promise.resolve();return t=>e.then(t)}(),Ms=ib||WD?2:tb?1:3;let VI=!0,HI=!1;function LR(){if(!HI){HI=!0;const s=new Uint8Array(2);s[0]=1,s[1]=2,VI=new Uint16Array(s.buffer)[0]===513}return VI}const DR="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function RB(s=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of DR)s.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const xR=RB();function nb(s){let e=xR;if(s&&s instanceof RegExp)if(s.global)e=s;else{let t="g";s.ignoreCase&&(t+="i"),s.multiline&&(t+="m"),s.unicode&&(t+="u"),e=new RegExp(s.source,t)}return e.lastIndex=0,e}const MB={maxLen:1e3,windowSize:15,timeBudget:150};function sb(s,e,t,i,n=MB){if(t.length>n.maxLen){let d=s-n.maxLen/2;return d<0?d=0:i+=d,t=t.substring(d,s+n.maxLen/2),sb(s,e,t,i,n)}const o=Date.now(),r=s-1-i;let a=-1,l=null;for(let d=1;!(Date.now()-o>=n.timeBudget);d++){const h=r-n.windowSize*d;e.lastIndex=Math.max(0,h);const c=OB(e,t,r,a);if(!c&&l||(l=c,h<=0))break;a=h}if(l){let d={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,d}return null}function OB(s,e,t,i){let n;for(;n=s.exec(e);){const o=n.index||0;if(o<=t&&s.lastIndex>=t)return n;if(i>0&&o>i)return null}return null}const Ta=8;class kR{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class PB{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class IR{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class pi{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}compute(e,t,i){return i}}class Au{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class _h{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,i){return i}}function pe(s,e){return typeof s>"u"?e:s==="false"?!1:!!s}class ze extends _h{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return pe(e,this.defaultValue)}}function GS(s,e,t,i){if(typeof s>"u")return e;let n=parseInt(s,10);return isNaN(n)?e:(n=Math.max(t,n),n=Math.min(i,n),n|0)}class St extends _h{constructor(e,t,i,n,o,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=o),super(e,t,i,r),this.minimum=n,this.maximum=o}static clampedInt(e,t,i,n){return GS(e,t,i,n)}validate(e){return St.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class er extends _h{constructor(e,t,i,n,o){typeof o<"u"&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}static clamp(e,t,i){return ei?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(er.float(e,this.defaultValue))}}class kn extends _h{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return kn.string(e,this.defaultValue)}}function mn(s,e,t){return typeof s!="string"||t.indexOf(s)===-1?e:s}class ti extends _h{constructor(e,t,i,n,o=void 0){typeof o<"u"&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return mn(e,this.defaultValue,this._allowedValues)}}class sf extends pi{constructor(e,t,i,n,o,r,a=void 0){typeof a<"u"&&(a.type="string",a.enum=o,a.default=n),super(e,t,i,a),this._allowedValues=o,this._convert=r}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function FB(s){switch(s){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class BB extends pi{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[p("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),p("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),p("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:p("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return i===0?e.accessibilitySupport:i}}class WB extends pi{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:p("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:p("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:pe(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:pe(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function VB(s){switch(s){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var wi;(function(s){s[s.Line=1]="Line",s[s.Block=2]="Block",s[s.Underline=3]="Underline",s[s.LineThin=4]="LineThin",s[s.BlockOutline=5]="BlockOutline",s[s.UnderlineThin=6]="UnderlineThin"})(wi||(wi={}));function HB(s){switch(s){case"line":return wi.Line;case"block":return wi.Block;case"underline":return wi.Underline;case"line-thin":return wi.LineThin;case"block-outline":return wi.BlockOutline;case"underline-thin":return wi.UnderlineThin}}class zB extends Au{constructor(){super(126,[65,33])}compute(e,t,i){const n=["monaco-editor"];return t.get(33)&&n.push(t.get(33)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(65)==="default"?n.push("mouse-default"):t.get(65)==="copy"&&n.push("mouse-copy"),t.get(99)&&n.push("showUnused"),t.get(124)&&n.push("showDeprecated"),n.join(" ")}}class UB extends ze{constructor(){super(32,"emptySelectionClipboard",!0,{description:p("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class $B extends pi{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:p("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[p("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),p("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),p("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:p("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[p("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),p("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),p("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:p("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:p("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Me},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:p("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:p("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:pe(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":mn(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":mn(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:pe(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:pe(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:pe(t.loop,this.defaultValue.loop)}}}class zn extends pi{constructor(){super(44,"fontLigatures",zn.OFF,{anyOf:[{type:"boolean",description:p("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:p("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:p("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?zn.OFF:e==="true"?zn.ON:e:e?zn.ON:zn.OFF}}zn.OFF='"liga" off, "calt" off';zn.ON='"liga" on, "calt" on';class jB extends Au{constructor(){super(43)}compute(e,t,i){return e.fontInfo}}class KB extends _h{constructor(){super(45,"fontSize",Hi.fontSize,{type:"number",minimum:6,maximum:100,default:Hi.fontSize,description:p("fontSize","Controls the font size in pixels.")})}validate(e){let t=er.float(e,this.defaultValue);return t===0?Hi.fontSize:er.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class Zo extends pi{constructor(){super(46,"fontWeight",Hi.fontWeight,{anyOf:[{type:"number",minimum:Zo.MINIMUM_VALUE,maximum:Zo.MAXIMUM_VALUE,errorMessage:p("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:Zo.SUGGESTION_VALUES}],default:Hi.fontWeight,description:p("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(St.clampedInt(e,Hi.fontWeight,Zo.MINIMUM_VALUE,Zo.MAXIMUM_VALUE))}}Zo.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];Zo.MINIMUM_VALUE=1;Zo.MAXIMUM_VALUE=1e3;class qB extends pi{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[p("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),p("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),p("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(50,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:p("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:p("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:p("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:p("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:p("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:p("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:p("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:p("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:p("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:p("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:p("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,r;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:mn(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:mn(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:mn(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:mn(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(o=a.multipleImplementations)!==null&&o!==void 0?o:mn(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(r=a.multipleReferences)!==null&&r!==void 0?r:mn(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:kn.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:kn.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:kn.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:kn.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:kn.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class GB extends pi{constructor(){const e={enabled:!0,delay:300,sticky:!0,above:!0};super(52,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:p("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:p("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:p("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:p("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:pe(t.enabled,this.defaultValue.enabled),delay:St.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:pe(t.sticky,this.defaultValue.sticky),above:pe(t.above,this.defaultValue.above)}}}class Nc extends Au{constructor(){super(129,[49,57,37,64,91,59,60,93,116,119,120,121,2])}compute(e,t,i){return Nc.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height),o=Math.floor(e.viewLineCount/n);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:o}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,d=e.typicalHalfwidthCharacterWidth,h=e.scrollBeyondLastLine,c=e.minimap.renderCharacters;let u=o>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const f=e.minimap.maxColumn,g=e.minimap.size,m=e.minimap.side,_=e.verticalScrollbarWidth,C=e.viewLineCount,b=e.remainingWidth,v=e.isViewportWrapping,w=c?2:3;let y=Math.floor(o*n);const k=y/o;let L=!1,D=!1,N=w*u,B=u/o,O=1;if(g==="fill"||g==="fit"){const{typicalViewportLineCount:we,extraLinesBeyondLastLine:Se,desiredRatio:Tt,minimapLineCount:bt}=Nc.computeContainedMinimapLineCount({viewLineCount:C,scrollBeyondLastLine:h,height:n,lineHeight:l,pixelRatio:o});if(C/bt>1)L=!0,D=!0,u=1,N=1,B=u/o;else{let Pt=!1,ht=u+1;if(g==="fit"){const Sn=Math.ceil((C+Se)*N);v&&a&&b<=t.stableFitRemainingWidth?(Pt=!0,ht=t.stableFitMaxMinimapScale):Pt=Sn>y}if(g==="fill"||Pt){L=!0;const Sn=u;N=Math.min(l*o,Math.max(1,Math.floor(1/Tt))),v&&a&&b<=t.stableFitRemainingWidth&&(ht=t.stableFitMaxMinimapScale),u=Math.min(ht,Math.max(1,Math.floor(N/w))),u>Sn&&(O=Math.min(2,u/Sn)),B=u/o/O,y=Math.ceil(Math.max(we,C+Se)*N),v?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const $=Math.floor(f*B),K=Math.min($,Math.max(0,Math.floor((b-_-2)*B/(d+B)))+Ta);let le=Math.floor(o*K);const de=le/o;le=Math.floor(le*O);const _e=c?1:2,De=m==="left"?0:i-K-_;return{renderMinimap:_e,minimapLeft:De,minimapWidth:K,minimapHeightIsEditorHeight:L,minimapIsSampling:D,minimapScale:u,minimapLineHeight:N,minimapCanvasInnerWidth:le,minimapCanvasInnerHeight:y,minimapCanvasOuterWidth:de,minimapCanvasOuterHeight:k}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,o=t.lineHeight|0,r=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,d=t.pixelRatio,h=t.viewLineCount,c=e.get(121),u=c==="inherit"?e.get(120):c,f=u==="inherit"?e.get(116):u,g=e.get(119),m=e.get(2),_=t.isDominatedByLongLines,C=e.get(49),b=e.get(59).renderType!==0,v=e.get(60),w=e.get(93),y=e.get(64),k=e.get(91),L=k.verticalScrollbarSize,D=k.verticalHasArrows,N=k.arrowSize,B=k.horizontalScrollbarSize,O=e.get(57),$=e.get(37);let K;if(typeof O=="string"&&/^\d+(\.\d+)?ch$/.test(O)){const Xs=parseFloat(O.substr(0,O.length-2));K=St.clampedInt(Xs*a,0,0,1e3)}else K=St.clampedInt(O,0,0,1e3);$&&(K+=16);let le=0;if(b){const Xs=Math.max(r,v);le=Math.round(Xs*l)}let de=0;C&&(de=o);let _e=0,De=_e+de,we=De+le,Se=we+K;const Tt=i-de-le-K;let bt=!1,xt=!1,Pt=-1;m!==2&&(u==="inherit"&&_?(bt=!0,xt=!0):f==="on"||f==="bounded"?xt=!0:f==="wordWrapColumn"&&(Pt=g));const ht=Nc._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:a,pixelRatio:d,scrollBeyondLastLine:w,minimap:y,verticalScrollbarWidth:L,viewLineCount:h,remainingWidth:Tt,isViewportWrapping:xt},t.memory||new IR);ht.renderMinimap!==0&&ht.minimapLeft===0&&(_e+=ht.minimapWidth,De+=ht.minimapWidth,we+=ht.minimapWidth,Se+=ht.minimapWidth);const Sn=Tt-ht.minimapWidth,No=Math.max(1,Math.floor((Sn-L-2)/a)),xr=D?N:0;return xt&&(Pt=Math.max(1,No),f==="bounded"&&(Pt=Math.min(Pt,g))),{width:i,height:n,glyphMarginLeft:_e,glyphMarginWidth:de,lineNumbersLeft:De,lineNumbersWidth:le,decorationsLeft:we,decorationsWidth:K,contentLeft:Se,contentWidth:Sn,minimap:ht,viewportColumn:No,isWordWrapMinified:bt,isViewportWrapping:xt,wrappingColumn:Pt,verticalScrollbarWidth:L,horizontalScrollbarHeight:B,overviewRuler:{top:xr,width:L,height:n-2*xr,right:0}}}}class ZB extends pi{constructor(){const e={enabled:!0};super(56,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:p("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:pe(e.enabled,this.defaultValue.enabled)}}}class YB extends pi{constructor(){const e={enabled:!0,fontSize:0,fontFamily:""};super(125,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:p("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:p("inlayHints.fontSize","Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:p("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:pe(t.enabled,this.defaultValue.enabled),fontSize:St.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:kn.string(t.fontFamily,this.defaultValue.fontFamily)}}}class XB extends er{constructor(){super(58,"lineHeight",Hi.lineHeight,e=>er.clamp(e,0,150),{markdownDescription:p("lineHeight",`Controls the line height. +import{o as ce}from"./index-5zY5TMAp.js";function EB(s,e){let t;return e.length===0?t=s:t=s.replace(/\{(\d+)\}/g,function(i,n){const o=n[0];return typeof e[o]<"u"?e[o]:i}),t}function p(s,e,...t){return EB(e,t)}var Fw;const m_="en";let tb=!1,ib=!1,__=!1,SR=!1,yR=!1,WD=!1,gm,Bw=m_,NB,Na;const Et=typeof self=="object"?self:typeof global=="object"?global:{};let qi;typeof Et.vscode<"u"&&typeof Et.vscode.process<"u"?qi=Et.vscode.process:typeof process<"u"&&(qi=process);const TB=typeof((Fw=qi==null?void 0:qi.versions)===null||Fw===void 0?void 0:Fw.electron)=="string"&&qi.type==="renderer";if(typeof navigator=="object"&&!TB)Na=navigator.userAgent,tb=Na.indexOf("Windows")>=0,ib=Na.indexOf("Macintosh")>=0,WD=(Na.indexOf("Macintosh")>=0||Na.indexOf("iPad")>=0||Na.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,__=Na.indexOf("Linux")>=0,yR=!0,gm=navigator.language,Bw=gm;else if(typeof qi=="object"){tb=qi.platform==="win32",ib=qi.platform==="darwin",__=qi.platform==="linux",__&&qi.env.SNAP&&qi.env.SNAP_REVISION,gm=m_,Bw=m_;const s=qi.env.VSCODE_NLS_CONFIG;if(s)try{const e=JSON.parse(s),t=e.availableLanguages["*"];gm=e.locale,Bw=t||m_,NB=e._translationsConfigFile}catch{}SR=!0}else console.error("Unable to resolve platform.");const Ai=tb,Me=ib,Cn=__,uo=SR,Tu=yR,lr=WD,AB=Na,qS=function(){if(Et.setImmediate)return Et.setImmediate.bind(Et);if(typeof Et.postMessage=="function"&&!Et.importScripts){let t=[];Et.addEventListener("message",n=>{if(n.data&&n.data.vscodeSetImmediateId)for(let o=0,r=t.length;o{const o=++i;t.push({id:o,callback:n}),Et.postMessage({vscodeSetImmediateId:o},"*")}}if(typeof(qi==null?void 0:qi.nextTick)=="function")return qi.nextTick.bind(qi);const e=Promise.resolve();return t=>e.then(t)}(),Ms=ib||WD?2:tb?1:3;let VI=!0,HI=!1;function LR(){if(!HI){HI=!0;const s=new Uint8Array(2);s[0]=1,s[1]=2,VI=new Uint16Array(s.buffer)[0]===513}return VI}const DR="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function RB(s=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of DR)s.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const xR=RB();function nb(s){let e=xR;if(s&&s instanceof RegExp)if(s.global)e=s;else{let t="g";s.ignoreCase&&(t+="i"),s.multiline&&(t+="m"),s.unicode&&(t+="u"),e=new RegExp(s.source,t)}return e.lastIndex=0,e}const MB={maxLen:1e3,windowSize:15,timeBudget:150};function sb(s,e,t,i,n=MB){if(t.length>n.maxLen){let d=s-n.maxLen/2;return d<0?d=0:i+=d,t=t.substring(d,s+n.maxLen/2),sb(s,e,t,i,n)}const o=Date.now(),r=s-1-i;let a=-1,l=null;for(let d=1;!(Date.now()-o>=n.timeBudget);d++){const h=r-n.windowSize*d;e.lastIndex=Math.max(0,h);const c=OB(e,t,r,a);if(!c&&l||(l=c,h<=0))break;a=h}if(l){let d={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,d}return null}function OB(s,e,t,i){let n;for(;n=s.exec(e);){const o=n.index||0;if(o<=t&&s.lastIndex>=t)return n;if(i>0&&o>i)return null}return null}const Ta=8;class kR{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class PB{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class IR{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class pi{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}compute(e,t,i){return i}}class Au{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class _h{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,i){return i}}function pe(s,e){return typeof s>"u"?e:s==="false"?!1:!!s}class ze extends _h{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return pe(e,this.defaultValue)}}function GS(s,e,t,i){if(typeof s>"u")return e;let n=parseInt(s,10);return isNaN(n)?e:(n=Math.max(t,n),n=Math.min(i,n),n|0)}class St extends _h{constructor(e,t,i,n,o,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=o),super(e,t,i,r),this.minimum=n,this.maximum=o}static clampedInt(e,t,i,n){return GS(e,t,i,n)}validate(e){return St.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class er extends _h{constructor(e,t,i,n,o){typeof o<"u"&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}static clamp(e,t,i){return ei?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(er.float(e,this.defaultValue))}}class kn extends _h{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return kn.string(e,this.defaultValue)}}function mn(s,e,t){return typeof s!="string"||t.indexOf(s)===-1?e:s}class ti extends _h{constructor(e,t,i,n,o=void 0){typeof o<"u"&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return mn(e,this.defaultValue,this._allowedValues)}}class sf extends pi{constructor(e,t,i,n,o,r,a=void 0){typeof a<"u"&&(a.type="string",a.enum=o,a.default=n),super(e,t,i,a),this._allowedValues=o,this._convert=r}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function FB(s){switch(s){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class BB extends pi{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[p("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),p("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),p("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:p("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return i===0?e.accessibilitySupport:i}}class WB extends pi{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:p("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:p("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:pe(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:pe(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function VB(s){switch(s){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var wi;(function(s){s[s.Line=1]="Line",s[s.Block=2]="Block",s[s.Underline=3]="Underline",s[s.LineThin=4]="LineThin",s[s.BlockOutline=5]="BlockOutline",s[s.UnderlineThin=6]="UnderlineThin"})(wi||(wi={}));function HB(s){switch(s){case"line":return wi.Line;case"block":return wi.Block;case"underline":return wi.Underline;case"line-thin":return wi.LineThin;case"block-outline":return wi.BlockOutline;case"underline-thin":return wi.UnderlineThin}}class zB extends Au{constructor(){super(126,[65,33])}compute(e,t,i){const n=["monaco-editor"];return t.get(33)&&n.push(t.get(33)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(65)==="default"?n.push("mouse-default"):t.get(65)==="copy"&&n.push("mouse-copy"),t.get(99)&&n.push("showUnused"),t.get(124)&&n.push("showDeprecated"),n.join(" ")}}class UB extends ze{constructor(){super(32,"emptySelectionClipboard",!0,{description:p("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class $B extends pi{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:p("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[p("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),p("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),p("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:p("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[p("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),p("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),p("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:p("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:p("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Me},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:p("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:p("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:pe(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":mn(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":mn(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:pe(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:pe(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:pe(t.loop,this.defaultValue.loop)}}}class zn extends pi{constructor(){super(44,"fontLigatures",zn.OFF,{anyOf:[{type:"boolean",description:p("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:p("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:p("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?zn.OFF:e==="true"?zn.ON:e:e?zn.ON:zn.OFF}}zn.OFF='"liga" off, "calt" off';zn.ON='"liga" on, "calt" on';class jB extends Au{constructor(){super(43)}compute(e,t,i){return e.fontInfo}}class KB extends _h{constructor(){super(45,"fontSize",Hi.fontSize,{type:"number",minimum:6,maximum:100,default:Hi.fontSize,description:p("fontSize","Controls the font size in pixels.")})}validate(e){let t=er.float(e,this.defaultValue);return t===0?Hi.fontSize:er.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class Zo extends pi{constructor(){super(46,"fontWeight",Hi.fontWeight,{anyOf:[{type:"number",minimum:Zo.MINIMUM_VALUE,maximum:Zo.MAXIMUM_VALUE,errorMessage:p("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:Zo.SUGGESTION_VALUES}],default:Hi.fontWeight,description:p("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(St.clampedInt(e,Hi.fontWeight,Zo.MINIMUM_VALUE,Zo.MAXIMUM_VALUE))}}Zo.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];Zo.MINIMUM_VALUE=1;Zo.MAXIMUM_VALUE=1e3;class qB extends pi{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[p("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),p("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),p("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(50,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:p("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:p("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:p("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:p("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:p("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:p("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:p("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:p("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:p("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:p("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:p("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,r;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:mn(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:mn(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:mn(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:mn(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(o=a.multipleImplementations)!==null&&o!==void 0?o:mn(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(r=a.multipleReferences)!==null&&r!==void 0?r:mn(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:kn.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:kn.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:kn.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:kn.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:kn.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class GB extends pi{constructor(){const e={enabled:!0,delay:300,sticky:!0,above:!0};super(52,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:p("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:p("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:p("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:p("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:pe(t.enabled,this.defaultValue.enabled),delay:St.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:pe(t.sticky,this.defaultValue.sticky),above:pe(t.above,this.defaultValue.above)}}}class Nc extends Au{constructor(){super(129,[49,57,37,64,91,59,60,93,116,119,120,121,2])}compute(e,t,i){return Nc.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height),o=Math.floor(e.viewLineCount/n);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:o}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,d=e.typicalHalfwidthCharacterWidth,h=e.scrollBeyondLastLine,c=e.minimap.renderCharacters;let u=o>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const f=e.minimap.maxColumn,g=e.minimap.size,m=e.minimap.side,_=e.verticalScrollbarWidth,C=e.viewLineCount,b=e.remainingWidth,v=e.isViewportWrapping,w=c?2:3;let y=Math.floor(o*n);const k=y/o;let L=!1,D=!1,N=w*u,B=u/o,O=1;if(g==="fill"||g==="fit"){const{typicalViewportLineCount:we,extraLinesBeyondLastLine:Se,desiredRatio:Tt,minimapLineCount:bt}=Nc.computeContainedMinimapLineCount({viewLineCount:C,scrollBeyondLastLine:h,height:n,lineHeight:l,pixelRatio:o});if(C/bt>1)L=!0,D=!0,u=1,N=1,B=u/o;else{let Pt=!1,ht=u+1;if(g==="fit"){const Sn=Math.ceil((C+Se)*N);v&&a&&b<=t.stableFitRemainingWidth?(Pt=!0,ht=t.stableFitMaxMinimapScale):Pt=Sn>y}if(g==="fill"||Pt){L=!0;const Sn=u;N=Math.min(l*o,Math.max(1,Math.floor(1/Tt))),v&&a&&b<=t.stableFitRemainingWidth&&(ht=t.stableFitMaxMinimapScale),u=Math.min(ht,Math.max(1,Math.floor(N/w))),u>Sn&&(O=Math.min(2,u/Sn)),B=u/o/O,y=Math.ceil(Math.max(we,C+Se)*N),v?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const $=Math.floor(f*B),K=Math.min($,Math.max(0,Math.floor((b-_-2)*B/(d+B)))+Ta);let le=Math.floor(o*K);const de=le/o;le=Math.floor(le*O);const _e=c?1:2,De=m==="left"?0:i-K-_;return{renderMinimap:_e,minimapLeft:De,minimapWidth:K,minimapHeightIsEditorHeight:L,minimapIsSampling:D,minimapScale:u,minimapLineHeight:N,minimapCanvasInnerWidth:le,minimapCanvasInnerHeight:y,minimapCanvasOuterWidth:de,minimapCanvasOuterHeight:k}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,o=t.lineHeight|0,r=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,d=t.pixelRatio,h=t.viewLineCount,c=e.get(121),u=c==="inherit"?e.get(120):c,f=u==="inherit"?e.get(116):u,g=e.get(119),m=e.get(2),_=t.isDominatedByLongLines,C=e.get(49),b=e.get(59).renderType!==0,v=e.get(60),w=e.get(93),y=e.get(64),k=e.get(91),L=k.verticalScrollbarSize,D=k.verticalHasArrows,N=k.arrowSize,B=k.horizontalScrollbarSize,O=e.get(57),$=e.get(37);let K;if(typeof O=="string"&&/^\d+(\.\d+)?ch$/.test(O)){const Xs=parseFloat(O.substr(0,O.length-2));K=St.clampedInt(Xs*a,0,0,1e3)}else K=St.clampedInt(O,0,0,1e3);$&&(K+=16);let le=0;if(b){const Xs=Math.max(r,v);le=Math.round(Xs*l)}let de=0;C&&(de=o);let _e=0,De=_e+de,we=De+le,Se=we+K;const Tt=i-de-le-K;let bt=!1,xt=!1,Pt=-1;m!==2&&(u==="inherit"&&_?(bt=!0,xt=!0):f==="on"||f==="bounded"?xt=!0:f==="wordWrapColumn"&&(Pt=g));const ht=Nc._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:a,pixelRatio:d,scrollBeyondLastLine:w,minimap:y,verticalScrollbarWidth:L,viewLineCount:h,remainingWidth:Tt,isViewportWrapping:xt},t.memory||new IR);ht.renderMinimap!==0&&ht.minimapLeft===0&&(_e+=ht.minimapWidth,De+=ht.minimapWidth,we+=ht.minimapWidth,Se+=ht.minimapWidth);const Sn=Tt-ht.minimapWidth,No=Math.max(1,Math.floor((Sn-L-2)/a)),xr=D?N:0;return xt&&(Pt=Math.max(1,No),f==="bounded"&&(Pt=Math.min(Pt,g))),{width:i,height:n,glyphMarginLeft:_e,glyphMarginWidth:de,lineNumbersLeft:De,lineNumbersWidth:le,decorationsLeft:we,decorationsWidth:K,contentLeft:Se,contentWidth:Sn,minimap:ht,viewportColumn:No,isWordWrapMinified:bt,isViewportWrapping:xt,wrappingColumn:Pt,verticalScrollbarWidth:L,horizontalScrollbarHeight:B,overviewRuler:{top:xr,width:L,height:n-2*xr,right:0}}}}class ZB extends pi{constructor(){const e={enabled:!0};super(56,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:p("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:pe(e.enabled,this.defaultValue.enabled)}}}class YB extends pi{constructor(){const e={enabled:!0,fontSize:0,fontFamily:""};super(125,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:p("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:p("inlayHints.fontSize","Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:p("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:pe(t.enabled,this.defaultValue.enabled),fontSize:St.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:kn.string(t.fontFamily,this.defaultValue.fontFamily)}}}class XB extends er{constructor(){super(58,"lineHeight",Hi.lineHeight,e=>er.clamp(e,0,150),{markdownDescription:p("lineHeight",`Controls the line height. - Use 0 to automatically compute the line height from the font size. - Values between 0 and 8 will be used as a multiplier with the font size. - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,i){return e.fontInfo.lineHeight}}class QB extends pi{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(64,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:p("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[p("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),p("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),p("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:p("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:p("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:p("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:p("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:p("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:p("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:pe(t.enabled,this.defaultValue.enabled),size:mn(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:mn(t.side,this.defaultValue.side,["right","left"]),showSlider:mn(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:pe(t.renderCharacters,this.defaultValue.renderCharacters),scale:St.clampedInt(t.scale,1,1,3),maxColumn:St.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function JB(s){return s==="ctrlCmd"?Me?"metaKey":"ctrlKey":"altKey"}class e5 extends pi{constructor(){super(74,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:p("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:p("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{top:St.clampedInt(t.top,0,0,1e3),bottom:St.clampedInt(t.bottom,0,0,1e3)}}}class t5 extends pi{constructor(){const e={enabled:!0,cycle:!1};super(75,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:p("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:p("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:pe(t.enabled,this.defaultValue.enabled),cycle:pe(t.cycle,this.defaultValue.cycle)}}}class i5 extends Au{constructor(){super(127)}compute(e,t,i){return e.pixelRatio}}class n5 extends pi{constructor(){const e={other:!0,comments:!1,strings:!1};super(78,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:p("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:p("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:p("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:e,description:p("quickSuggestions","Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=e}validate(e){if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const t=e,i={other:pe(t.other,this.defaultValue.other),comments:pe(t.comments,this.defaultValue.comments),strings:pe(t.strings,this.defaultValue.strings)};return i.other&&i.comments&&i.strings?!0:!i.other&&!i.comments&&!i.strings?!1:i}return this.defaultValue}}class s5 extends pi{constructor(){super(59,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[p("lineNumbers.off","Line numbers are not rendered."),p("lineNumbers.on","Line numbers are rendered as absolute number."),p("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),p("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:p("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,i=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:i}}}function VD(s){const e=s.get(86);return e==="editable"?s.get(80):e!=="on"}class o5 extends pi{constructor(){const e=[],t={type:"number",description:p("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(90,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:p("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:p("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){let t=[];for(let i of e)if(typeof i=="number")t.push({column:St.clampedInt(i,0,0,1e4),color:null});else if(i&&typeof i=="object"){const n=i;t.push({column:St.clampedInt(n.column,0,0,1e4),color:n.color})}return t.sort((i,n)=>i.column-n.column),t}return this.defaultValue}}function zI(s,e){if(typeof s!="string")return e;switch(s){case"hidden":return 2;case"visible":return 3;default:return 1}}let r5=class extends pi{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(91,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),p("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),p("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:p("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[p("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),p("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),p("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:p("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:p("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:p("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:p("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e,i=St.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=St.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:St.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:zI(t.vertical,this.defaultValue.vertical),horizontal:zI(t.horizontal,this.defaultValue.horizontal),useShadows:pe(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:pe(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:pe(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:pe(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:pe(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:St.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:St.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:pe(t.scrollByPage,this.defaultValue.scrollByPage)}}};class a5 extends pi{constructor(){const e={enabled:!0,mode:"subwordSmart"};super(54,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:p("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:pe(t.enabled,this.defaultValue.enabled),mode:mn(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class l5 extends pi{constructor(){const e={enabled:Gi.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,description:p("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:pe(e.enabled,this.defaultValue.enabled)}}}class d5 extends pi{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[p("editor.guides.bracketPairs.true","Enables bracket pair guides."),p("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),p("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:p("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[p("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),p("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),p("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:p("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:p("editor.guides.highlightActiveBracketPair","Controls whether bracket pair guides are enabled or not.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:p("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:e.highlightActiveIndentation,description:p("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{bracketPairs:UI(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:UI(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:pe(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:pe(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:pe(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}function UI(s,e,t){const i=t.indexOf(s);return i===-1?e:t[i]}class h5 extends pi{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(105,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[p("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),p("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:p("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:p("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:p("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:p("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:p("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:p("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:p("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:p("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:p("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:p("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:p("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:p("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertMode:mn(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:pe(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:pe(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:pe(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:pe(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:pe(t.showIcons,this.defaultValue.showIcons),showStatusBar:pe(t.showStatusBar,this.defaultValue.showStatusBar),preview:pe(t.preview,this.defaultValue.preview),previewMode:mn(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:pe(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:pe(t.showMethods,this.defaultValue.showMethods),showFunctions:pe(t.showFunctions,this.defaultValue.showFunctions),showConstructors:pe(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:pe(t.showDeprecated,this.defaultValue.showDeprecated),showFields:pe(t.showFields,this.defaultValue.showFields),showVariables:pe(t.showVariables,this.defaultValue.showVariables),showClasses:pe(t.showClasses,this.defaultValue.showClasses),showStructs:pe(t.showStructs,this.defaultValue.showStructs),showInterfaces:pe(t.showInterfaces,this.defaultValue.showInterfaces),showModules:pe(t.showModules,this.defaultValue.showModules),showProperties:pe(t.showProperties,this.defaultValue.showProperties),showEvents:pe(t.showEvents,this.defaultValue.showEvents),showOperators:pe(t.showOperators,this.defaultValue.showOperators),showUnits:pe(t.showUnits,this.defaultValue.showUnits),showValues:pe(t.showValues,this.defaultValue.showValues),showConstants:pe(t.showConstants,this.defaultValue.showConstants),showEnums:pe(t.showEnums,this.defaultValue.showEnums),showEnumMembers:pe(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:pe(t.showKeywords,this.defaultValue.showKeywords),showWords:pe(t.showWords,this.defaultValue.showWords),showColors:pe(t.showColors,this.defaultValue.showColors),showFiles:pe(t.showFiles,this.defaultValue.showFiles),showReferences:pe(t.showReferences,this.defaultValue.showReferences),showFolders:pe(t.showFolders,this.defaultValue.showFolders),showTypeParameters:pe(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:pe(t.showSnippets,this.defaultValue.showSnippets),showUsers:pe(t.showUsers,this.defaultValue.showUsers),showIssues:pe(t.showIssues,this.defaultValue.showIssues)}}}class c5 extends pi{constructor(){super(101,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:p("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:pe(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class u5 extends Au{constructor(){super(128,[80])}compute(e,t,i){return t.get(80)?!0:e.tabFocusMode}}function f5(s){switch(s){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class g5 extends Au{constructor(){super(130,[129])}compute(e,t,i){const n=t.get(129);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}const p5="Consolas, 'Courier New', monospace",m5="Menlo, Monaco, 'Courier New', monospace",_5="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",Hi={fontFamily:Me?m5:Cn?_5:p5,fontWeight:"normal",fontSize:Me?12:14,lineHeight:0,letterSpacing:0},Gi={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}},mc=[];function Q(s){return mc[s.id]=s,s}const Do={acceptSuggestionOnCommitCharacter:Q(new ze(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:p("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:Q(new ti(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",p("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:p("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:Q(new BB),accessibilityPageSize:Q(new St(3,"accessibilityPageSize",10,1,1073741824,{description:p("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:Q(new kn(4,"ariaLabel",p("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:Q(new ti(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),p("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:p("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:Q(new ti(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",p("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:p("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Q(new ti(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",p("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:p("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Q(new ti(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",p("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),p("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:p("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Q(new sf(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],FB,{enumDescriptions:[p("editor.autoIndent.none","The editor will not insert indentation automatically."),p("editor.autoIndent.keep","The editor will keep the current line's indentation."),p("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),p("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),p("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:p("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Q(new ze(10,"automaticLayout",!1)),autoSurround:Q(new ti(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[p("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),p("editor.autoSurround.quotes","Surround with quotes but not brackets."),p("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:p("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:Q(new l5),bracketPairGuides:Q(new d5),stickyTabStops:Q(new ze(103,"stickyTabStops",!1,{description:p("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Q(new ze(14,"codeLens",!0,{description:p("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Q(new kn(15,"codeLensFontFamily","",{description:p("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:Q(new St(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:p("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.")})),colorDecorators:Q(new ze(17,"colorDecorators",!0,{description:p("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:Q(new ze(18,"columnSelection",!1,{description:p("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:Q(new WB),contextmenu:Q(new ze(20,"contextmenu",!0)),copyWithSyntaxHighlighting:Q(new ze(21,"copyWithSyntaxHighlighting",!0,{description:p("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Q(new sf(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],VB,{description:p("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:Q(new ze(23,"cursorSmoothCaretAnimation",!1,{description:p("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Q(new sf(24,"cursorStyle",wi.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],HB,{description:p("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:Q(new St(25,"cursorSurroundingLines",0,0,1073741824,{description:p("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:Q(new ti(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[p("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),p("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:p("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:Q(new St(27,"cursorWidth",0,0,1073741824,{markdownDescription:p("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Q(new ze(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:Q(new ze(29,"disableMonospaceOptimizations",!1)),domReadOnly:Q(new ze(30,"domReadOnly",!1)),dragAndDrop:Q(new ze(31,"dragAndDrop",!0,{description:p("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Q(new UB),extraEditorClassName:Q(new kn(33,"extraEditorClassName","")),fastScrollSensitivity:Q(new er(34,"fastScrollSensitivity",5,s=>s<=0?5:s,{markdownDescription:p("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:Q(new $B),fixedOverflowWidgets:Q(new ze(36,"fixedOverflowWidgets",!1)),folding:Q(new ze(37,"folding",!0,{description:p("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:Q(new ti(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[p("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),p("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:p("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:Q(new ze(39,"foldingHighlight",!0,{description:p("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Q(new ze(40,"foldingImportsByDefault",!1,{description:p("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),unfoldOnClickAfterEndOfLine:Q(new ze(41,"unfoldOnClickAfterEndOfLine",!1,{description:p("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Q(new kn(42,"fontFamily",Hi.fontFamily,{description:p("fontFamily","Controls the font family.")})),fontInfo:Q(new jB),fontLigatures2:Q(new zn),fontSize:Q(new KB),fontWeight:Q(new Zo),formatOnPaste:Q(new ze(47,"formatOnPaste",!1,{description:p("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:Q(new ze(48,"formatOnType",!1,{description:p("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Q(new ze(49,"glyphMargin",!0,{description:p("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Q(new qB),hideCursorInOverviewRuler:Q(new ze(51,"hideCursorInOverviewRuler",!1,{description:p("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:Q(new GB),inDiffEditor:Q(new ze(53,"inDiffEditor",!1)),letterSpacing:Q(new er(55,"letterSpacing",Hi.letterSpacing,s=>er.clamp(s,-5,20),{description:p("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:Q(new ZB),lineDecorationsWidth:Q(new _h(57,"lineDecorationsWidth",10)),lineHeight:Q(new XB),lineNumbers:Q(new s5),lineNumbersMinChars:Q(new St(60,"lineNumbersMinChars",5,1,300)),linkedEditing:Q(new ze(61,"linkedEditing",!1,{description:p("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:Q(new ze(62,"links",!0,{description:p("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Q(new ti(63,"matchBrackets","always",["always","near","never"],{description:p("matchBrackets","Highlight matching brackets.")})),minimap:Q(new QB),mouseStyle:Q(new ti(65,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Q(new er(66,"mouseWheelScrollSensitivity",1,s=>s===0?1:s,{markdownDescription:p("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Q(new ze(67,"mouseWheelZoom",!1,{markdownDescription:p("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Q(new ze(68,"multiCursorMergeOverlapping",!0,{description:p("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Q(new sf(69,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],JB,{markdownEnumDescriptions:[p("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),p("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:p({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:Q(new ti(70,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[p("multiCursorPaste.spread","Each cursor pastes a single line of the text."),p("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:p("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:Q(new ze(71,"occurrencesHighlight",!0,{description:p("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:Q(new ze(72,"overviewRulerBorder",!0,{description:p("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Q(new St(73,"overviewRulerLanes",3,0,3)),padding:Q(new e5),parameterHints:Q(new t5),peekWidgetDefaultFocus:Q(new ti(76,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[p("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),p("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:p("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:Q(new ze(77,"definitionLinkOpensInPeek",!1,{description:p("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Q(new n5),quickSuggestionsDelay:Q(new St(79,"quickSuggestionsDelay",10,0,1073741824,{description:p("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Q(new ze(80,"readOnly",!1)),renameOnType:Q(new ze(81,"renameOnType",!1,{description:p("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:p("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Q(new ze(82,"renderControlCharacters",!0,{description:p("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:Q(new ze(83,"renderFinalNewline",!0,{description:p("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:Q(new ti(84,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",p("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:p("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Q(new ze(85,"renderLineHighlightOnlyWhenFocus",!1,{description:p("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Q(new ti(86,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Q(new ti(87,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",p("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),p("renderWhitespace.selection","Render whitespace characters only on selected text."),p("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:p("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Q(new St(88,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:Q(new ze(89,"roundedSelection",!0,{description:p("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:Q(new o5),scrollbar:Q(new r5),scrollBeyondLastColumn:Q(new St(92,"scrollBeyondLastColumn",5,0,1073741824,{description:p("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Q(new ze(93,"scrollBeyondLastLine",!0,{description:p("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Q(new ze(94,"scrollPredominantAxis",!0,{description:p("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:Q(new ze(95,"selectionClipboard",!0,{description:p("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:Cn})),selectionHighlight:Q(new ze(96,"selectionHighlight",!0,{description:p("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Q(new ze(97,"selectOnLineNumbers",!0)),showFoldingControls:Q(new ti(98,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[p("showFoldingControls.always","Always show the folding controls."),p("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:p("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:Q(new ze(99,"showUnused",!0,{description:p("showUnused","Controls fading out of unused code.")})),showDeprecated:Q(new ze(124,"showDeprecated",!0,{description:p("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:Q(new YB),snippetSuggestions:Q(new ti(100,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[p("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),p("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),p("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),p("snippetSuggestions.none","Do not show snippet suggestions.")],description:p("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Q(new c5),smoothScrolling:Q(new ze(102,"smoothScrolling",!1,{description:p("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Q(new St(104,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Q(new h5),inlineSuggest:Q(new a5),suggestFontSize:Q(new St(106,"suggestFontSize",0,0,1e3,{markdownDescription:p("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:Q(new St(107,"suggestLineHeight",0,0,1e3,{markdownDescription:p("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:Q(new ze(108,"suggestOnTriggerCharacters",!0,{description:p("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Q(new ti(109,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[p("suggestSelection.first","Always select the first suggestion."),p("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),p("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:p("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Q(new ti(110,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[p("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),p("tabCompletion.off","Disable tab completions."),p("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:p("tabCompletion","Enables tab completions.")})),tabIndex:Q(new St(111,"tabIndex",0,-1,1073741824)),unusualLineTerminators:Q(new ti(112,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[p("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),p("unusualLineTerminators.off","Unusual line terminators are ignored."),p("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:p("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:Q(new ze(113,"useShadowDOM",!0)),useTabStops:Q(new ze(114,"useTabStops",!0,{description:p("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:Q(new kn(115,"wordSeparators",DR,{description:p("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Q(new ti(116,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[p("wordWrap.off","Lines will never wrap."),p("wordWrap.on","Lines will wrap at the viewport width."),p({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),p({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:p({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:Q(new kn(117,"wordWrapBreakAfterCharacters"," })]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:Q(new kn(118,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:Q(new St(119,"wordWrapColumn",80,1,1073741824,{markdownDescription:p({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:Q(new ti(120,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Q(new ti(121,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:Q(new sf(122,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],f5,{enumDescriptions:[p("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),p("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),p("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),p("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:p("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:Q(new ti(123,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[p("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),p("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:p("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:Q(new zB),pixelRatio:Q(new i5),tabFocusMode:Q(new u5),layoutInfo:Q(new Nc),wrappingInfo:Q(new g5)};class b5{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?new Error(e.message+` @@ -615,7 +615,7 @@ ${e.toString()}`}}class SC{constructor(e=new qg,t=!1,i){this._activeInstantiatio `),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+=` `,this.value+=t,this.value+="\n```\n",this}}function hg(s){return D2(s)?!s.value:Array.isArray(s)?s.every(hg):!0}function D2(s){return s instanceof ma?!0:s&&typeof s=="object"?typeof s.value=="string"&&(typeof s.isTrusted=="boolean"||s.isTrusted===void 0)&&(typeof s.supportThemeIcons=="boolean"||s.supportThemeIcons===void 0):!1}function kG(s){return s.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}function rS(s){return s&&s.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}function IG(s){const e=[],t=s.split("|").map(n=>n.trim());s=t[0];const i=t[1];if(i){const n=/height=(\d+)/.exec(i),o=/width=(\d+)/.exec(i),r=n?n[1]:"",a=o?o[1]:"",l=isFinite(parseInt(a)),d=isFinite(parseInt(r));l&&e.push(`width="${a}"`),d&&e.push(`height="${r}"`)}return{href:s,dimensions:e}}var vL=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};function EG(s,e){Gs(e)?s.title=e:e!=null&&e.markdownNotSupportedFallback?s.title=e.markdownNotSupportedFallback:s.removeAttribute("title")}class NG{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t){var i;return vL(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(e===void 0||Gs(e)||e instanceof HTMLElement)n=e;else if(!Wf(e.markdown))n=(i=e.markdown)!==null&&i!==void 0?i:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(p("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new ln;const o=this._cancellationTokenSource.token;if(n=yield e.markdown(o),this.isDisposed||o.isCancellationRequested)return}this.show(n,t)})}show(e,t){const i=this._hoverWidget;if(this.hasContent(e)){const n={content:e,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!i};this._hoverWidget=this.hoverDelegate.showHover(n,t)}i==null||i.dispose()}hasContent(e){return e?D2(e)?!!e.value:!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)===null||e===void 0?void 0:e.isDisposed}dispose(){var e,t;(e=this._hoverWidget)===null||e===void 0||e.dispose(),(t=this._cancellationTokenSource)===null||t===void 0||t.dispose(!0),this._cancellationTokenSource=void 0}}function TG(s,e,t){let i,n;const o=(h,c)=>{var u;h&&(n==null||n.dispose(),n=void 0),c&&(i==null||i.dispose(),i=void 0),(u=s.onDidHideHover)===null||u===void 0||u.call(s)},r=(h,c,u)=>new hn(()=>vL(this,void 0,void 0,function*(){(!n||n.isDisposed)&&(n=new NG(s,u||e,h>0),yield n.update(t,c))}),h),a=()=>{if(i)return;const h=new X,c=g=>o(!1,g.fromElement===e);h.add(q(e,ue.MOUSE_LEAVE,c,!0));const u=()=>o(!0,!0);h.add(q(e,ue.MOUSE_DOWN,u,!0));const f={targetElements:[e],dispose:()=>{}};if(s.placement===void 0||s.placement==="mouse"){const g=m=>f.x=m.x+10;h.add(q(e,ue.MOUSE_MOVE,g,!0))}h.add(r(s.delay,!1,f)),i=h},l=q(e,ue.MOUSE_OVER,a,!0);return{show:h=>{o(!1,!0),r(0,h)},hide:()=>{o(!0,!0)},update:h=>vL(this,void 0,void 0,function*(){t=h,yield n==null?void 0:n.update(t)}),dispose:()=>{l.dispose(),o(!0,!0)}}}class aS{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class Xk extends H{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new aS(U(e,Y(".monaco-icon-label")))),this.labelContainer=U(this.domNode.element,Y(".monaco-icon-label-container"));const i=U(this.labelContainer,Y("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new aS(U(this.labelContainer,Y("span.monaco-icon-description-container")))),t!=null&&t.supportHighlights||t!=null&&t.supportIcons?this.nameNode=new MG(i,!!t.supportIcons):this.nameNode=new AG(i),t!=null&&t.supportDescriptionHighlights?this.descriptionNodeFactory=()=>new Cl(U(this.descriptionContainer.element,Y("span.label-description")),!!t.supportIcons):this.descriptionNodeFactory=()=>this._register(new aS(U(this.descriptionContainer.element,Y("span.label-description")))),this.hoverDelegate=t==null?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover(i!=null&&i.descriptionTitle?this.labelContainer:this.element,i==null?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof Cl?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,i==null?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(i==null?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(!this.hoverDelegate)EG(e,t);else{const n=TG(this.hoverDelegate,e,t);n&&this.customHovers.set(e,n)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class AG{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&po(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=U(this.container,Y("a.label-name",{id:t==null?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const o={start:i,end:i+n.length},r=t.map(a=>Bi.intersect(o,a)).filter(a=>!Bi.isEmpty(a)).map(({start:a,end:l})=>({start:a-i,end:l-i}));return i=o.end+e.length,r})}class MG{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&po(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new Cl(U(this.container,Y("a.label-name",{id:t==null?void 0:t.domId})),this.supportIcons)),this.singleLabel.set(e,t==null?void 0:t.matches,void 0,t==null?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(t==null?void 0:t.separator)||"/",n=RG(e,i,t==null?void 0:t.matches);for(let o=0;o{const s=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:s,collatorIsNumeric:s.resolvedOptions().numeric}});function OG(s,e,t=!1){const i=s||"",n=e||"",o=$T.value.collator.compare(i,n);return $T.value.collatorIsNumeric&&o===0&&i!==n?in.length)return 1}return 0}var x2=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},BG=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};const Ho=Y;class WG{constructor(e){this.hidden=!1,this._onChecked=new M,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class Qp{get templateId(){return Qp.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=U(e,Ho(".quick-input-list-entry"));const i=U(t.entry,Ho("label.quick-input-list-label"));t.toDisposeTemplate.push(ii(i,ue.CLICK,d=>{t.checkbox.offsetParent||d.preventDefault()})),t.checkbox=U(i,Ho("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(ii(t.checkbox,ue.CHANGE,d=>{t.element.checked=t.checkbox.checked}));const n=U(i,Ho(".quick-input-list-rows")),o=U(n,Ho(".quick-input-list-row")),r=U(n,Ho(".quick-input-list-row"));t.label=new Xk(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const a=U(o,Ho(".quick-input-list-entry-keybinding"));t.keybinding=new Qk(a,Ms);const l=U(r,Ho(".quick-input-list-label-meta"));return t.detail=new Cl(l,!0),t.separator=U(t.entry,Ho(".quick-input-list-separator")),t.actionBar=new pa(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.toDisposeElement=qe(i.toDisposeElement),i.element=e,i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked(d=>i.checkbox.checked=d));const{labelHighlights:n,descriptionHighlights:o,detailHighlights:r}=e,a=Object.create(null);a.matches=n||[],a.descriptionTitle=e.saneDescription,a.descriptionMatches=o||[],a.extraClasses=e.item.iconClasses,a.italic=e.item.italic,a.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,a),i.keybinding.set(e.item.keybinding),i.detail.set(e.saneDetail,r),e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),i.actionBar.clear();const l=e.item.buttons;l&&l.length?(i.actionBar.push(l.map((d,h)=>{let c=d.iconClass||(d.iconPath?bL(d.iconPath):void 0);d.alwaysVisible&&(c=c?`${c} always-visible`:"always-visible");const u=new Us(`id-${h}`,"",c,!0,()=>BG(this,void 0,void 0,function*(){e.fireButtonTriggered({button:d,item:e.item})}));return u.tooltip=d.tooltip||"",u}),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=qe(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=qe(e.toDisposeElement),e.toDisposeTemplate=qe(e.toDisposeTemplate)}}Qp.ID="listelement";class VG{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return Qp.ID}}var qt;(function(s){s[s.First=1]="First",s[s.Second=2]="Second",s[s.Last=3]="Last",s[s.Next=4]="Next",s[s.Previous=5]="Previous",s[s.NextPage=6]="NextPage",s[s.PreviousPage=7]="PreviousPage"})(qt||(qt={}));class Jk{constructor(e,t,i){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new M,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new M,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new M,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new M,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new M,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new M,this.onKeyDown=this._onKeyDown.event,this._onLeave=new M,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=U(this.parent,Ho(".quick-input-list"));const n=new VG,o=new zG;this.list=i.createList("QuickInput",this.container,n,[new Qp],{identityProvider:{getId:r=>r.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:o}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(r=>{const a=new Ot(r);switch(a.keyCode){case 10:this.toggleCheckbox();break;case 31:(Me?r.metaKey:r.ctrlKey)&&this.list.setFocus(tn(this.list.length));break;case 16:const l=this.list.getFocus();l.length===1&&l[0]===0&&this._onLeave.fire();break;case 18:const d=this.list.getFocus();d.length===1&&d[0]===this.list.length-1&&this._onLeave.fire();break}this._onKeyDown.fire(a)})),this.disposables.push(this.list.onMouseDown(r=>{r.browserEvent.button!==2&&r.browserEvent.preventDefault()})),this.disposables.push(q(this.container,ue.CLICK,r=>{(r.x||r.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(r=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(r=>{typeof r.index=="number"&&(r.browserEvent.preventDefault(),this.list.setSelection([r.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return he.map(this.list.onDidChangeFocus,e=>e.elements.map(t=>t.item))}get onDidChangeSelection(){return he.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(t=>t.item),event:e.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=qe(this.elementDisposables);const t=i=>this.fireButtonTriggered(i);this.inputElements=e,this.elements=e.reduce((i,n,o)=>{var r,a,l;if(n.type!=="separator"){const d=o&&e[o-1],h=n.label&&n.label.replace(/\r?\n/g," "),c=n.meta&&n.meta.replace(/\r?\n/g," "),u=n.description&&n.description.replace(/\r?\n/g," "),f=n.detail&&n.detail.replace(/\r?\n/g," "),g=n.ariaLabel||[h,u,f].map(m=>zW(m)).filter(m=>!!m).join(", ");i.push(new WG({index:o,item:n,saneLabel:h,saneMeta:c,saneAriaLabel:g,saneDescription:u,saneDetail:f,labelHighlights:(r=n.highlights)===null||r===void 0?void 0:r.label,descriptionHighlights:(a=n.highlights)===null||a===void 0?void 0:a.description,detailHighlights:(l=n.highlights)===null||l===void 0?void 0:l.detail,checked:!1,separator:d&&d.type==="separator"?d:void 0,fireButtonTriggered:t}))}return i},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(i=>i.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((i,n,o)=>(i.set(n.item,o),i),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t))),e.length>0){const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const i of this.elements)i.checked=t.has(i.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===qt.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=qt.First),e===qt.Previous&&this.list.getFocus()[0]===0&&(e=qt.Last),e===qt.Second&&this.list.length<2&&(e=qt.First),e){case qt.First:this.list.focusFirst();break;case qt.Second:this.list.focusNth(1);break;case qt.Last:this.list.focusLast();break;case qt.Next:this.list.focusNext();break;case qt.Previous:this.list.focusPrevious();break;case qt.NextPage:this.list.focusNextPage();break;case qt.PreviousPage:this.list.focusPreviousPage();break}const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${Math.floor(e/44)*44}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(i=>{i.labelHighlights=void 0,i.descriptionHighlights=void 0,i.detailHighlights=void 0,i.hidden=!1;const n=i.index&&this.inputElements[i.index-1];i.separator=n&&n.type==="separator"?n:void 0});else{let i;this.elements.forEach(n=>{const o=this.matchOnLabel?qn(Um(e,zm(n.saneLabel))):void 0,r=this.matchOnDescription?qn(Um(e,zm(n.saneDescription||""))):void 0,a=this.matchOnDetail?qn(Um(e,zm(n.saneDetail||""))):void 0,l=this.matchOnMeta?qn(Um(e,zm(n.saneMeta||""))):void 0;if(o||r||a||l?(n.labelHighlights=o,n.descriptionHighlights=r,n.detailHighlights=a,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item.alwaysShow),n.separator=void 0,!this.sortByLabel){const d=n.index&&this.inputElements[n.index-1];i=d&&d.type==="separator"?d:i,i&&!n.hidden&&(n.separator=i,i=void 0)}})}const t=this.elements.filter(i=>!i.hidden);if(this.sortByLabel&&e){const i=e.toLowerCase();t.sort((n,o)=>HG(n,o,i))}return this.elementsToIndexes=t.reduce((i,n,o)=>(i.set(n.item,o),i),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=qe(this.elementDisposables),this.disposables=qe(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}x2([si],Jk.prototype,"onDidChangeFocus",null);x2([si],Jk.prototype,"onDidChangeSelection",null);function HG(s,e,t){const i=s.labelHighlights||[],n=e.labelHighlights||[];return i.length&&!n.length?-1:!i.length&&n.length?1:i.length===0&&n.length===0?0:PG(s.saneLabel,e.saneLabel,t)}class zG{getWidgetAriaLabel(){return p("quickInput","Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}var jT=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};const Bn=Y,UG=Zs("quick-input-back",ie.arrowLeft),wL={iconClass:UG.classNames,tooltip:p("quickInput.back","Back"),handle:-1};class qv extends H{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=qv.noPromptMessage,this._severity=Wt.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new M),this.onDidHideEmitter=this._register(new M),this.onDisposeEmitter=this._register(new M),this.visibleDisposables=this._register(new X),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!lr;this._ignoreFocusOut=e&&!lr,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=rp.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText=" ");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new hn,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const n=this.buttons.filter(r=>r===wL);this.ui.leftActionBar.push(n.map((r,a)=>{const l=new Us(`id-${a}`,"",r.iconClass||bL(r.iconPath),!0,()=>jT(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(r)}));return l.tooltip=r.tooltip||"",l}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const o=this.buttons.filter(r=>r!==wL);this.ui.rightActionBar.push(o.map((r,a)=>{const l=new Us(`id-${a}`,"",r.iconClass||bL(r.iconPath),!0,()=>jT(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(r)}));return l.tooltip=r.tooltip||"",l}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,al(this.ui.message,...Od(i))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?p("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==Wt.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}qv.noPromptMessage=p("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class ap extends qv{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new M),this.onWillAcceptEmitter=this._register(new M),this.onDidAcceptEmitter=this._register(new M),this.onDidCustomEmitter=this._register(new M),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?eo.NONE:eo.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new M),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new M),this.onDidTriggerItemButtonEmitter=this._register(new M),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e||"",this.update(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?_G:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(qt.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{if(e===this.value)return;this._value=e,this.ui.list.filter(this.filterValue(this.ui.inputBox.value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(qt.Next),this.canSelectMany&&this.ui.list.domFocus(),rt.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(qt.Previous):this.ui.list.focus(qt.Last),this.canSelectMany&&this.ui.list.domFocus(),rt.stop(e,!0);break;case 12:this.ui.list.focus(qt.NextPage),this.canSelectMany&&this.ui.list.domFocus(),rt.stop(e,!0);break;case 11:this.ui.list.focus(qt.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),rt.stop(e,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(qt.First),rt.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(qt.Last),rt.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&zs(e,this._activeItems,(t,i)=>t===i)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&zs(e,this._selectedItems,(i,n)=>i===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&zs(e,this._selectedItems,(t,i)=>t===i)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return q(this.ui.container,ue.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new Ot(e),i=t.keyCode;this._quickNavigate.keybindings.some(r=>{const[a,l]=r.getParts();return l?!1:a.shiftKey&&i===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a.altKey&&i===6||a.ctrlKey&&i===5||a.metaKey&&i===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",t&&!this.description);const i={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!t,progressBar:!t,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");const n=this.ariaLabel||this.placeholder||ap.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==n&&(this.ui.inputBox.ariaLabel=n),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case eo.NONE:this._itemActivation=eo.FIRST;break;case eo.SECOND:this.ui.list.focus(qt.Second),this._itemActivation=eo.FIRST;break;case eo.LAST:this.ui.list.focus(qt.Last),this._itemActivation=eo.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(qt.First)),this.keepScrollPosition&&(this.scrollTop=e)}}ap.DEFAULT_ARIA_LABEL=p("quickInputBox.ariaLabel","Type to narrow down results.");class Gv extends H{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new M),this.onDidCustomEmitter=this._register(new M),this.onDidTriggerButtonEmitter=this._register(new M),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new M),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new M),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=t=>{this.keyMods.ctrlCmd=t.ctrlKey||t.metaKey,this.keyMods.alt=t.altKey};this._register(q(window,ue.KEY_DOWN,e,!0)),this._register(q(window,ue.KEY_UP,e,!0)),this._register(q(window,ue.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=U(this.parentElement,Bn(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=Xn(e),i=U(e,Bn(".quick-input-titlebar")),n=this._register(new pa(i));n.domNode.classList.add("quick-input-left-action-bar");const o=U(i,Bn(".quick-input-title")),r=this._register(new pa(i));r.domNode.classList.add("quick-input-right-action-bar");const a=U(e,Bn(".quick-input-description")),l=U(e,Bn(".quick-input-header")),d=U(l,Bn("input.quick-input-check-all"));d.type="checkbox",this._register(ii(d,ue.CHANGE,B=>{const O=d.checked;L.setAllVisibleChecked(O)})),this._register(q(d,ue.CLICK,B=>{(B.x||B.y)&&f.setFocus()}));const h=U(l,Bn(".quick-input-description")),c=U(l,Bn(".quick-input-and-message")),u=U(c,Bn(".quick-input-filter")),f=this._register(new xG(u));f.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=U(u,Bn(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const m=new _L(g,{countFormat:p({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),_=U(u,Bn(".quick-input-count"));_.setAttribute("aria-live","polite");const C=new _L(_,{countFormat:p({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),b=U(l,Bn(".quick-input-action")),v=new VT(b);v.label=p("ok","OK"),this._register(v.onDidClick(B=>{this.onDidAcceptEmitter.fire()}));const w=U(l,Bn(".quick-input-action")),y=new VT(w);y.label=p("custom","Custom"),this._register(y.onDidClick(B=>{this.onDidCustomEmitter.fire()}));const k=U(c,Bn(`#${this.idPrefix}message.quick-input-message`)),L=this._register(new Jk(e,this.idPrefix+"list",this.options));this._register(L.onChangedAllVisibleChecked(B=>{d.checked=B})),this._register(L.onChangedVisibleCount(B=>{m.setCount(B)})),this._register(L.onChangedCheckedCount(B=>{C.setCount(B)})),this._register(L.onLeave(()=>{setTimeout(()=>{f.setFocus(),this.controller instanceof ap&&this.controller.canSelectMany&&L.clearFocus()},0)})),this._register(L.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const D=new pG(e);D.getContainer().classList.add("quick-input-progress");const N=Zc(e);return this._register(N),this._register(q(e,ue.FOCUS,B=>{this.previousFocusElement=B.relatedTarget instanceof HTMLElement?B.relatedTarget:void 0},!0)),this._register(N.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(rp.Blur),this.previousFocusElement=void 0})),this._register(q(e,ue.FOCUS,B=>{f.setFocus()})),this._register(q(e,ue.KEY_DOWN,B=>{const O=new Ot(B);switch(O.keyCode){case 3:rt.stop(B,!0),this.onDidAcceptEmitter.fire();break;case 9:rt.stop(B,!0),this.hide(rp.Gesture);break;case 2:if(!O.altKey&&!O.ctrlKey&&!O.metaKey){const $=[".action-label.codicon"];e.classList.contains("show-checkboxes")?$.push("input"):$.push("input[type=text]"),this.getUI().list.isDisplayed()&&$.push(".monaco-list");const K=e.querySelectorAll($.join(", "));O.shiftKey&&O.target===K[0]?(rt.stop(B,!0),K[K.length-1].focus()):!O.shiftKey&&O.target===K[K.length-1]&&(rt.stop(B,!0),K[0].focus())}break}})),this.ui={container:e,styleSheet:t,leftActionBar:n,titleBar:i,title:o,description1:a,description2:h,rightActionBar:r,checkAll:d,filterContainer:u,inputBox:f,visibleCountContainer:g,visibleCount:m,countContainer:_,count:C,okContainer:b,ok:v,message:k,customButtonContainer:w,customButton:y,list:L,progressBar:D,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:B=>this.show(B),hide:()=>this.hide(),setVisibilities:B=>this.setVisibilities(B),setComboboxAccessibility:B=>this.setComboboxAccessibility(B),setEnabled:B=>this.setEnabled(B),setContextKey:B=>this.options.setContextKey(B)},this.updateStyles(),this.ui}pick(e,t={},i=Oe.None){return new Promise((n,o)=>{let r=h=>{r=n,t.onKeyMods&&t.onKeyMods(a.keyMods),n(h)};if(i.isCancellationRequested){r(void 0);return}const a=this.createQuickPick();let l;const d=[a,a.onDidAccept(()=>{if(a.canSelectMany)r(a.selectedItems.slice()),a.hide();else{const h=a.activeItems[0];h&&(r(h),a.hide())}}),a.onDidChangeActive(h=>{const c=h[0];c&&t.onDidFocus&&t.onDidFocus(c)}),a.onDidChangeSelection(h=>{if(!a.canSelectMany){const c=h[0];c&&(r(c),a.hide())}}),a.onDidTriggerItemButton(h=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},h),{removeItem:()=>{const c=a.items.indexOf(h.item);if(c!==-1){const u=a.items.slice(),f=u.splice(c,1),g=a.activeItems.filter(_=>_!==f[0]),m=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=u,g&&(a.activeItems=g),a.keepScrollPosition=m}}}))),a.onDidChangeValue(h=>{l&&!h&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),i.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{qe(d),r(void 0)})];a.title=t.title,a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.autoFocusOnList=t.autoFocusOnList===void 0||t.autoFocusOnList,a.quickNavigate=t.quickNavigate,a.contextKey=t.contextKey,a.busy=!0,Promise.all([e,t.activeItem]).then(([h,c])=>{l=c,a.busy=!1,a.items=h,a.canSelectMany&&(a.selectedItems=h.filter(u=>u.type!=="separator"&&u.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,h=>{o(h),a.hide()})})}createQuickPick(){const e=this.getUI();return new ap(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,i&&i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(Wt.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),al(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const n=this.options.backKeybindingLabel();wL.tooltip=n?p("quickInput.backWithKeybinding","Back ({0})",n):p("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const i=this.controller;if(i){const n=!(!((t=this.ui)===null||t===void 0)&&t.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",n||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),i.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(this.dimension.width*.62,Gv.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,contrastBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=i?i.toString():"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const r=[];this.styles.list.pickerGroupBorder&&r.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&r.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(r.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&r.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&r.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&r.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&r.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&r.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),r.push("}"));const a=r.join(` `);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}}Gv.MAX_WIDTH=600;var SL;(function(s){s[s.PRESERVE=0]="PRESERVE",s[s.LAST=1]="LAST"})(SL||(SL={}));const Ah={Quickaccess:"workbench.contributions.quickaccess"};class $G{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,i)=>i.prefix.length-t.prefix.length),Ve(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return wh([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(i=>e.startsWith(i.prefix))||void 0||this.defaultProvider}}Xt.add(Ah.Quickaccess,new $G);const Ml=Je("quickInputService");var jG=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},KT=function(s,e){return function(t,i){e(t,i,s)}};let yL=class extends H{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Xt.as(Ah.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[o,r]=this.getOrInstantiateProvider(e),a=this.visibleQuickAccess,l=a==null?void 0:a.descriptor;if(a&&r&&l===r){e!==r.prefix&&!(i!=null&&i.preserveValue)&&(a.picker.value=e),this.adjustValueSelection(a.picker,r,i);return}if(r&&!(i!=null&&i.preserveValue)){let g;if(a&&l&&l!==r){const m=a.value.substr(l.prefix.length);m&&(g=`${r.prefix}${m}`)}if(!g){const m=o==null?void 0:o.defaultFilterValue;m===SL.LAST?g=this.lastAcceptedPickerValues.get(r):typeof m=="string"&&(g=`${r.prefix}${m}`)}typeof g=="string"&&(e=g)}const d=new X,h=d.add(this.quickInputService.createQuickPick());h.value=e,this.adjustValueSelection(h,r,i),h.placeholder=r==null?void 0:r.placeholder,h.quickNavigate=i==null?void 0:i.quickNavigateConfiguration,h.hideInput=!!h.quickNavigate&&!a,(typeof(i==null?void 0:i.itemActivation)=="number"||i!=null&&i.quickNavigateConfiguration)&&(h.itemActivation=(n=i==null?void 0:i.itemActivation)!==null&&n!==void 0?n:eo.SECOND),h.contextKey=r==null?void 0:r.contextKey,h.filterValue=g=>g.substring(r?r.prefix.length:0),r!=null&&r.placeholder&&(h.ariaLabel=r==null?void 0:r.placeholder);let c,u;t&&(c=new Promise(g=>u=g),d.add(ha(h.onWillAccept)(g=>{g.veto(),h.hide()}))),d.add(this.registerPickerListeners(h,o,r,e));const f=d.add(new ln);if(o&&d.add(o.provide(h,f.token)),ha(h.onDidHide)(()=>{h.selectedItems.length===0&&f.cancel(),d.dispose(),u==null||u(h.selectedItems)}),h.show(),t)return c}adjustValueSelection(e,t,i){var n;let o;i!=null&&i.preserveValue?o=[e.value.length,e.value.length]:o=[(n=t==null?void 0:t.prefix.length)!==null&&n!==void 0?n:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,i,n){const o=new X,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return o.add(Ve(()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),o.add(e.onDidChangeValue(a=>{const[l]=this.getOrInstantiateProvider(a);l!==t?this.show(a,{preserveValue:!0}):r.value=a})),i&&o.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)})),o}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};yL=jG([KT(0,Ml),KT(1,Ge)],yL);var KG=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},_f=function(s,e){return function(t,i){e(t,i,s)}};let LL=class extends C8{constructor(e,t,i,n,o){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=o,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(yL))),this._quickAccess}createController(e=this.layoutService,t){var i,n;const o={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:a=>this.setContextKey(a),returnFocus:()=>e.focus(),createList:(a,l,d,h,c)=>this.instantiationService.createInstance(cL,a,l,d,h,c),styles:this.computeStyles()},r=this._register(new Gv(Object.assign(Object.assign({},o),t)));return r.layout(e.dimension,(n=(i=e.offset)===null||i===void 0?void 0:i.top)!==null&&n!==void 0?n:0),this._register(e.onDidLayout(a=>{var l,d;return r.layout(a,(d=(l=e.offset)===null||l===void 0?void 0:l.top)!==null&&d!==void 0?d:0)})),this._register(r.onShow(()=>this.resetContextKeys())),this._register(r.onHide(()=>this.resetContextKeys())),r}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new re(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},i=Oe.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},io(this.theme,{quickInputBackground:uN,quickInputForeground:f9,quickInputTitleBackground:g9,contrastBorder:Zt,widgetShadow:gl})),inputBox:io(this.theme,{inputForeground:Gx,inputBackground:qx,inputBorder:Zx,inputValidationInfoBackground:Yx,inputValidationInfoForeground:Xx,inputValidationInfoBorder:Qx,inputValidationWarningBackground:RO,inputValidationWarningForeground:MO,inputValidationWarningBorder:OO,inputValidationErrorBackground:PO,inputValidationErrorForeground:FO,inputValidationErrorBorder:BO}),countBadge:io(this.theme,{badgeBackground:Qf,badgeForeground:Jf,badgeBorder:Zt}),button:io(this.theme,{buttonForeground:s9,buttonBackground:ky,buttonHoverBackground:o9,buttonBorder:Zt}),progressBar:io(this.theme,{progressBarBackground:r9}),keybindingLabel:io(this.theme,{keybindingLabelBackground:_9,keybindingLabelForeground:b9,keybindingLabelBorder:C9,keybindingLabelBottomBorder:v9,keybindingLabelShadow:gl}),list:io(this.theme,{listBackground:uN,listInactiveFocusForeground:T_,listInactiveSelectionIconForeground:A_,listInactiveFocusBackground:R_,listFocusOutline:Xi,listInactiveFocusOutline:Xi,pickerGroupBorder:m9,pickerGroupForeground:p9})}}};LL=KG([_f(0,Ge),_f(1,ve),_f(2,Dt),_f(3,Pn),_f(4,Wv)],LL);var k2=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},ad=function(s,e){return function(t,i){e(t,i,s)}};let DL=class extends LL{constructor(e,t,i,n,o,r){super(t,i,n,o,r),this.host=void 0;const a=fu.get(e);this.host={_serviceBrand:void 0,get container(){return a.widget.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}createController(){return super.createController(this.host)}};DL=k2([ad(1,Ge),ad(2,ve),ad(3,Dt),ad(4,Pn),ad(5,Wv)],DL);let xL=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(DL,e);this.mapEditorToService.set(e,t),ha(e.onDidDispose)(()=>{i.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},i=Oe.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}};xL=k2([ad(0,Ge),ad(1,tt)],xL);class fu{constructor(e){this.editor=e,this.widget=new Zv(this.editor)}static get(e){return e.getContribution(fu.ID)}dispose(){this.widget.dispose()}}fu.ID="editor.controller.quickInput";class Zv{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return Zv.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}Zv.ID="editor.contrib.quickInputWidget";nt(fu.ID,fu);var it;(function(s){const e=new qg;class t{constructor(l,d){this._serviceId=l,this._factory=d,this._value=null}get id(){return this._serviceId}get(l){if(!this._value){if(l&&(this._value=l[this._serviceId.toString()]),this._value||(this._value=this._factory(l)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");e.set(this._serviceId,this._value)}return this._value}}s.LazyStaticService=t;let i=[];function n(a,l){let d=new t(a,l);return i.push(d),d}function o(a){let l=new qg;for(const[h,c]of AV())l.set(h,c);for(let h in a)a.hasOwnProperty(h)&&l.set(Je(h),a[h]);i.forEach(h=>l.set(h.id,h.get(a)));let d=new SC(l,!0);return l.set(Ge,d),[l,d]}s.init=o,s.instantiationService=n(Ge,()=>new SC(e,!0));const r=new lO;s.configurationService=n(Ht,()=>r),s.resourceConfigurationService=n(_x,()=>new u8(r)),s.resourcePropertiesService=n(PM,()=>new by(r)),s.contextService=n(nO,()=>new Cv),s.labelService=n(qp,()=>new p8),s.telemetryService=n(Nl,()=>new f8),s.dialogService=n(Kp,()=>new h8),s.notificationService=n(ni,()=>new bv),s.markerService=n(Xp,()=>new rd),s.modeService=n(Qi,a=>new Jg),s.standaloneThemeService=n(Ih,()=>new oK),s.logService=n(Cr,()=>new nH(new iH)),s.undoRedoService=n(Wp,a=>new TC(s.dialogService.get(a),s.notificationService.get(a))),s.languageConfigurationService=n(Pp,a=>new Ib(s.configurationService.get(a),s.modeService.get(a))),s.modelService=n(ri,a=>new bC(s.configurationService.get(a),s.resourcePropertiesService.get(a),s.standaloneThemeService.get(a),s.logService.get(a),s.undoRedoService.get(a),s.modeService.get(a),s.languageConfigurationService.get(a))),s.markerDecorationsService=n(Tx,a=>new pL(s.modelService.get(a),s.markerService.get(a))),s.contextKeyService=n(ve,a=>new Zy(s.configurationService.get(a))),s.codeEditorService=n(tt,a=>new mC(null,s.contextKeyService.get(a),s.standaloneThemeService.get(a))),s.editorProgressService=n(Ca,()=>new _v),s.storageService=n(yr,()=>new nG),s.editorWorkerService=n(Ys,a=>new hy(s.modelService.get(a),s.resourceConfigurationService.get(a),s.logService.get(a)))})(it||(it={}));class qG extends H{constructor(e,t){super();const[i,n]=it.init(t);this._serviceCollection=i,this._instantiationService=n;const o=this.get(Ht),r=this.get(ni),a=this.get(Nl),l=this.get(Dt),d=this.get(Cr),h=this.get(ve);let c=(_,C)=>{let b=null;return t&&(b=t[_.toString()]),b||(b=C()),this._serviceCollection.set(_,b),b};c(Pn,()=>new mL(h,o)),c(Ss,()=>new dL(l));let u=c(Yt,()=>new c8(this._instantiationService)),f=c(Nt,()=>this._register(new aO(h,u,a,r,d,e))),g=c(Wv,()=>new m8(it.codeEditorService.get(tt),e));c(Ml,()=>new xL(n,it.codeEditorService.get(tt)));let m=c(Tl,()=>this._register(new nL(g)));c(Rl,()=>new aG),c(Al,()=>{const _=new iL(a,r,m,f,l);return _.configure({blockMouse:!1}),this._register(_)}),c(Lh,()=>new fL(u)),c(Dx,()=>new g8(it.modelService.get(ri)))}get(e){let t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t}set(e,t){this._serviceCollection.set(e,t)}has(e){return this._serviceCollection.has(e)}}function I2(s,e,t){let i=new qG(s,e),n=null;i.has(Jn)||(n=new _y(it.modelService.get()),i.set(Jn,n)),i.has(Co)||i.set(Co,new Z1(i.get(tt),i.get(Yt)));let o=t(i);return n&&n.setEditor(o),o}function GG(s,e,t){return I2(s,t||{},i=>new $y(s,e,i,i.get(Ge),i.get(tt),i.get(Yt),i.get(ve),i.get(Nt),i.get(Tl),i.get(Ih),i.get(ni),i.get(Ht),i.get(Pn),i.get(ri),i.get(Qi)))}function ZG(s){return it.codeEditorService.get().onCodeEditorAdd(e=>{s(e)})}function YG(s,e,t){return I2(s,t||{},i=>new jy(s,e,i,i.get(Ge),i.get(ve),i.get(Nt),i.get(Tl),i.get(Ys),i.get(tt),i.get(Ih),i.get(ni),i.get(Ht),i.get(Al),i.get(Ca),i.get(Rl)))}function XG(s,e){return new fW(s,e)}function QG(s,e,t){return EP(it.modelService.get(),it.modeService.get(),s,e,t)}function JG(s,e){it.modelService.get().setMode(s,it.modeService.get().create(e))}function eZ(s,e,t){s&&it.markerService.get().changeOne(e,s.uri,t)}function tZ(s){return it.markerService.get().read(s)}function iZ(s){return it.markerService.get().onMarkerChanged(s)}function nZ(s){return it.modelService.get().getModel(s)}function sZ(){return it.modelService.get().getModels()}function oZ(s){return it.modelService.get().onModelAdded(s)}function rZ(s){return it.modelService.get().onModelRemoved(s)}function aZ(s){return it.modelService.get().onModelModeChanged(e=>{s({model:e.model,oldLanguage:e.oldModeId})})}function lZ(s){return lH(it.modelService.get(),s)}function dZ(s,e){const t=it.standaloneThemeService.get();return t.registerEditorContainer(s),Lx.colorizeElement(t,it.modeService.get(),s,e)}function hZ(s,e,t){return it.standaloneThemeService.get().registerEditorContainer(document.body),Lx.colorize(it.modeService.get(),s,e,t)}function cZ(s,e,t=4){return it.standaloneThemeService.get().registerEditorContainer(document.body),Lx.colorizeModelLine(s,e,t)}function uZ(s){let e=Rt.get(s);return e||{getInitialState:()=>Op,tokenize:(t,i,n,o)=>vM(s,t,n,o)}}function fZ(s,e){it.modeService.get().triggerMode(e);let i=uZ(e),n=cr(s),o=[],r=i.getInitialState();for(let a=0,l=n.length;a=100){i=i-100;let n=t.split(".");if(n.unshift(t),i=0&&(i.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")i.bracket=1;else if(t.bracket==="@close")i.bracket=-1;else throw pt(s,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw pt(s,"the next state must be a string value in rule: "+e);{let n=t.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!IH(s,Ba(s,n,"",[],""))))throw pt(s,"the next state '"+t.next+"' is not defined in rule: "+e);i.next=n}}return typeof t.goBack=="number"&&(i.goBack=t.goBack),typeof t.switchTo=="string"&&(i.switchTo=t.switchTo),typeof t.log=="string"&&(i.log=t.log),typeof t.nextEmbedded=="string"&&(i.nextEmbedded=t.nextEmbedded,s.usesEmbedded=!0),i}}else if(Array.isArray(t)){let i=[];for(let n=0,o=t.length;n0&&i[0]==="^",this.name=this.name+": "+i,this.regex=kL(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=IL(e,this.name,t)}}function LZ(s,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");let t={};t.languageId=s,t.includeLF=Xm(e.includeLF,!1),t.noThrow=!1,t.maxStack=100,t.start=typeof e.start=="string"?e.start:null,t.ignoreCase=Xm(e.ignoreCase,!1),t.unicode=Xm(e.unicode,!1),t.tokenPostfix=qT(e.tokenPostfix,"."+t.languageId),t.defaultToken=qT(e.defaultToken,"source"),t.usesEmbedded=!1;let i=e;i.languageId=s,i.includeLF=t.includeLF,i.ignoreCase=t.ignoreCase,i.unicode=t.unicode,i.noThrow=t.noThrow,i.usesEmbedded=t.usesEmbedded,i.stateNames=e.tokenizer,i.defaultToken=t.defaultToken;function n(r,a,l){for(const d of l){let h=d.include;if(h){if(typeof h!="string")throw pt(t,"an 'include' attribute must be a string at: "+r);if(h[0]==="@"&&(h=h.substr(1)),!e.tokenizer[h])throw pt(t,"include target '"+h+"' is not defined at: "+r);n(r+"."+h,a,e.tokenizer[h])}else{const c=new yZ(r);if(Array.isArray(d)&&d.length>=1&&d.length<=3)if(c.setRegex(i,d[0]),d.length>=3)if(typeof d[1]=="string")c.setAction(i,{token:d[1],next:d[2]});else if(typeof d[1]=="object"){const u=d[1];u.next=d[2],c.setAction(i,u)}else throw pt(t,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+r);else c.setAction(i,d[1]);else{if(!d.regex)throw pt(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+r);d.name&&typeof d.name=="string"&&(c.name=d.name),d.matchOnlyAtStart&&(c.matchOnlyAtLineStart=Xm(d.matchOnlyAtLineStart,!1)),c.setRegex(i,d.regex),c.setAction(i,d.action)}a.push(c)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw pt(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(let r in e.tokenizer)if(e.tokenizer.hasOwnProperty(r)){t.start||(t.start=r);const a=e.tokenizer[r];t.tokenizer[r]=new Array,n("tokenizer."+r,t.tokenizer[r],a)}if(t.usesEmbedded=i.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw pt(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let o=[];for(let r of e.brackets){let a=r;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw pt(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` - hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")o.push({token:a.token+t.tokenPostfix,open:Xa(t,a.open),close:Xa(t,a.close)});else throw pt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=o,t.noThrow=!0,t}function DZ(s){Rd.registerLanguage(s)}function xZ(){let s=[];return s=s.concat(Rd.getLanguages()),s}function kZ(s){return it.modeService.get().languageIdCodec.encodeLanguageId(s)}function IZ(s,e){let t=it.modeService.get().onDidEncounterLanguage(i=>{i===s&&(t.dispose(),e())});return t}function EZ(s,e){const t=it.modeService.get().validateLanguageId(s);if(!t)throw new Error(`Cannot set configuration for unknown language ${s}`);return Qe.register(t,e,100)}class NZ{constructor(e,t){this._languageId=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i,n){if(typeof this._actual.tokenize=="function")return lp.adaptTokenize(this._languageId,this._actual,e,i,n);throw new Error("Not supported!")}tokenize2(e,t,i){let n=this._actual.tokenizeEncoded(e,i);return new KC(n.tokens,n.endState)}}class lp{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._modeService=i,this._standaloneThemeService=n}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t,i){let n=[],o=0;for(let r=0,a=e.length;r0&&r[a-1]===f)continue;let g=u.startIndex;h===0?g=0:gTZ(n)?new NZ(t,n):new lp(t,n,it.modeService.get(),it.standaloneThemeService.get());return E2(e)?Rt.registerPromise(s,e.then(n=>i(n))):Rt.register(s,i(e))}function MZ(s,e){const t=i=>TH(it.modeService.get(),it.standaloneThemeService.get(),s,LZ(s,i));return E2(e)?Rt.registerPromise(s,e.then(i=>t(i))):Rt.register(s,t(e))}function OZ(s,e){return vb.register(s,e)}function PZ(s,e){return wb.register(s,e)}function FZ(s,e){return Ld.register(s,e)}function BZ(s,e){return Sg.register(s,{provideHover:(t,i,n)=>{let o=t.getWordAtPosition(i);return Promise.resolve(e.provideHover(t,i,n)).then(r=>{if(r)return!r.range&&o&&(r.range=new S(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),r.range||(r.range=new S(i.lineNumber,i.column,i.lineNumber,i.column)),r})}})}function WZ(s,e){return Vs.register(s,e)}function VZ(s,e){return Qc.register(s,e)}function HZ(s,e){return Sb.register(s,e)}function zZ(s,e){return yg.register(s,e)}function UZ(s,e){return Lb.register(s,e)}function $Z(s,e){return Db.register(s,e)}function jZ(s,e){return Zr.register(s,e)}function KZ(s,e,t){return ar.register(s,{providedCodeActionKinds:t==null?void 0:t.providedCodeActionKinds,provideCodeActions:(i,n,o,r)=>{let a=it.markerService.get().read({resource:i.uri}).filter(l=>S.areIntersectingOrTouching(l,n));return e.provideCodeActions(i,n,{markers:a,only:o.only},r)},resolveCodeAction:e.resolveCodeAction})}function qZ(s,e){return Vf.register(s,e)}function GZ(s,e){return ao.register(s,e)}function ZZ(s,e){return xb.register(s,e)}function YZ(s,e){return Lg.register(s,e)}function XZ(s,e){return ro.register(s,e)}function QZ(s,e){return Jc.register(s,e)}function JZ(s,e){return ey.register(s,e)}function eY(s,e){return yb.register(s,e)}function tY(s,e){return ev.register(s,e)}function iY(s,e){return eu.register(s,e)}function nY(s,e){return tv.register(s,e)}function sY(s,e){return ux.register(s,e)}function oY(s,e){return za.register(s,e)}function rY(){return{register:DZ,getLanguages:xZ,onLanguage:IZ,getEncodedLanguageId:kZ,setLanguageConfiguration:EZ,setColorMap:AZ,setTokensProvider:RZ,setMonarchTokensProvider:MZ,registerReferenceProvider:OZ,registerRenameProvider:PZ,registerCompletionItemProvider:XZ,registerSignatureHelpProvider:FZ,registerHoverProvider:BZ,registerDocumentSymbolProvider:WZ,registerDocumentHighlightProvider:VZ,registerLinkedEditingRangeProvider:HZ,registerDefinitionProvider:zZ,registerImplementationProvider:UZ,registerTypeDefinitionProvider:$Z,registerCodeLensProvider:jZ,registerCodeActionProvider:KZ,registerDocumentFormattingEditProvider:qZ,registerDocumentRangeFormattingEditProvider:GZ,registerOnTypeFormattingEditProvider:ZZ,registerLinkProvider:YZ,registerColorProvider:QZ,registerFoldingRangeProvider:JZ,registerDeclarationProvider:eY,registerSelectionRangeProvider:tY,registerDocumentSemanticTokensProvider:iY,registerDocumentRangeSemanticTokensProvider:nY,registerInlineCompletionsProvider:sY,registerInlayHintsProvider:oY,DocumentHighlightKind:h1,CompletionItemKind:s1,CompletionItemTag:o1,CompletionItemInsertTextRule:n1,SymbolKind:T1,SymbolTag:A1,IndentAction:p1,CompletionTriggerKind:r1,SignatureHelpTriggerKind:N1,InlayHintKind:m1,InlineCompletionTriggerKind:_1,FoldingRangeKind:vo}}class gu{static _handleEolEdits(e,t){let i,n=[];for(let o of t)typeof o.eol=="number"&&(i=o.eol),o.range&&typeof o.text=="string"&&n.push(o);return typeof i=="number"&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const n=gu._handleEolEdits(e,t);n.length===1&&gu._isFullModelReplaceEdit(e,n[0])?e.executeEdits("formatEditsCommand",n.map(o=>Vt.replace(S.lift(o.range),o.text))):e.executeEdits("formatEditsCommand",n.map(o=>Vt.replaceMove(S.lift(o.range),o.text))),i&&e.pushUndoStop()}}class lS{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}var yo=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};function eI(s){if(s=s.filter(n=>n.range),!s.length)return;let{range:e}=s[0];for(let n=1;n0&&S.areIntersectingOrTouching(l[d-1],g)?l[d-1]=S.fromPositions(l[d-1].getStartPosition(),g.getEndPosition()):d=l.push(g);const h=g=>yo(this,void 0,void 0,function*(){return(yield e.provideDocumentRangeFormattingEdits(r,g,r.getFormattingOptions(),a.token))||[]}),c=(g,m)=>{if(!g.length||!m.length)return!1;const _=g.reduce((C,b)=>S.plusRange(C,b.range),g[0].range);if(!m.some(C=>S.intersectRanges(_,C.range)))return!1;for(let C of g)for(let b of m)if(S.intersectRanges(C.range,b.range))return!0;return!1},u=[],f=[];try{for(let g of l){if(a.token.isCancellationRequested)return!0;f.push(yield h(g))}for(let g=0;g({text:_.text,range:S.lift(_.range),forceMoveMarkers:!0})),_=>{for(const{range:C}of _)if(S.areIntersectingOrTouching(C,m))return[new ne(C.startLineNumber,C.startColumn,C.endLineNumber,C.endColumn)];return null})}return!0})}function lY(s,e,t,i,n){return yo(this,void 0,void 0,function*(){const o=s.get(Ge),r=ur(e)?e.getModel():e,a=N2(r),l=yield eh.select(a,r,t);l&&(i.report(l),yield o.invokeFunction(dY,l,e,t,n))})}function dY(s,e,t,i,n){return yo(this,void 0,void 0,function*(){const o=s.get(Ys);let r,a;ur(t)?(r=t.getModel(),a=new Zg(t,5,void 0,n)):(r=t,a=new Sk(t,n));let l;try{const d=yield e.provideDocumentFormattingEdits(r,r.getFormattingOptions(),a.token);if(l=yield o.computeMoreMinimalEdits(r.uri,d),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||l.length===0)return!1;if(ur(t))gu.execute(t,l,i!==2),i!==2&&(eI(l),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1));else{const[{range:d}]=l,h=new ne(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn);r.pushEditOperations([h],l.map(c=>({text:c.text,range:S.lift(c.range),forceMoveMarkers:!0})),c=>{for(const{range:u}of c)if(S.areIntersectingOrTouching(u,h))return[new ne(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn)];return null})}return!0})}function hY(s,e,t,i,n){return yo(this,void 0,void 0,function*(){const o=ao.ordered(e);for(const r of o){let a=yield Promise.resolve(r.provideDocumentRangeFormattingEdits(e,t,i,n)).catch(Di);if(Tn(a))return yield s.computeMoreMinimalEdits(e.uri,a)}})}function cY(s,e,t,i){return yo(this,void 0,void 0,function*(){const n=N2(e);for(const o of n){let r=yield Promise.resolve(o.provideDocumentFormattingEdits(e,t,i)).catch(Di);if(Tn(r))return yield s.computeMoreMinimalEdits(e.uri,r)}})}function A2(s,e,t,i,n){const o=xb.ordered(e);return o.length===0||o[0].autoFormatTriggerCharacters.indexOf(i)<0?Promise.resolve(void 0):Promise.resolve(o[0].provideOnTypeFormattingEdits(e,t,i,n,Oe.None)).catch(Di).then(r=>s.computeMoreMinimalEdits(e.uri,r))}$e.registerCommand("_executeFormatRangeProvider",function(s,...e){return yo(this,void 0,void 0,function*(){const[t,i,n]=e;ut(me.isUri(t)),ut(S.isIRange(i));const o=s.get(Jn),r=s.get(Ys),a=yield o.createModelReference(t);try{return hY(r,a.object.textEditorModel,S.lift(i),n,Oe.None)}finally{a.dispose()}})});$e.registerCommand("_executeFormatDocumentProvider",function(s,...e){return yo(this,void 0,void 0,function*(){const[t,i]=e;ut(me.isUri(t));const n=s.get(Jn),o=s.get(Ys),r=yield n.createModelReference(t);try{return cY(o,r.object.textEditorModel,i,Oe.None)}finally{r.dispose()}})});$e.registerCommand("_executeFormatOnTypeProvider",function(s,...e){return yo(this,void 0,void 0,function*(){const[t,i,n,o]=e;ut(me.isUri(t)),ut(F.isIPosition(i)),ut(typeof n=="string");const r=s.get(Jn),a=s.get(Ys),l=yield r.createModelReference(t);try{return A2(a,l.object.textEditorModel,F.lift(i),n,o)}finally{l.dispose()}})});var dS;Do.wrappingIndent.defaultValue=0;Do.glyphMargin.defaultValue=!1;Do.autoIndent.defaultValue=3;Do.overviewRulerLanes.defaultValue=2;eh.setFormatterSelector((s,e,t)=>Promise.resolve(s[0]));const un=BR();un.editor=bZ();un.languages=rY();const uY=un.CancellationTokenSource,pu=un.Emitter,fY=un.KeyCode,gY=un.KeyMod,pY=un.Position,mY=un.Range,_Y=un.Selection,bY=un.SelectionDirection,CY=un.MarkerSeverity,vY=un.MarkerTag,wY=un.Uri,SY=un.Token,yY=un.editor,on=un.languages;(!((dS=Et.MonacoEnvironment)===null||dS===void 0)&&dS.globalAPI||typeof define=="function"&&define.amd)&&(self.monaco=un);typeof self.require<"u"&&typeof self.require.config=="function"&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});var LY="4.4.4",EL;(function(s){s[s.None=0]="None",s[s.CommonJS=1]="CommonJS",s[s.AMD=2]="AMD",s[s.UMD=3]="UMD",s[s.System=4]="System",s[s.ES2015=5]="ES2015",s[s.ESNext=99]="ESNext"})(EL||(EL={}));var NL;(function(s){s[s.None=0]="None",s[s.Preserve=1]="Preserve",s[s.React=2]="React",s[s.ReactNative=3]="ReactNative",s[s.ReactJSX=4]="ReactJSX",s[s.ReactJSXDev=5]="ReactJSXDev"})(NL||(NL={}));var TL;(function(s){s[s.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",s[s.LineFeed=1]="LineFeed"})(TL||(TL={}));var dp;(function(s){s[s.ES3=0]="ES3",s[s.ES5=1]="ES5",s[s.ES2015=2]="ES2015",s[s.ES2016=3]="ES2016",s[s.ES2017=4]="ES2017",s[s.ES2018=5]="ES2018",s[s.ES2019=6]="ES2019",s[s.ES2020=7]="ES2020",s[s.ESNext=99]="ESNext",s[s.JSON=100]="JSON",s[s.Latest=99]="Latest"})(dp||(dp={}));var AL;(function(s){s[s.Classic=1]="Classic",s[s.NodeJs=2]="NodeJs"})(AL||(AL={}));var R2=function(){function s(e,t,i,n){this._onDidChange=new pu,this._onDidExtraLibsChange=new pu,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this._onDidExtraLibsChangeTimeout=-1}return Object.defineProperty(s.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onDidExtraLibsChange",{get:function(){return this._onDidExtraLibsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"workerOptions",{get:function(){return this._workerOptions},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"inlayHintsOptions",{get:function(){return this._inlayHintsOptions},enumerable:!1,configurable:!0}),s.prototype.getExtraLibs=function(){return this._extraLibs},s.prototype.addExtraLib=function(e,t){var i=this,n;if(typeof t>"u"?n="ts:extralib-"+Math.random().toString(36).substring(2,15):n=t,this._extraLibs[n]&&this._extraLibs[n].content===e)return{dispose:function(){}};var o=1;return this._removedExtraLibs[n]&&(o=this._removedExtraLibs[n]+1),this._extraLibs[n]&&(o=this._extraLibs[n].version+1),this._extraLibs[n]={content:e,version:o},this._fireOnDidExtraLibsChangeSoon(),{dispose:function(){var r=i._extraLibs[n];r&&r.version===o&&(delete i._extraLibs[n],i._removedExtraLibs[n]=o,i._fireOnDidExtraLibsChangeSoon())}}},s.prototype.setExtraLibs=function(e){for(var t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(var i=0,n=e;iimport("./tsMode-DDE-1NRs.js"),__vite__mapDeps([0,1,2]))}on.onLanguage("typescript",function(){return Yv().then(function(s){return s.setupTypeScript(M2)})});on.onLanguage("javascript",function(){return Yv().then(function(s){return s.setupJavaScript(O2)})});var tI=function(){function s(e,t,i){this._onDidChange=new pu,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(s.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"diagnosticsOptions",{get:function(){return this.options},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),s.prototype.setOptions=function(e){this._options=e||Object.create(null),this._onDidChange.fire(this)},s.prototype.setDiagnosticsOptions=function(e){this.setOptions(e)},s.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},s}(),iI={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0}},nI={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},P2=new tI("css",iI,nI),F2=new tI("scss",iI,nI),B2=new tI("less",iI,nI);on.css={cssDefaults:P2,lessDefaults:B2,scssDefaults:F2};function sI(){return ce(()=>import("./cssMode-BXyGtfi-.js"),__vite__mapDeps([3,1,2]))}on.onLanguage("less",function(){sI().then(function(s){return s.setupMode(B2)})});on.onLanguage("scss",function(){sI().then(function(s){return s.setupMode(F2)})});on.onLanguage("css",function(){sI().then(function(s){return s.setupMode(P2)})});var IY=function(){function s(e,t,i){this._onDidChange=new pu,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(s.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),s.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},s.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},s}(),EY={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},NY={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},W2=new IY("json",EY,NY);on.json={jsonDefaults:W2};function TY(){return ce(()=>import("./jsonMode-nuEbFdwa.js"),__vite__mapDeps([4,1,2]))}on.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});on.onLanguage("json",function(){TY().then(function(s){return s.setupMode(W2)})});var AY=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})},RY=function(s,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(d){return function(h){return l([d,h])}}function l(d){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(o=d[0]&2?n.return:d[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,d[1])).done)return o;switch(n=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return t.label++,{value:d[1],done:!1};case 5:t.label++,n=d[1],d=[0];continue;case 7:d=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){t=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]import("./htmlMode-DoczOHPa.js"),__vite__mapDeps([5,1,2]))}function Jv(s,e,t){var i=this;e===void 0&&(e=Xv),t===void 0&&(t=Qv(s));var n=new MY(s,e,t),o,r=on.onLanguage(s,function(){return AY(i,void 0,void 0,function(){return RY(this,function(a){switch(a.label){case 0:return[4,WY()];case 1:return o=a.sent().setupMode(n),[2]}})})});return{defaults:n,dispose:function(){r.dispose(),o==null||o.dispose(),o=void 0}}}var U2={},hS={},VY=function(){function s(e){var t=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(function(i,n){t._lazyLoadPromiseResolve=i,t._lazyLoadPromiseReject=n})}return s.getOrCreate=function(e){return hS[e]||(hS[e]=new s(e)),hS[e]},s.prototype.whenLoaded=function(){return this._lazyLoadPromise},s.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,U2[this._languageId].loader().then(function(t){return e._lazyLoadPromiseResolve(t)},function(t){return e._lazyLoadPromiseReject(t)})),this._lazyLoadPromise},s}();function fe(s){var e=s.id;U2[e]=s,on.register(s);var t=VY.getOrCreate(e);on.setMonarchTokensProvider(e,t.whenLoaded().then(function(i){return i.language})),on.onLanguage(e,function(){t.load().then(function(i){on.setLanguageConfiguration(e,i.conf)})})}fe({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:function(){return ce(()=>import("./abap-CRCWOmpq.js"),__vite__mapDeps([]))}});fe({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:function(){return ce(()=>import("./apex-BL_CmIl-.js"),__vite__mapDeps([]))}});fe({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:function(){return ce(()=>import("./azcli-1IWB1ccx.js"),__vite__mapDeps([]))}});fe({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:function(){return ce(()=>import("./bat-DPkNLes8.js"),__vite__mapDeps([]))}});fe({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:function(){return ce(()=>import("./bicep-DLNwh9K6.js"),__vite__mapDeps([]))}});fe({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:function(){return ce(()=>import("./cameligo-CGrWLZr3.js"),__vite__mapDeps([]))}});fe({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:function(){return ce(()=>import("./clojure-D9WOWImG.js"),__vite__mapDeps([]))}});fe({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:function(){return ce(()=>import("./coffee-B7EJu28W.js"),__vite__mapDeps([]))}});fe({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:function(){return ce(()=>import("./cpp-RmZVvII3.js"),__vite__mapDeps([]))}});fe({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:function(){return ce(()=>import("./cpp-RmZVvII3.js"),__vite__mapDeps([]))}});fe({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:function(){return ce(()=>import("./csharp-BoL64M5l.js"),__vite__mapDeps([]))}});fe({id:"csp",extensions:[],aliases:["CSP","csp"],loader:function(){return ce(()=>import("./csp-C46ZqvIl.js"),__vite__mapDeps([]))}});fe({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:function(){return ce(()=>import("./css-yEtxmcUf.js"),__vite__mapDeps([]))}});fe({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:function(){return ce(()=>import("./dart-D8lhlL1r.js"),__vite__mapDeps([]))}});fe({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:function(){return ce(()=>import("./dockerfile-DLk6rpji.js"),__vite__mapDeps([]))}});fe({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:function(){return ce(()=>import("./ecl-BO6FnfXk.js"),__vite__mapDeps([]))}});fe({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:function(){return ce(()=>import("./elixir-B9GXSzSz.js"),__vite__mapDeps([]))}});fe({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:function(){return ce(()=>import("./flow9-Cac8vKd7.js"),__vite__mapDeps([]))}});fe({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:function(){return ce(()=>import("./fsharp-fd1GTHhf.js"),__vite__mapDeps([]))}});fe({id:"go",extensions:[".go"],aliases:["Go"],loader:function(){return ce(()=>import("./go-O9LJTZXk.js"),__vite__mapDeps([]))}});fe({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:function(){return ce(()=>import("./graphql-LQdxqEYJ.js"),__vite__mapDeps([]))}});fe({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:function(){return ce(()=>import("./handlebars-5MWJYwBX.js"),__vite__mapDeps([6,1,2]))}});fe({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:function(){return ce(()=>import("./hcl-DxDQ3s82.js"),__vite__mapDeps([]))}});fe({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:function(){return ce(()=>import("./html-xJfJX0-n.js"),__vite__mapDeps([7,1,2]))}});fe({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:function(){return ce(()=>import("./ini-BvajGCUy.js"),__vite__mapDeps([]))}});fe({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:function(){return ce(()=>import("./java-SYsfObOQ.js"),__vite__mapDeps([]))}});fe({id:"javascript",extensions:[".js",".es6",".jsx",".mjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:function(){return ce(()=>import("./javascript-5SbqB3Bt.js"),__vite__mapDeps([8,9,1,2]))}});fe({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:function(){return ce(()=>import("./julia-DQXNmw_w.js"),__vite__mapDeps([]))}});fe({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:function(){return ce(()=>import("./kotlin-qQ0MG-9I.js"),__vite__mapDeps([]))}});fe({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:function(){return ce(()=>import("./less-B86-qBTk.js"),__vite__mapDeps([]))}});fe({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:function(){return ce(()=>import("./lexon-Canl7DCW.js"),__vite__mapDeps([]))}});fe({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:function(){return ce(()=>import("./lua-D28Ae8-K.js"),__vite__mapDeps([]))}});fe({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:function(){return ce(()=>import("./liquid-DThbe4kJ.js"),__vite__mapDeps([10,1,2]))}});fe({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:function(){return ce(()=>import("./m3-DPitgjJI.js"),__vite__mapDeps([]))}});fe({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:function(){return ce(()=>import("./markdown-XFFkuszK.js"),__vite__mapDeps([]))}});fe({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:function(){return ce(()=>import("./mips-CdjsipkG.js"),__vite__mapDeps([]))}});fe({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:function(){return ce(()=>import("./msdax-CYqgjx_P.js"),__vite__mapDeps([]))}});fe({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:function(){return ce(()=>import("./mysql-uE-sL1AK.js"),__vite__mapDeps([]))}});fe({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:function(){return ce(()=>import("./objective-c-B1aVtJYH.js"),__vite__mapDeps([]))}});fe({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:function(){return ce(()=>import("./pascal-BhNW15KB.js"),__vite__mapDeps([]))}});fe({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:function(){return ce(()=>import("./pascaligo-5jv8CcQD.js"),__vite__mapDeps([]))}});fe({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:function(){return ce(()=>import("./perl-DlYyT36c.js"),__vite__mapDeps([]))}});fe({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:function(){return ce(()=>import("./pgsql-DYSgOGm2.js"),__vite__mapDeps([]))}});fe({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:function(){return ce(()=>import("./php-120yhfDK.js"),__vite__mapDeps([]))}});fe({id:"pla",extensions:[".pla"],loader:function(){return ce(()=>import("./pla-CjnFlu4u.js"),__vite__mapDeps([]))}});fe({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:function(){return ce(()=>import("./postiats-CQpG440k.js"),__vite__mapDeps([]))}});fe({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:function(){return ce(()=>import("./powerquery-DdJtto1Z.js"),__vite__mapDeps([]))}});fe({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:function(){return ce(()=>import("./powershell-Bu_VLpJB.js"),__vite__mapDeps([]))}});fe({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:function(){return ce(()=>import("./protobuf-UZVfc1EA.js"),__vite__mapDeps([]))}});fe({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:function(){return ce(()=>import("./pug-kFxLfcjb.js"),__vite__mapDeps([]))}});fe({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:function(){return ce(()=>import("./python-B7vJgDf7.js"),__vite__mapDeps([11,1,2]))}});fe({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:function(){return ce(()=>import("./qsharp-BhgV_cYv.js"),__vite__mapDeps([]))}});fe({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:function(){return ce(()=>import("./r-BIFz-_sK.js"),__vite__mapDeps([]))}});fe({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:function(){return ce(()=>import("./razor-DVRmGTba.js"),__vite__mapDeps([12,1,2]))}});fe({id:"redis",extensions:[".redis"],aliases:["redis"],loader:function(){return ce(()=>import("./redis-CHOsPHWR.js"),__vite__mapDeps([]))}});fe({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:function(){return ce(()=>import("./redshift-w2XKkDvD.js"),__vite__mapDeps([]))}});fe({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:function(){return ce(()=>import("./restructuredtext-CghPJEOS.js"),__vite__mapDeps([]))}});fe({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:function(){return ce(()=>import("./ruby-CYWGW-b1.js"),__vite__mapDeps([]))}});fe({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:function(){return ce(()=>import("./rust-DMDD0SHb.js"),__vite__mapDeps([]))}});fe({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:function(){return ce(()=>import("./sb-BYAiYHFx.js"),__vite__mapDeps([]))}});fe({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:function(){return ce(()=>import("./scala-Bqvq8jcR.js"),__vite__mapDeps([]))}});fe({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:function(){return ce(()=>import("./scheme-Dhb-2j9p.js"),__vite__mapDeps([]))}});fe({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:function(){return ce(()=>import("./scss-CdQcnAnq.js"),__vite__mapDeps([]))}});fe({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:function(){return ce(()=>import("./shell-CmmbcNmB.js"),__vite__mapDeps([]))}});fe({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:function(){return ce(()=>import("./solidity-CME5AdoB.js"),__vite__mapDeps([]))}});fe({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:function(){return ce(()=>import("./sophia-RYC1BQQz.js"),__vite__mapDeps([]))}});fe({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:function(){return ce(()=>import("./sparql-KEyrF7De.js"),__vite__mapDeps([]))}});fe({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:function(){return ce(()=>import("./sql-BdTr02Mf.js"),__vite__mapDeps([]))}});fe({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:function(){return ce(()=>import("./st-C8kzSboH.js"),__vite__mapDeps([]))}});fe({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:function(){return ce(()=>import("./swift-vE6e-x0J.js"),__vite__mapDeps([]))}});fe({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:function(){return ce(()=>import("./systemverilog-DgMryOEJ.js"),__vite__mapDeps([]))}});fe({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:function(){return ce(()=>import("./systemverilog-DgMryOEJ.js"),__vite__mapDeps([]))}});fe({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:function(){return ce(()=>import("./tcl-PloMZuKG.js"),__vite__mapDeps([]))}});fe({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:function(){return ce(()=>import("./twig-bne2BnKZ.js"),__vite__mapDeps([]))}});fe({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:function(){return ce(()=>import("./typescript-pkxEcGpK.js"),__vite__mapDeps([9,1,2]))}});fe({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:function(){return ce(()=>import("./vb-BwAE3J76.js"),__vite__mapDeps([]))}});fe({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\import("./xml-CjTdprsw.js"),__vite__mapDeps([13,1,2]))}});fe({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:function(){return ce(()=>import("./yaml-A89blxgn.js"),__vite__mapDeps([]))}});var HY=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},zY=function(s,e){return function(t,i){e(t,i,s)}},ew=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};const tw=new re("selectionAnchorSet",!1);let _a=class $2{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=tw.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(e){return e.getContribution($2.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],i=this.editor.deltaDecorations(t,[{range:ne.fromPositions(e,e),options:{description:"selection-anchor",stickiness:1,hoverMessage:new ma().appendText(p("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=i[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),Ei(p("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(ne.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};_a.ID="editor.contrib.selectionAnchorController";_a=HY([zY(1,ve)],_a);class UY extends oe{constructor(){super({id:"editor.action.setSelectionAnchor",label:p("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:mi(2089,2080),weight:100}})}run(e,t){return ew(this,void 0,void 0,function*(){_a.get(t).setSelectionAnchor()})}}class $Y extends oe{constructor(){super({id:"editor.action.goToSelectionAnchor",label:p("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:tw})}run(e,t){return ew(this,void 0,void 0,function*(){_a.get(t).goToSelectionAnchor()})}}class jY extends oe{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:p("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:tw,kbOpts:{kbExpr:E.editorTextFocus,primary:mi(2089,2089),weight:100}})}run(e,t){return ew(this,void 0,void 0,function*(){_a.get(t).selectFromAnchorToCursor()})}}class KY extends oe{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:p("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:tw,kbOpts:{kbExpr:E.editorTextFocus,primary:9,weight:100}})}run(e,t){return ew(this,void 0,void 0,function*(){_a.get(t).cancelSelectionAnchor()})}}nt(_a.ID,_a);ee(UY);ee($Y);ee(jY);ee(KY);const qY=R("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},p("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class GY extends oe{constructor(){super({id:"editor.action.jumpToBracket",label:p("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:3160,weight:100}})}run(e,t){let i=bo.get(t);i&&i.jumpToBracket()}}class ZY extends oe{constructor(){super({id:"editor.action.selectToBracket",label:p("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){const n=bo.get(t);if(!n)return;let o=!0;i&&i.selectBrackets===!1&&(o=!1),n.selectToBracket(o)}}class YY{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class bo extends H{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new Lt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(63),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(63)&&(this._matchBrackets=this._editor.getOption(63),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}static get(e){return e.getContribution(bo.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),o=e.matchBracket(n);let r=null;if(o)o[0].containsPosition(n)?r=o[1].getStartPosition():o[1].containsPosition(n)&&(r=o[0].getStartPosition());else{const a=e.findEnclosingBrackets(n);if(a)r=a[0].getStartPosition();else{const l=e.findNextBracket(n);l&&l.range&&(r=l.range.getStartPosition())}}return r?new ne(r.lineNumber,r.column,r.lineNumber,r.column):new ne(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const o=n.getStartPosition();let r=t.matchBracket(o);if(!r&&(r=t.findEnclosingBrackets(o),!r)){const d=t.findNextBracket(o);d&&d.range&&(r=t.matchBracket(d.range.getStartPosition()))}let a=null,l=null;if(r){r.sort(S.compareRangesUsingStarts);const[d,h]=r;if(a=e?d.getStartPosition():d.getEndPosition(),l=e?h.getEndPosition():h.getStartPosition(),h.containsPosition(o)){const c=a;a=l,l=c}}a&&l&&i.push(new ne(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(const i of this._lastBracketsData){let n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations=this._editor.deltaDecorations(this._decorations,e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);let o=[],r=0;for(let c=0,u=e.length;c1&&o.sort(F.compare);let a=[],l=0,d=0,h=n.length;for(let c=0,u=o.length;c{const t=s.getColor(O6);t&&e.addRule(`.monaco-editor .bracket-match { background-color: ${t}; }`);const i=s.getColor(YO);i&&e.addRule(`.monaco-editor .bracket-match { border: 1px solid ${i}; }`)});ps.appendMenuItem(ae.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:p({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class XY{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,o=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&o===e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new S(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new S(i,o,i,o),a)}else{const r=new S(i,o,i,o+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new S(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new ne(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new ne(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class j2 extends oe{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let i=[],n=t.getSelections();for(const o of n)i.push(new XY(o,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class QY extends j2{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:p("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:E.writable})}}class JY extends j2{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:p("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:E.writable})}}ee(QY);ee(JY);class eX extends oe{constructor(){super({id:"editor.action.transposeLetters",label:p("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:E.writable,kbOpts:{kbExpr:E.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],o=t.getSelections();for(let r of o){if(!r.isEmpty())continue;let a=r.startLineNumber,l=r.startColumn,d=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&d===2))continue;let h=l===d?r.getPosition():Xe.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),c=Xe.leftPosition(i,h),u=Xe.leftPosition(i,c),f=i.getValueInRange(S.fromPositions(u,c)),g=i.getValueInRange(S.fromPositions(c,h)),m=S.fromPositions(u,h);n.push(new xi(m,g+f))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}ee(eX);var tX=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};const th="9_cutcopypaste",iX=uo||document.queryCommandSupported("cut"),K2=uo||document.queryCommandSupported("copy"),nX=typeof navigator.clipboard>"u"||rn?document.queryCommandSupported("paste"):!0;function oI(s){return s.register(),s}const sX=iX?oI(new Ou({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:uo?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:p({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:ae.EditorContext,group:th,title:p("actions.clipboard.cutLabel","Cut"),when:E.writable,order:1},{menuId:ae.CommandPalette,group:"",title:p("actions.clipboard.cutLabel","Cut"),order:1},{menuId:ae.SimpleEditorContext,group:th,title:p("actions.clipboard.cutLabel","Cut"),when:E.writable,order:1}]})):void 0,oX=K2?oI(new Ou({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:uo?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:p({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:ae.EditorContext,group:th,title:p("actions.clipboard.copyLabel","Copy"),order:2},{menuId:ae.CommandPalette,group:"",title:p("actions.clipboard.copyLabel","Copy"),order:1},{menuId:ae.SimpleEditorContext,group:th,title:p("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;ps.appendMenuItem(ae.MenubarEditMenu,{submenu:ae.MenubarCopy,title:{value:p("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});ps.appendMenuItem(ae.EditorContext,{submenu:ae.EditorContextCopy,title:{value:p("copy as","Copy As"),original:"Copy As"},group:th,order:3});const cS=nX?oI(new Ou({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:uo?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:p({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:ae.EditorContext,group:th,title:p("actions.clipboard.pasteLabel","Paste"),when:E.writable,order:4},{menuId:ae.CommandPalette,group:"",title:p("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:ae.SimpleEditorContext,group:th,title:p("actions.clipboard.pasteLabel","Paste"),when:E.writable,order:4}]})):void 0;class rX extends oe{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:p("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:E.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(32)&&t.getSelection().isEmpty()||(Ay.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),Ay.forceCopyWithSyntaxHighlighting=!1)}}function q2(s,e){s&&(s.addImplementation(1e4,"code-editor",(t,i)=>{const n=t.get(tt).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const o=n.getOption(32),r=n.getSelection();return r&&r.isEmpty()&&!o||document.execCommand(e),!0}return!1}),s.addImplementation(0,"generic-dom",(t,i)=>(document.execCommand(e),!0)))}q2(sX,"cut");q2(oX,"copy");cS&&(cS.addImplementation(1e4,"code-editor",(s,e)=>{const t=s.get(tt),i=s.get(Rl),n=t.getFocusedCodeEditor();return n&&n.hasTextFocus()?!document.execCommand("paste")&&Tu?tX(void 0,void 0,void 0,function*(){const r=yield i.readText();if(r!==""){const a=Bg.INSTANCE.get(r);let l=!1,d=null,h=null;a&&(l=n.getOption(32)&&!!a.isFromEmptySelection,d=typeof a.multicursorText<"u"?a.multicursorText:null,h=a.mode),n.trigger("keyboard","paste",{text:r,pasteOnNewLine:l,multicursorText:d,mode:h})}}):!0:!1}),cS.addImplementation(0,"generic-dom",(s,e)=>(document.execCommand("paste"),!0)));K2&&ee(rX);class AC{constructor(e){this.executor=e,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}class We{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+We.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new We(this.value+We.sep+e)}}We.sep=".";We.None=new We("@@none@@");We.Empty=new We("");We.QuickFix=new We("quickfix");We.Refactor=new We("refactor");We.Source=new We("source");We.SourceOrganizeImports=We.Source.append("organizeImports");We.SourceFixAll=We.Source.append("fixAll");function aX(s,e){return!(s.include&&!s.include.intersects(e)||s.excludes&&s.excludes.some(t=>G2(e,t,s.include))||!s.includeSourceActions&&We.Source.contains(e))}function lX(s,e){const t=e.kind?new We(e.kind):void 0;return!(s.include&&(!t||!s.include.contains(t))||s.excludes&&t&&s.excludes.some(i=>G2(t,i,s.include))||!s.includeSourceActions&&t&&We.Source.contains(t)||s.onlyIncludePreferredActions&&!e.isPreferred)}function G2(s,e,t){return!(!e.contains(s)||t&&e.contains(t))}class Jo{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return!e||typeof e!="object"?new Jo(t.kind,t.apply,!1):new Jo(Jo.getKindFromUser(e,t.kind),Jo.getApplyFromUser(e,t.apply),Jo.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new We(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}}var rI=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};const Z2="editor.action.codeAction",Y2="editor.action.refactor",X2="editor.action.sourceAction",aI="editor.action.organizeImports",lI="editor.action.fixAll";class Q2{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return rI(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let i;try{i=yield this.provider.resolveCodeAction(this.action,e)}catch(n){Di(n)}i&&(this.action.edit=i.edit)}return this})}}class dI extends H{constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(dI.codeActionsComparator),this.validActions=this.allActions.filter(({action:n})=>!n.disabled)}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:Tn(e.diagnostics)?Tn(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:Tn(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&We.QuickFix.contains(new We(e.kind))&&!!e.isPreferred)}}const XT={actions:[],documentation:void 0};function hI(s,e,t,i,n){var o;const r=t.filter||{},a={only:(o=r.include)===null||o===void 0?void 0:o.value,trigger:t.type},l=new Sk(s,n),d=dX(s,r),h=new X,c=d.map(f=>rI(this,void 0,void 0,function*(){try{i.report(f);const g=yield f.provideCodeActions(s,e,a,l.token);if(g&&h.add(g),l.token.isCancellationRequested)return XT;const m=((g==null?void 0:g.actions)||[]).filter(C=>C&&lX(r,C)),_=hX(f,m,r.include);return{actions:m.map(C=>new Q2(C,f)),documentation:_}}catch(g){if(br(g))throw g;return Di(g),XT}})),u=ar.onDidChange(()=>{const f=ar.all(s);zs(f,d)||l.cancel()});return Promise.all(c).then(f=>{const g=Cx(f.map(_=>_.actions)),m=wh(f.map(_=>_.documentation));return new dI(g,m,h)}).finally(()=>{u.dispose(),l.dispose()})}function dX(s,e){return ar.all(s).filter(t=>t.providedCodeActionKinds?t.providedCodeActionKinds.some(i=>aX(e,new We(i))):!0)}function hX(s,e,t){if(!s.documentation)return;const i=s.documentation.map(n=>({kind:new We(n.kind),command:n.command}));if(t){let n;for(const o of i)o.kind.contains(t)&&(n?n.kind.contains(o.kind)&&(n=o):n=o);if(n)return n==null?void 0:n.command}for(const n of e)if(n.kind){for(const o of i)if(o.kind.contains(new We(n.kind)))return o.command}}$e.registerCommand("_executeCodeActionProvider",function(s,e,t,i,n){return rI(this,void 0,void 0,function*(){if(!(e instanceof me))throw fo();const o=s.get(ri).getModel(e);if(!o)throw fo();const r=ne.isISelection(t)?ne.liftSelection(t):S.isIRange(t)?o.validateRange(t):void 0;if(!r)throw fo();const a=typeof i=="string"?new We(i):void 0,l=yield hI(o,r,{type:1,filter:{includeSourceActions:!0,include:a}},kh.None,Oe.None),d=[],h=Math.min(l.validActions.length,typeof n=="number"?n:0);for(let c=0;cc.action)}finally{setTimeout(()=>l.dispose(),100)}})});var cX=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},uX=function(s,e){return function(t,i){e(t,i,s)}};let is=class RL{constructor(e,t){this._messageWidget=new dn,this._messageListeners=new X,this._editor=e,this._visible=RL.MESSAGE_VISIBLE.bindTo(t),this._editorListener=this._editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit())}static get(e){return e.getContribution(RL.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Ei(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new QT(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new hn(()=>this.closeMessage(),3e3));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(i?i.containsPosition(n.target.position)||this.closeMessage():i=new S(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(QT.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(p("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())}};is.ID="editor.contrib.messageController";is.MESSAGE_VISIBLE=new re("messageVisible",!1,p("messageVisible","Whether the editor is currently showing an inline message"));is=cX([uX(1,ve)],is);const fX=Mi.bindToContribution(is.get);J(new fX({id:"leaveEditorMessage",precondition:is.MESSAGE_VISIBLE,handler:s=>s.closeMessage(),kbOpts:{weight:130,primary:9}}));let QT=class{constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const r=document.createElement("div");r.classList.add("message"),r.textContent=n,this._domNode.appendChild(r);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){let t;const i=()=>{e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",i)};return t=setTimeout(i,110),e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};nt(is.ID,is);st((s,e)=>{const t=s.getColor(Qx);if(t){let o=s.type===gs.HIGH_CONTRAST?2:1;e.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${t}; }`),e.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${t}; }`),e.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${o}px solid ${t}; }`)}const i=s.getColor(Yx);i&&e.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${i}; }`);const n=s.getColor(Xx);n&&e.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${n}; }`)});var gX=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},JT=function(s,e){return function(t,i){e(t,i,s)}},pX=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};class eA extends Us{constructor(e,t){super(e.command?e.command.id:e.title,mX(e.title),void 0,!e.disabled,t),this.action=e}}function mX(s){return s.replace(/\r\n|\r|\n/g," ")}let ML=class extends H{constructor(e,t,i,n){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._visible=!1,this._showingActions=this._register(new dn),this._keybindingResolver=new iw({getKeybindings:()=>n.getKeybindings()})}get isVisible(){return this._visible}show(e,t,i,n){return pX(this,void 0,void 0,function*(){const o=n.includeDisabledActions?t.allActions:t.validActions;if(!o.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,Ru();this._visible=!0,this._showingActions.value=t;const r=this.getMenuActions(e,o,t.documentation),a=F.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},l=this._keybindingResolver.getResolver(),d=this._editor.getOption(113);this._contextMenuService.showContextMenu({domForShadowRoot:d?this._editor.getDomNode():void 0,getAnchor:()=>a,getActions:()=>r,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:h=>h instanceof eA?l(h.action):void 0})})}getMenuActions(e,t,i){var n,o;const r=h=>new eA(h.action,()=>this._delegate.onSelectCodeAction(h)),a=t.map(r),l=[...i],d=this._editor.getModel();if(d&&a.length)for(const h of ar.all(d))h._getAdditionalMenuItems&&l.push(...h._getAdditionalMenuItems({trigger:e.type,only:(o=(n=e.filter)===null||n===void 0?void 0:n.include)===null||o===void 0?void 0:o.value},t.map(c=>c.action)));return l.length&&a.push(new $s,...l.map(h=>r(new Q2({title:h.title,command:h},void 0)))),a}_toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=Ii(this._editor.getDomNode()),n=i.left+t.left,o=i.top+t.top+t.height;return{x:n,y:o}}};ML=gX([JT(2,Al),JT(3,Nt)],ML);class iw{constructor(e){this._keybindingProvider=e}getResolver(){const e=new AC(()=>this._keybindingProvider.getKeybindings().filter(t=>iw.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===aI?i={kind:We.SourceOrganizeImports.value}:t.command===lI&&(i={kind:We.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Jo.fromUser(i,{kind:We.None,apply:"never"}))}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return i==null?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new We(e.kind);return t.filter(n=>n.kind.contains(i)).filter(n=>n.preferred?e.isPreferred:!0).reduceRight((n,o)=>n?n.kind.contains(o.kind)?o:n:o,void 0)}}iw.codeActionCommands=[Y2,Z2,X2,aI,lI];var _X=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},bX=function(s,e){return function(t,i){e(t,i,s)}},ug;(function(s){s.Hidden={type:0};class e{constructor(i,n,o,r){this.actions=i,this.trigger=n,this.editorPosition=o,this.widgetPosition=r,this.type=1}}s.Showing=e})(ug||(ug={}));let RC=class J2 extends H{constructor(e,t,i,n){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new M),this.onClick=this._onClick.event,this._state=ug.Hidden,this._domNode=document.createElement("div"),this._domNode.className=ie.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(o=>{const r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide()})),lt.ignoreTarget(this._domNode),this._register(a3(this._domNode,o=>{if(this.state.type!==1)return;this._editor.focus(),o.preventDefault();const{top:r,height:a}=Ii(this._domNode),l=this._editor.getOption(58);let d=Math.floor(l/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{if((o.buttons&1)!==1)return;this.hide();const r=new Dh;r.startMonitoring(o.target,o.buttons,Pu,()=>{},()=>{r.dispose()})})),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(56)&&!this._editor.getOption(56).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();const n=this._editor.getOptions();if(!n.get(56).enabled)return this.hide();const o=this._editor.getModel();if(!o)return this.hide();const{lineNumber:r,column:a}=o.validatePosition(i),l=o.getOptions().tabSize,d=n.get(43),h=o.getLineContent(r),c=Rn.computeIndentLevel(h,l),u=d.spaceWidth*c>22,f=m=>m>2&&this._editor.getTopForLineNumber(m)===this._editor.getTopForLineNumber(m-1);let g=r;if(!u){if(r>1&&!f(r-1))g-=1;else if(!f(r+1))g+=1;else if(a*d.spaceWidth<22)return this.hide()}this.state=new ug.Showing(e,t,i,{position:{lineNumber:g,column:1},preference:J2._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=ug.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...ie.lightBulb.classNamesArray),this._domNode.classList.add(...ie.lightbulbAutofix.classNamesArray);const t=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(t){this.title=p("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",t.getLabel());return}}this._domNode.classList.remove(...ie.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...ie.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);e?this.title=p("codeActionWithKb","Show Code Actions ({0})",e.getLabel()):this.title=p("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};RC._posPref=[0];RC=_X([bX(3,Nt)],RC);st((s,e)=>{var t;const i=(t=s.getColor(ms))===null||t===void 0?void 0:t.transparent(.7),n=s.getColor(M9);n&&e.addRule(` + hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")o.push({token:a.token+t.tokenPostfix,open:Xa(t,a.open),close:Xa(t,a.close)});else throw pt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=o,t.noThrow=!0,t}function DZ(s){Rd.registerLanguage(s)}function xZ(){let s=[];return s=s.concat(Rd.getLanguages()),s}function kZ(s){return it.modeService.get().languageIdCodec.encodeLanguageId(s)}function IZ(s,e){let t=it.modeService.get().onDidEncounterLanguage(i=>{i===s&&(t.dispose(),e())});return t}function EZ(s,e){const t=it.modeService.get().validateLanguageId(s);if(!t)throw new Error(`Cannot set configuration for unknown language ${s}`);return Qe.register(t,e,100)}class NZ{constructor(e,t){this._languageId=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i,n){if(typeof this._actual.tokenize=="function")return lp.adaptTokenize(this._languageId,this._actual,e,i,n);throw new Error("Not supported!")}tokenize2(e,t,i){let n=this._actual.tokenizeEncoded(e,i);return new KC(n.tokens,n.endState)}}class lp{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._modeService=i,this._standaloneThemeService=n}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t,i){let n=[],o=0;for(let r=0,a=e.length;r0&&r[a-1]===f)continue;let g=u.startIndex;h===0?g=0:gTZ(n)?new NZ(t,n):new lp(t,n,it.modeService.get(),it.standaloneThemeService.get());return E2(e)?Rt.registerPromise(s,e.then(n=>i(n))):Rt.register(s,i(e))}function MZ(s,e){const t=i=>TH(it.modeService.get(),it.standaloneThemeService.get(),s,LZ(s,i));return E2(e)?Rt.registerPromise(s,e.then(i=>t(i))):Rt.register(s,t(e))}function OZ(s,e){return vb.register(s,e)}function PZ(s,e){return wb.register(s,e)}function FZ(s,e){return Ld.register(s,e)}function BZ(s,e){return Sg.register(s,{provideHover:(t,i,n)=>{let o=t.getWordAtPosition(i);return Promise.resolve(e.provideHover(t,i,n)).then(r=>{if(r)return!r.range&&o&&(r.range=new S(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),r.range||(r.range=new S(i.lineNumber,i.column,i.lineNumber,i.column)),r})}})}function WZ(s,e){return Vs.register(s,e)}function VZ(s,e){return Qc.register(s,e)}function HZ(s,e){return Sb.register(s,e)}function zZ(s,e){return yg.register(s,e)}function UZ(s,e){return Lb.register(s,e)}function $Z(s,e){return Db.register(s,e)}function jZ(s,e){return Zr.register(s,e)}function KZ(s,e,t){return ar.register(s,{providedCodeActionKinds:t==null?void 0:t.providedCodeActionKinds,provideCodeActions:(i,n,o,r)=>{let a=it.markerService.get().read({resource:i.uri}).filter(l=>S.areIntersectingOrTouching(l,n));return e.provideCodeActions(i,n,{markers:a,only:o.only},r)},resolveCodeAction:e.resolveCodeAction})}function qZ(s,e){return Vf.register(s,e)}function GZ(s,e){return ao.register(s,e)}function ZZ(s,e){return xb.register(s,e)}function YZ(s,e){return Lg.register(s,e)}function XZ(s,e){return ro.register(s,e)}function QZ(s,e){return Jc.register(s,e)}function JZ(s,e){return ey.register(s,e)}function eY(s,e){return yb.register(s,e)}function tY(s,e){return ev.register(s,e)}function iY(s,e){return eu.register(s,e)}function nY(s,e){return tv.register(s,e)}function sY(s,e){return ux.register(s,e)}function oY(s,e){return za.register(s,e)}function rY(){return{register:DZ,getLanguages:xZ,onLanguage:IZ,getEncodedLanguageId:kZ,setLanguageConfiguration:EZ,setColorMap:AZ,setTokensProvider:RZ,setMonarchTokensProvider:MZ,registerReferenceProvider:OZ,registerRenameProvider:PZ,registerCompletionItemProvider:XZ,registerSignatureHelpProvider:FZ,registerHoverProvider:BZ,registerDocumentSymbolProvider:WZ,registerDocumentHighlightProvider:VZ,registerLinkedEditingRangeProvider:HZ,registerDefinitionProvider:zZ,registerImplementationProvider:UZ,registerTypeDefinitionProvider:$Z,registerCodeLensProvider:jZ,registerCodeActionProvider:KZ,registerDocumentFormattingEditProvider:qZ,registerDocumentRangeFormattingEditProvider:GZ,registerOnTypeFormattingEditProvider:ZZ,registerLinkProvider:YZ,registerColorProvider:QZ,registerFoldingRangeProvider:JZ,registerDeclarationProvider:eY,registerSelectionRangeProvider:tY,registerDocumentSemanticTokensProvider:iY,registerDocumentRangeSemanticTokensProvider:nY,registerInlineCompletionsProvider:sY,registerInlayHintsProvider:oY,DocumentHighlightKind:h1,CompletionItemKind:s1,CompletionItemTag:o1,CompletionItemInsertTextRule:n1,SymbolKind:T1,SymbolTag:A1,IndentAction:p1,CompletionTriggerKind:r1,SignatureHelpTriggerKind:N1,InlayHintKind:m1,InlineCompletionTriggerKind:_1,FoldingRangeKind:vo}}class gu{static _handleEolEdits(e,t){let i,n=[];for(let o of t)typeof o.eol=="number"&&(i=o.eol),o.range&&typeof o.text=="string"&&n.push(o);return typeof i=="number"&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const n=gu._handleEolEdits(e,t);n.length===1&&gu._isFullModelReplaceEdit(e,n[0])?e.executeEdits("formatEditsCommand",n.map(o=>Vt.replace(S.lift(o.range),o.text))):e.executeEdits("formatEditsCommand",n.map(o=>Vt.replaceMove(S.lift(o.range),o.text))),i&&e.pushUndoStop()}}class lS{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}var yo=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};function eI(s){if(s=s.filter(n=>n.range),!s.length)return;let{range:e}=s[0];for(let n=1;n0&&S.areIntersectingOrTouching(l[d-1],g)?l[d-1]=S.fromPositions(l[d-1].getStartPosition(),g.getEndPosition()):d=l.push(g);const h=g=>yo(this,void 0,void 0,function*(){return(yield e.provideDocumentRangeFormattingEdits(r,g,r.getFormattingOptions(),a.token))||[]}),c=(g,m)=>{if(!g.length||!m.length)return!1;const _=g.reduce((C,b)=>S.plusRange(C,b.range),g[0].range);if(!m.some(C=>S.intersectRanges(_,C.range)))return!1;for(let C of g)for(let b of m)if(S.intersectRanges(C.range,b.range))return!0;return!1},u=[],f=[];try{for(let g of l){if(a.token.isCancellationRequested)return!0;f.push(yield h(g))}for(let g=0;g({text:_.text,range:S.lift(_.range),forceMoveMarkers:!0})),_=>{for(const{range:C}of _)if(S.areIntersectingOrTouching(C,m))return[new ne(C.startLineNumber,C.startColumn,C.endLineNumber,C.endColumn)];return null})}return!0})}function lY(s,e,t,i,n){return yo(this,void 0,void 0,function*(){const o=s.get(Ge),r=ur(e)?e.getModel():e,a=N2(r),l=yield eh.select(a,r,t);l&&(i.report(l),yield o.invokeFunction(dY,l,e,t,n))})}function dY(s,e,t,i,n){return yo(this,void 0,void 0,function*(){const o=s.get(Ys);let r,a;ur(t)?(r=t.getModel(),a=new Zg(t,5,void 0,n)):(r=t,a=new Sk(t,n));let l;try{const d=yield e.provideDocumentFormattingEdits(r,r.getFormattingOptions(),a.token);if(l=yield o.computeMoreMinimalEdits(r.uri,d),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||l.length===0)return!1;if(ur(t))gu.execute(t,l,i!==2),i!==2&&(eI(l),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1));else{const[{range:d}]=l,h=new ne(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn);r.pushEditOperations([h],l.map(c=>({text:c.text,range:S.lift(c.range),forceMoveMarkers:!0})),c=>{for(const{range:u}of c)if(S.areIntersectingOrTouching(u,h))return[new ne(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn)];return null})}return!0})}function hY(s,e,t,i,n){return yo(this,void 0,void 0,function*(){const o=ao.ordered(e);for(const r of o){let a=yield Promise.resolve(r.provideDocumentRangeFormattingEdits(e,t,i,n)).catch(Di);if(Tn(a))return yield s.computeMoreMinimalEdits(e.uri,a)}})}function cY(s,e,t,i){return yo(this,void 0,void 0,function*(){const n=N2(e);for(const o of n){let r=yield Promise.resolve(o.provideDocumentFormattingEdits(e,t,i)).catch(Di);if(Tn(r))return yield s.computeMoreMinimalEdits(e.uri,r)}})}function A2(s,e,t,i,n){const o=xb.ordered(e);return o.length===0||o[0].autoFormatTriggerCharacters.indexOf(i)<0?Promise.resolve(void 0):Promise.resolve(o[0].provideOnTypeFormattingEdits(e,t,i,n,Oe.None)).catch(Di).then(r=>s.computeMoreMinimalEdits(e.uri,r))}$e.registerCommand("_executeFormatRangeProvider",function(s,...e){return yo(this,void 0,void 0,function*(){const[t,i,n]=e;ut(me.isUri(t)),ut(S.isIRange(i));const o=s.get(Jn),r=s.get(Ys),a=yield o.createModelReference(t);try{return hY(r,a.object.textEditorModel,S.lift(i),n,Oe.None)}finally{a.dispose()}})});$e.registerCommand("_executeFormatDocumentProvider",function(s,...e){return yo(this,void 0,void 0,function*(){const[t,i]=e;ut(me.isUri(t));const n=s.get(Jn),o=s.get(Ys),r=yield n.createModelReference(t);try{return cY(o,r.object.textEditorModel,i,Oe.None)}finally{r.dispose()}})});$e.registerCommand("_executeFormatOnTypeProvider",function(s,...e){return yo(this,void 0,void 0,function*(){const[t,i,n,o]=e;ut(me.isUri(t)),ut(F.isIPosition(i)),ut(typeof n=="string");const r=s.get(Jn),a=s.get(Ys),l=yield r.createModelReference(t);try{return A2(a,l.object.textEditorModel,F.lift(i),n,o)}finally{l.dispose()}})});var dS;Do.wrappingIndent.defaultValue=0;Do.glyphMargin.defaultValue=!1;Do.autoIndent.defaultValue=3;Do.overviewRulerLanes.defaultValue=2;eh.setFormatterSelector((s,e,t)=>Promise.resolve(s[0]));const un=BR();un.editor=bZ();un.languages=rY();const uY=un.CancellationTokenSource,pu=un.Emitter,fY=un.KeyCode,gY=un.KeyMod,pY=un.Position,mY=un.Range,_Y=un.Selection,bY=un.SelectionDirection,CY=un.MarkerSeverity,vY=un.MarkerTag,wY=un.Uri,SY=un.Token,yY=un.editor,on=un.languages;(!((dS=Et.MonacoEnvironment)===null||dS===void 0)&&dS.globalAPI||typeof define=="function"&&define.amd)&&(self.monaco=un);typeof self.require<"u"&&typeof self.require.config=="function"&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});var LY="4.4.4",EL;(function(s){s[s.None=0]="None",s[s.CommonJS=1]="CommonJS",s[s.AMD=2]="AMD",s[s.UMD=3]="UMD",s[s.System=4]="System",s[s.ES2015=5]="ES2015",s[s.ESNext=99]="ESNext"})(EL||(EL={}));var NL;(function(s){s[s.None=0]="None",s[s.Preserve=1]="Preserve",s[s.React=2]="React",s[s.ReactNative=3]="ReactNative",s[s.ReactJSX=4]="ReactJSX",s[s.ReactJSXDev=5]="ReactJSXDev"})(NL||(NL={}));var TL;(function(s){s[s.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",s[s.LineFeed=1]="LineFeed"})(TL||(TL={}));var dp;(function(s){s[s.ES3=0]="ES3",s[s.ES5=1]="ES5",s[s.ES2015=2]="ES2015",s[s.ES2016=3]="ES2016",s[s.ES2017=4]="ES2017",s[s.ES2018=5]="ES2018",s[s.ES2019=6]="ES2019",s[s.ES2020=7]="ES2020",s[s.ESNext=99]="ESNext",s[s.JSON=100]="JSON",s[s.Latest=99]="Latest"})(dp||(dp={}));var AL;(function(s){s[s.Classic=1]="Classic",s[s.NodeJs=2]="NodeJs"})(AL||(AL={}));var R2=function(){function s(e,t,i,n){this._onDidChange=new pu,this._onDidExtraLibsChange=new pu,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this._onDidExtraLibsChangeTimeout=-1}return Object.defineProperty(s.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"onDidExtraLibsChange",{get:function(){return this._onDidExtraLibsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"workerOptions",{get:function(){return this._workerOptions},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"inlayHintsOptions",{get:function(){return this._inlayHintsOptions},enumerable:!1,configurable:!0}),s.prototype.getExtraLibs=function(){return this._extraLibs},s.prototype.addExtraLib=function(e,t){var i=this,n;if(typeof t>"u"?n="ts:extralib-"+Math.random().toString(36).substring(2,15):n=t,this._extraLibs[n]&&this._extraLibs[n].content===e)return{dispose:function(){}};var o=1;return this._removedExtraLibs[n]&&(o=this._removedExtraLibs[n]+1),this._extraLibs[n]&&(o=this._extraLibs[n].version+1),this._extraLibs[n]={content:e,version:o},this._fireOnDidExtraLibsChangeSoon(),{dispose:function(){var r=i._extraLibs[n];r&&r.version===o&&(delete i._extraLibs[n],i._removedExtraLibs[n]=o,i._fireOnDidExtraLibsChangeSoon())}}},s.prototype.setExtraLibs=function(e){for(var t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(var i=0,n=e;iimport("./tsMode-zxqcXIbW.js"),__vite__mapDeps([0,1,2]))}on.onLanguage("typescript",function(){return Yv().then(function(s){return s.setupTypeScript(M2)})});on.onLanguage("javascript",function(){return Yv().then(function(s){return s.setupJavaScript(O2)})});var tI=function(){function s(e,t,i){this._onDidChange=new pu,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(s.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"diagnosticsOptions",{get:function(){return this.options},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),s.prototype.setOptions=function(e){this._options=e||Object.create(null),this._onDidChange.fire(this)},s.prototype.setDiagnosticsOptions=function(e){this.setOptions(e)},s.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},s}(),iI={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0}},nI={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},P2=new tI("css",iI,nI),F2=new tI("scss",iI,nI),B2=new tI("less",iI,nI);on.css={cssDefaults:P2,lessDefaults:B2,scssDefaults:F2};function sI(){return ce(()=>import("./cssMode-C9EIlsuu.js"),__vite__mapDeps([3,1,2]))}on.onLanguage("less",function(){sI().then(function(s){return s.setupMode(B2)})});on.onLanguage("scss",function(){sI().then(function(s){return s.setupMode(F2)})});on.onLanguage("css",function(){sI().then(function(s){return s.setupMode(P2)})});var IY=function(){function s(e,t,i){this._onDidChange=new pu,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(s.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),s.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},s.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},s}(),EY={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},NY={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},W2=new IY("json",EY,NY);on.json={jsonDefaults:W2};function TY(){return ce(()=>import("./jsonMode-Bv4GarVJ.js"),__vite__mapDeps([4,1,2]))}on.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});on.onLanguage("json",function(){TY().then(function(s){return s.setupMode(W2)})});var AY=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})},RY=function(s,e){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(d){return function(h){return l([d,h])}}function l(d){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(o=d[0]&2?n.return:d[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,d[1])).done)return o;switch(n=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return t.label++,{value:d[1],done:!1};case 5:t.label++,n=d[1],d=[0];continue;case 7:d=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){t=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]import("./htmlMode-xuNzmemc.js"),__vite__mapDeps([5,1,2]))}function Jv(s,e,t){var i=this;e===void 0&&(e=Xv),t===void 0&&(t=Qv(s));var n=new MY(s,e,t),o,r=on.onLanguage(s,function(){return AY(i,void 0,void 0,function(){return RY(this,function(a){switch(a.label){case 0:return[4,WY()];case 1:return o=a.sent().setupMode(n),[2]}})})});return{defaults:n,dispose:function(){r.dispose(),o==null||o.dispose(),o=void 0}}}var U2={},hS={},VY=function(){function s(e){var t=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(function(i,n){t._lazyLoadPromiseResolve=i,t._lazyLoadPromiseReject=n})}return s.getOrCreate=function(e){return hS[e]||(hS[e]=new s(e)),hS[e]},s.prototype.whenLoaded=function(){return this._lazyLoadPromise},s.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,U2[this._languageId].loader().then(function(t){return e._lazyLoadPromiseResolve(t)},function(t){return e._lazyLoadPromiseReject(t)})),this._lazyLoadPromise},s}();function fe(s){var e=s.id;U2[e]=s,on.register(s);var t=VY.getOrCreate(e);on.setMonarchTokensProvider(e,t.whenLoaded().then(function(i){return i.language})),on.onLanguage(e,function(){t.load().then(function(i){on.setLanguageConfiguration(e,i.conf)})})}fe({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:function(){return ce(()=>import("./abap-CRCWOmpq.js"),__vite__mapDeps([]))}});fe({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:function(){return ce(()=>import("./apex-BL_CmIl-.js"),__vite__mapDeps([]))}});fe({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:function(){return ce(()=>import("./azcli-1IWB1ccx.js"),__vite__mapDeps([]))}});fe({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:function(){return ce(()=>import("./bat-DPkNLes8.js"),__vite__mapDeps([]))}});fe({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:function(){return ce(()=>import("./bicep-DLNwh9K6.js"),__vite__mapDeps([]))}});fe({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:function(){return ce(()=>import("./cameligo-CGrWLZr3.js"),__vite__mapDeps([]))}});fe({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:function(){return ce(()=>import("./clojure-D9WOWImG.js"),__vite__mapDeps([]))}});fe({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:function(){return ce(()=>import("./coffee-B7EJu28W.js"),__vite__mapDeps([]))}});fe({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:function(){return ce(()=>import("./cpp-RmZVvII3.js"),__vite__mapDeps([]))}});fe({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:function(){return ce(()=>import("./cpp-RmZVvII3.js"),__vite__mapDeps([]))}});fe({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:function(){return ce(()=>import("./csharp-BoL64M5l.js"),__vite__mapDeps([]))}});fe({id:"csp",extensions:[],aliases:["CSP","csp"],loader:function(){return ce(()=>import("./csp-C46ZqvIl.js"),__vite__mapDeps([]))}});fe({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:function(){return ce(()=>import("./css-yEtxmcUf.js"),__vite__mapDeps([]))}});fe({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:function(){return ce(()=>import("./dart-D8lhlL1r.js"),__vite__mapDeps([]))}});fe({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:function(){return ce(()=>import("./dockerfile-DLk6rpji.js"),__vite__mapDeps([]))}});fe({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:function(){return ce(()=>import("./ecl-BO6FnfXk.js"),__vite__mapDeps([]))}});fe({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:function(){return ce(()=>import("./elixir-B9GXSzSz.js"),__vite__mapDeps([]))}});fe({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:function(){return ce(()=>import("./flow9-Cac8vKd7.js"),__vite__mapDeps([]))}});fe({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:function(){return ce(()=>import("./fsharp-fd1GTHhf.js"),__vite__mapDeps([]))}});fe({id:"go",extensions:[".go"],aliases:["Go"],loader:function(){return ce(()=>import("./go-O9LJTZXk.js"),__vite__mapDeps([]))}});fe({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:function(){return ce(()=>import("./graphql-LQdxqEYJ.js"),__vite__mapDeps([]))}});fe({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:function(){return ce(()=>import("./handlebars-C1nVRnNW.js"),__vite__mapDeps([6,1,2]))}});fe({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:function(){return ce(()=>import("./hcl-DxDQ3s82.js"),__vite__mapDeps([]))}});fe({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:function(){return ce(()=>import("./html-D-6iRZaq.js"),__vite__mapDeps([7,1,2]))}});fe({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:function(){return ce(()=>import("./ini-BvajGCUy.js"),__vite__mapDeps([]))}});fe({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:function(){return ce(()=>import("./java-SYsfObOQ.js"),__vite__mapDeps([]))}});fe({id:"javascript",extensions:[".js",".es6",".jsx",".mjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:function(){return ce(()=>import("./javascript-DCZNW9t7.js"),__vite__mapDeps([8,9,1,2]))}});fe({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:function(){return ce(()=>import("./julia-DQXNmw_w.js"),__vite__mapDeps([]))}});fe({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:function(){return ce(()=>import("./kotlin-qQ0MG-9I.js"),__vite__mapDeps([]))}});fe({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:function(){return ce(()=>import("./less-B86-qBTk.js"),__vite__mapDeps([]))}});fe({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:function(){return ce(()=>import("./lexon-Canl7DCW.js"),__vite__mapDeps([]))}});fe({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:function(){return ce(()=>import("./lua-D28Ae8-K.js"),__vite__mapDeps([]))}});fe({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:function(){return ce(()=>import("./liquid-BsAcyCib.js"),__vite__mapDeps([10,1,2]))}});fe({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:function(){return ce(()=>import("./m3-DPitgjJI.js"),__vite__mapDeps([]))}});fe({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:function(){return ce(()=>import("./markdown-XFFkuszK.js"),__vite__mapDeps([]))}});fe({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:function(){return ce(()=>import("./mips-CdjsipkG.js"),__vite__mapDeps([]))}});fe({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:function(){return ce(()=>import("./msdax-CYqgjx_P.js"),__vite__mapDeps([]))}});fe({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:function(){return ce(()=>import("./mysql-uE-sL1AK.js"),__vite__mapDeps([]))}});fe({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:function(){return ce(()=>import("./objective-c-B1aVtJYH.js"),__vite__mapDeps([]))}});fe({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:function(){return ce(()=>import("./pascal-BhNW15KB.js"),__vite__mapDeps([]))}});fe({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:function(){return ce(()=>import("./pascaligo-5jv8CcQD.js"),__vite__mapDeps([]))}});fe({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:function(){return ce(()=>import("./perl-DlYyT36c.js"),__vite__mapDeps([]))}});fe({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:function(){return ce(()=>import("./pgsql-DYSgOGm2.js"),__vite__mapDeps([]))}});fe({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:function(){return ce(()=>import("./php-120yhfDK.js"),__vite__mapDeps([]))}});fe({id:"pla",extensions:[".pla"],loader:function(){return ce(()=>import("./pla-CjnFlu4u.js"),__vite__mapDeps([]))}});fe({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:function(){return ce(()=>import("./postiats-CQpG440k.js"),__vite__mapDeps([]))}});fe({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:function(){return ce(()=>import("./powerquery-DdJtto1Z.js"),__vite__mapDeps([]))}});fe({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:function(){return ce(()=>import("./powershell-Bu_VLpJB.js"),__vite__mapDeps([]))}});fe({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:function(){return ce(()=>import("./protobuf-UZVfc1EA.js"),__vite__mapDeps([]))}});fe({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:function(){return ce(()=>import("./pug-kFxLfcjb.js"),__vite__mapDeps([]))}});fe({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:function(){return ce(()=>import("./python-CqWPWcCu.js"),__vite__mapDeps([11,1,2]))}});fe({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:function(){return ce(()=>import("./qsharp-BhgV_cYv.js"),__vite__mapDeps([]))}});fe({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:function(){return ce(()=>import("./r-BIFz-_sK.js"),__vite__mapDeps([]))}});fe({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:function(){return ce(()=>import("./razor-5aWRmidA.js"),__vite__mapDeps([12,1,2]))}});fe({id:"redis",extensions:[".redis"],aliases:["redis"],loader:function(){return ce(()=>import("./redis-CHOsPHWR.js"),__vite__mapDeps([]))}});fe({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:function(){return ce(()=>import("./redshift-w2XKkDvD.js"),__vite__mapDeps([]))}});fe({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:function(){return ce(()=>import("./restructuredtext-CghPJEOS.js"),__vite__mapDeps([]))}});fe({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:function(){return ce(()=>import("./ruby-CYWGW-b1.js"),__vite__mapDeps([]))}});fe({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:function(){return ce(()=>import("./rust-DMDD0SHb.js"),__vite__mapDeps([]))}});fe({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:function(){return ce(()=>import("./sb-BYAiYHFx.js"),__vite__mapDeps([]))}});fe({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:function(){return ce(()=>import("./scala-Bqvq8jcR.js"),__vite__mapDeps([]))}});fe({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:function(){return ce(()=>import("./scheme-Dhb-2j9p.js"),__vite__mapDeps([]))}});fe({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:function(){return ce(()=>import("./scss-CdQcnAnq.js"),__vite__mapDeps([]))}});fe({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:function(){return ce(()=>import("./shell-CmmbcNmB.js"),__vite__mapDeps([]))}});fe({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:function(){return ce(()=>import("./solidity-CME5AdoB.js"),__vite__mapDeps([]))}});fe({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:function(){return ce(()=>import("./sophia-RYC1BQQz.js"),__vite__mapDeps([]))}});fe({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:function(){return ce(()=>import("./sparql-KEyrF7De.js"),__vite__mapDeps([]))}});fe({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:function(){return ce(()=>import("./sql-BdTr02Mf.js"),__vite__mapDeps([]))}});fe({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:function(){return ce(()=>import("./st-C8kzSboH.js"),__vite__mapDeps([]))}});fe({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:function(){return ce(()=>import("./swift-vE6e-x0J.js"),__vite__mapDeps([]))}});fe({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:function(){return ce(()=>import("./systemverilog-DgMryOEJ.js"),__vite__mapDeps([]))}});fe({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:function(){return ce(()=>import("./systemverilog-DgMryOEJ.js"),__vite__mapDeps([]))}});fe({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:function(){return ce(()=>import("./tcl-PloMZuKG.js"),__vite__mapDeps([]))}});fe({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:function(){return ce(()=>import("./twig-bne2BnKZ.js"),__vite__mapDeps([]))}});fe({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:function(){return ce(()=>import("./typescript-3xYj8q83.js"),__vite__mapDeps([9,1,2]))}});fe({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:function(){return ce(()=>import("./vb-BwAE3J76.js"),__vite__mapDeps([]))}});fe({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\import("./xml-CPUo3pfG.js"),__vite__mapDeps([13,1,2]))}});fe({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:function(){return ce(()=>import("./yaml-A89blxgn.js"),__vite__mapDeps([]))}});var HY=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},zY=function(s,e){return function(t,i){e(t,i,s)}},ew=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};const tw=new re("selectionAnchorSet",!1);let _a=class $2{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=tw.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(e){return e.getContribution($2.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],i=this.editor.deltaDecorations(t,[{range:ne.fromPositions(e,e),options:{description:"selection-anchor",stickiness:1,hoverMessage:new ma().appendText(p("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=i[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),Ei(p("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(ne.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};_a.ID="editor.contrib.selectionAnchorController";_a=HY([zY(1,ve)],_a);class UY extends oe{constructor(){super({id:"editor.action.setSelectionAnchor",label:p("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:mi(2089,2080),weight:100}})}run(e,t){return ew(this,void 0,void 0,function*(){_a.get(t).setSelectionAnchor()})}}class $Y extends oe{constructor(){super({id:"editor.action.goToSelectionAnchor",label:p("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:tw})}run(e,t){return ew(this,void 0,void 0,function*(){_a.get(t).goToSelectionAnchor()})}}class jY extends oe{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:p("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:tw,kbOpts:{kbExpr:E.editorTextFocus,primary:mi(2089,2089),weight:100}})}run(e,t){return ew(this,void 0,void 0,function*(){_a.get(t).selectFromAnchorToCursor()})}}class KY extends oe{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:p("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:tw,kbOpts:{kbExpr:E.editorTextFocus,primary:9,weight:100}})}run(e,t){return ew(this,void 0,void 0,function*(){_a.get(t).cancelSelectionAnchor()})}}nt(_a.ID,_a);ee(UY);ee($Y);ee(jY);ee(KY);const qY=R("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},p("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class GY extends oe{constructor(){super({id:"editor.action.jumpToBracket",label:p("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:3160,weight:100}})}run(e,t){let i=bo.get(t);i&&i.jumpToBracket()}}class ZY extends oe{constructor(){super({id:"editor.action.selectToBracket",label:p("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){const n=bo.get(t);if(!n)return;let o=!0;i&&i.selectBrackets===!1&&(o=!1),n.selectToBracket(o)}}class YY{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class bo extends H{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new Lt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(63),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(63)&&(this._matchBrackets=this._editor.getOption(63),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(e.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}static get(e){return e.getContribution(bo.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),o=e.matchBracket(n);let r=null;if(o)o[0].containsPosition(n)?r=o[1].getStartPosition():o[1].containsPosition(n)&&(r=o[0].getStartPosition());else{const a=e.findEnclosingBrackets(n);if(a)r=a[0].getStartPosition();else{const l=e.findNextBracket(n);l&&l.range&&(r=l.range.getStartPosition())}}return r?new ne(r.lineNumber,r.column,r.lineNumber,r.column):new ne(n.lineNumber,n.column,n.lineNumber,n.column)});this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach(n=>{const o=n.getStartPosition();let r=t.matchBracket(o);if(!r&&(r=t.findEnclosingBrackets(o),!r)){const d=t.findNextBracket(o);d&&d.range&&(r=t.matchBracket(d.range.getStartPosition()))}let a=null,l=null;if(r){r.sort(S.compareRangesUsingStarts);const[d,h]=r;if(a=e?d.getStartPosition():d.getEndPosition(),l=e?h.getEndPosition():h.getStartPosition(),h.containsPosition(o)){const c=a;a=l,l=c}}a&&l&&i.push(new ne(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(const i of this._lastBracketsData){let n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations=this._editor.deltaDecorations(this._decorations,e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);let o=[],r=0;for(let c=0,u=e.length;c1&&o.sort(F.compare);let a=[],l=0,d=0,h=n.length;for(let c=0,u=o.length;c{const t=s.getColor(O6);t&&e.addRule(`.monaco-editor .bracket-match { background-color: ${t}; }`);const i=s.getColor(YO);i&&e.addRule(`.monaco-editor .bracket-match { border: 1px solid ${i}; }`)});ps.appendMenuItem(ae.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:p({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class XY{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,o=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&o===e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new S(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new S(i,o,i,o),a)}else{const r=new S(i,o,i,o+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new S(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new ne(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new ne(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class j2 extends oe{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let i=[],n=t.getSelections();for(const o of n)i.push(new XY(o,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class QY extends j2{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:p("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:E.writable})}}class JY extends j2{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:p("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:E.writable})}}ee(QY);ee(JY);class eX extends oe{constructor(){super({id:"editor.action.transposeLetters",label:p("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:E.writable,kbOpts:{kbExpr:E.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],o=t.getSelections();for(let r of o){if(!r.isEmpty())continue;let a=r.startLineNumber,l=r.startColumn,d=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&d===2))continue;let h=l===d?r.getPosition():Xe.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),c=Xe.leftPosition(i,h),u=Xe.leftPosition(i,c),f=i.getValueInRange(S.fromPositions(u,c)),g=i.getValueInRange(S.fromPositions(c,h)),m=S.fromPositions(u,h);n.push(new xi(m,g+f))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}ee(eX);var tX=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};const th="9_cutcopypaste",iX=uo||document.queryCommandSupported("cut"),K2=uo||document.queryCommandSupported("copy"),nX=typeof navigator.clipboard>"u"||rn?document.queryCommandSupported("paste"):!0;function oI(s){return s.register(),s}const sX=iX?oI(new Ou({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:uo?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:p({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:ae.EditorContext,group:th,title:p("actions.clipboard.cutLabel","Cut"),when:E.writable,order:1},{menuId:ae.CommandPalette,group:"",title:p("actions.clipboard.cutLabel","Cut"),order:1},{menuId:ae.SimpleEditorContext,group:th,title:p("actions.clipboard.cutLabel","Cut"),when:E.writable,order:1}]})):void 0,oX=K2?oI(new Ou({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:uo?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:p({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:ae.EditorContext,group:th,title:p("actions.clipboard.copyLabel","Copy"),order:2},{menuId:ae.CommandPalette,group:"",title:p("actions.clipboard.copyLabel","Copy"),order:1},{menuId:ae.SimpleEditorContext,group:th,title:p("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;ps.appendMenuItem(ae.MenubarEditMenu,{submenu:ae.MenubarCopy,title:{value:p("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});ps.appendMenuItem(ae.EditorContext,{submenu:ae.EditorContextCopy,title:{value:p("copy as","Copy As"),original:"Copy As"},group:th,order:3});const cS=nX?oI(new Ou({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:uo?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:ae.MenubarEditMenu,group:"2_ccp",title:p({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:ae.EditorContext,group:th,title:p("actions.clipboard.pasteLabel","Paste"),when:E.writable,order:4},{menuId:ae.CommandPalette,group:"",title:p("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:ae.SimpleEditorContext,group:th,title:p("actions.clipboard.pasteLabel","Paste"),when:E.writable,order:4}]})):void 0;class rX extends oe{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:p("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:E.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(32)&&t.getSelection().isEmpty()||(Ay.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),Ay.forceCopyWithSyntaxHighlighting=!1)}}function q2(s,e){s&&(s.addImplementation(1e4,"code-editor",(t,i)=>{const n=t.get(tt).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const o=n.getOption(32),r=n.getSelection();return r&&r.isEmpty()&&!o||document.execCommand(e),!0}return!1}),s.addImplementation(0,"generic-dom",(t,i)=>(document.execCommand(e),!0)))}q2(sX,"cut");q2(oX,"copy");cS&&(cS.addImplementation(1e4,"code-editor",(s,e)=>{const t=s.get(tt),i=s.get(Rl),n=t.getFocusedCodeEditor();return n&&n.hasTextFocus()?!document.execCommand("paste")&&Tu?tX(void 0,void 0,void 0,function*(){const r=yield i.readText();if(r!==""){const a=Bg.INSTANCE.get(r);let l=!1,d=null,h=null;a&&(l=n.getOption(32)&&!!a.isFromEmptySelection,d=typeof a.multicursorText<"u"?a.multicursorText:null,h=a.mode),n.trigger("keyboard","paste",{text:r,pasteOnNewLine:l,multicursorText:d,mode:h})}}):!0:!1}),cS.addImplementation(0,"generic-dom",(s,e)=>(document.execCommand("paste"),!0)));K2&&ee(rX);class AC{constructor(e){this.executor=e,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}class We{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||this.value===""||e.value.startsWith(this.value+We.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new We(this.value+We.sep+e)}}We.sep=".";We.None=new We("@@none@@");We.Empty=new We("");We.QuickFix=new We("quickfix");We.Refactor=new We("refactor");We.Source=new We("source");We.SourceOrganizeImports=We.Source.append("organizeImports");We.SourceFixAll=We.Source.append("fixAll");function aX(s,e){return!(s.include&&!s.include.intersects(e)||s.excludes&&s.excludes.some(t=>G2(e,t,s.include))||!s.includeSourceActions&&We.Source.contains(e))}function lX(s,e){const t=e.kind?new We(e.kind):void 0;return!(s.include&&(!t||!s.include.contains(t))||s.excludes&&t&&s.excludes.some(i=>G2(t,i,s.include))||!s.includeSourceActions&&t&&We.Source.contains(t)||s.onlyIncludePreferredActions&&!e.isPreferred)}function G2(s,e,t){return!(!e.contains(s)||t&&e.contains(t))}class Jo{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return!e||typeof e!="object"?new Jo(t.kind,t.apply,!1):new Jo(Jo.getKindFromUser(e,t.kind),Jo.getApplyFromUser(e,t.apply),Jo.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new We(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}}var rI=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};const Z2="editor.action.codeAction",Y2="editor.action.refactor",X2="editor.action.sourceAction",aI="editor.action.organizeImports",lI="editor.action.fixAll";class Q2{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return rI(this,void 0,void 0,function*(){if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let i;try{i=yield this.provider.resolveCodeAction(this.action,e)}catch(n){Di(n)}i&&(this.action.edit=i.edit)}return this})}}class dI extends H{constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(dI.codeActionsComparator),this.validActions=this.allActions.filter(({action:n})=>!n.disabled)}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:Tn(e.diagnostics)?Tn(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:Tn(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&We.QuickFix.contains(new We(e.kind))&&!!e.isPreferred)}}const XT={actions:[],documentation:void 0};function hI(s,e,t,i,n){var o;const r=t.filter||{},a={only:(o=r.include)===null||o===void 0?void 0:o.value,trigger:t.type},l=new Sk(s,n),d=dX(s,r),h=new X,c=d.map(f=>rI(this,void 0,void 0,function*(){try{i.report(f);const g=yield f.provideCodeActions(s,e,a,l.token);if(g&&h.add(g),l.token.isCancellationRequested)return XT;const m=((g==null?void 0:g.actions)||[]).filter(C=>C&&lX(r,C)),_=hX(f,m,r.include);return{actions:m.map(C=>new Q2(C,f)),documentation:_}}catch(g){if(br(g))throw g;return Di(g),XT}})),u=ar.onDidChange(()=>{const f=ar.all(s);zs(f,d)||l.cancel()});return Promise.all(c).then(f=>{const g=Cx(f.map(_=>_.actions)),m=wh(f.map(_=>_.documentation));return new dI(g,m,h)}).finally(()=>{u.dispose(),l.dispose()})}function dX(s,e){return ar.all(s).filter(t=>t.providedCodeActionKinds?t.providedCodeActionKinds.some(i=>aX(e,new We(i))):!0)}function hX(s,e,t){if(!s.documentation)return;const i=s.documentation.map(n=>({kind:new We(n.kind),command:n.command}));if(t){let n;for(const o of i)o.kind.contains(t)&&(n?n.kind.contains(o.kind)&&(n=o):n=o);if(n)return n==null?void 0:n.command}for(const n of e)if(n.kind){for(const o of i)if(o.kind.contains(new We(n.kind)))return o.command}}$e.registerCommand("_executeCodeActionProvider",function(s,e,t,i,n){return rI(this,void 0,void 0,function*(){if(!(e instanceof me))throw fo();const o=s.get(ri).getModel(e);if(!o)throw fo();const r=ne.isISelection(t)?ne.liftSelection(t):S.isIRange(t)?o.validateRange(t):void 0;if(!r)throw fo();const a=typeof i=="string"?new We(i):void 0,l=yield hI(o,r,{type:1,filter:{includeSourceActions:!0,include:a}},kh.None,Oe.None),d=[],h=Math.min(l.validActions.length,typeof n=="number"?n:0);for(let c=0;cc.action)}finally{setTimeout(()=>l.dispose(),100)}})});var cX=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},uX=function(s,e){return function(t,i){e(t,i,s)}};let is=class RL{constructor(e,t){this._messageWidget=new dn,this._messageListeners=new X,this._editor=e,this._visible=RL.MESSAGE_VISIBLE.bindTo(t),this._editorListener=this._editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit())}static get(e){return e.getContribution(RL.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Ei(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new QT(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(new hn(()=>this.closeMessage(),3e3));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(i?i.containsPosition(n.target.position)||this.closeMessage():i=new S(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(QT.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(p("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())}};is.ID="editor.contrib.messageController";is.MESSAGE_VISIBLE=new re("messageVisible",!1,p("messageVisible","Whether the editor is currently showing an inline message"));is=cX([uX(1,ve)],is);const fX=Mi.bindToContribution(is.get);J(new fX({id:"leaveEditorMessage",precondition:is.MESSAGE_VISIBLE,handler:s=>s.closeMessage(),kbOpts:{weight:130,primary:9}}));let QT=class{constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const r=document.createElement("div");r.classList.add("message"),r.textContent=n,this._domNode.appendChild(r);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){let t;const i=()=>{e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",i)};return t=setTimeout(i,110),e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};nt(is.ID,is);st((s,e)=>{const t=s.getColor(Qx);if(t){let o=s.type===gs.HIGH_CONTRAST?2:1;e.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${t}; }`),e.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${t}; }`),e.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${o}px solid ${t}; }`)}const i=s.getColor(Yx);i&&e.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${i}; }`);const n=s.getColor(Xx);n&&e.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${n}; }`)});var gX=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},JT=function(s,e){return function(t,i){e(t,i,s)}},pX=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};class eA extends Us{constructor(e,t){super(e.command?e.command.id:e.title,mX(e.title),void 0,!e.disabled,t),this.action=e}}function mX(s){return s.replace(/\r\n|\r|\n/g," ")}let ML=class extends H{constructor(e,t,i,n){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._visible=!1,this._showingActions=this._register(new dn),this._keybindingResolver=new iw({getKeybindings:()=>n.getKeybindings()})}get isVisible(){return this._visible}show(e,t,i,n){return pX(this,void 0,void 0,function*(){const o=n.includeDisabledActions?t.allActions:t.validActions;if(!o.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,Ru();this._visible=!0,this._showingActions.value=t;const r=this.getMenuActions(e,o,t.documentation),a=F.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},l=this._keybindingResolver.getResolver(),d=this._editor.getOption(113);this._contextMenuService.showContextMenu({domForShadowRoot:d?this._editor.getDomNode():void 0,getAnchor:()=>a,getActions:()=>r,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:h=>h instanceof eA?l(h.action):void 0})})}getMenuActions(e,t,i){var n,o;const r=h=>new eA(h.action,()=>this._delegate.onSelectCodeAction(h)),a=t.map(r),l=[...i],d=this._editor.getModel();if(d&&a.length)for(const h of ar.all(d))h._getAdditionalMenuItems&&l.push(...h._getAdditionalMenuItems({trigger:e.type,only:(o=(n=e.filter)===null||n===void 0?void 0:n.include)===null||o===void 0?void 0:o.value},t.map(c=>c.action)));return l.length&&a.push(new $s,...l.map(h=>r(new Q2({title:h.title,command:h},void 0)))),a}_toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=Ii(this._editor.getDomNode()),n=i.left+t.left,o=i.top+t.top+t.height;return{x:n,y:o}}};ML=gX([JT(2,Al),JT(3,Nt)],ML);class iw{constructor(e){this._keybindingProvider=e}getResolver(){const e=new AC(()=>this._keybindingProvider.getKeybindings().filter(t=>iw.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===aI?i={kind:We.SourceOrganizeImports.value}:t.command===lI&&(i={kind:We.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},Jo.fromUser(i,{kind:We.None,apply:"never"}))}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return i==null?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new We(e.kind);return t.filter(n=>n.kind.contains(i)).filter(n=>n.preferred?e.isPreferred:!0).reduceRight((n,o)=>n?n.kind.contains(o.kind)?o:n:o,void 0)}}iw.codeActionCommands=[Y2,Z2,X2,aI,lI];var _X=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},bX=function(s,e){return function(t,i){e(t,i,s)}},ug;(function(s){s.Hidden={type:0};class e{constructor(i,n,o,r){this.actions=i,this.trigger=n,this.editorPosition=o,this.widgetPosition=r,this.type=1}}s.Showing=e})(ug||(ug={}));let RC=class J2 extends H{constructor(e,t,i,n){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new M),this.onClick=this._onClick.event,this._state=ug.Hidden,this._domNode=document.createElement("div"),this._domNode.className=ie.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(o=>{const r=this._editor.getModel();(this.state.type!==1||!r||this.state.editorPosition.lineNumber>=r.getLineCount())&&this.hide()})),lt.ignoreTarget(this._domNode),this._register(a3(this._domNode,o=>{if(this.state.type!==1)return;this._editor.focus(),o.preventDefault();const{top:r,height:a}=Ii(this._domNode),l=this._editor.getOption(58);let d=Math.floor(l/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{if((o.buttons&1)!==1)return;this.hide();const r=new Dh;r.startMonitoring(o.target,o.buttons,Pu,()=>{},()=>{r.dispose()})})),this._register(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(56)&&!this._editor.getOption(56).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();const n=this._editor.getOptions();if(!n.get(56).enabled)return this.hide();const o=this._editor.getModel();if(!o)return this.hide();const{lineNumber:r,column:a}=o.validatePosition(i),l=o.getOptions().tabSize,d=n.get(43),h=o.getLineContent(r),c=Rn.computeIndentLevel(h,l),u=d.spaceWidth*c>22,f=m=>m>2&&this._editor.getTopForLineNumber(m)===this._editor.getTopForLineNumber(m-1);let g=r;if(!u){if(r>1&&!f(r-1))g-=1;else if(!f(r+1))g+=1;else if(a*d.spaceWidth<22)return this.hide()}this.state=new ug.Showing(e,t,i,{position:{lineNumber:g,column:1},preference:J2._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=ug.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...ie.lightBulb.classNamesArray),this._domNode.classList.add(...ie.lightbulbAutofix.classNamesArray);const t=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(t){this.title=p("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",t.getLabel());return}}this._domNode.classList.remove(...ie.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...ie.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);e?this.title=p("codeActionWithKb","Show Code Actions ({0})",e.getLabel()):this.title=p("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};RC._posPref=[0];RC=_X([bX(3,Nt)],RC);st((s,e)=>{var t;const i=(t=s.getColor(ms))===null||t===void 0?void 0:t.transparent(.7),n=s.getColor(M9);n&&e.addRule(` .monaco-editor .contentWidgets ${ie.lightBulb.cssSelector} { color: ${n}; background-color: ${i}; @@ -764,7 +764,7 @@ Please report this to https://github.com/markedjs/marked.`,V.silent)return"

An `):s}function vR(s){return typeof s.code=="string"&&typeof s.errno=="number"&&typeof s.syscall=="string"?p("nodeExceptionMessage","A system error occurred ({0})",s.message):s.message||p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function kB(s=null,e=!1){if(!s)return p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(s)){const t=wh(s),i=kB(t[0],e);return t.length>1?p("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(Gs(s))return s;if(s.detail){const t=s.detail;if(t.error)return jS(t.error,e);if(t.exception)return jS(t.exception,e)}return s.stack?jS(s,e):s.message?s.message:p("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var p_=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})},Ec;(function(s){s[s.NO_ACTION=0]="NO_ACTION",s[s.CLOSE_PICKER=1]="CLOSE_PICKER",s[s.REFRESH_PICKER=2]="REFRESH_PICKER",s[s.REMOVE_ITEM=3]="REMOVE_ITEM"})(Ec||(Ec={}));function KS(s){const e=s;return Array.isArray(e.items)}function pre(s){const e=s;return!!e.picks&&e.additionalPicks instanceof Promise}class Ow extends H{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t){var i;const n=new X;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let o;const r=n.add(new dn),a=()=>p_(this,void 0,void 0,function*(){const l=r.value=new X;o==null||o.dispose(!0),e.busy=!1,o=new ln(t);const d=o.token,h=e.value.substr(this.prefix.length).trim(),c=this._getPicks(h,l,d),u=(f,g)=>{var m;let _,C;if(KS(f)?(_=f.items,C=f.active):_=f,_.length===0){if(g)return!1;h.length>0&&(!((m=this.options)===null||m===void 0)&&m.noResultsPick)&&(_=[this.options.noResultsPick])}return e.items=_,C&&(e.activeItems=[C]),!0};if(c!==null)if(pre(c)){let f=!1,g=!1;yield Promise.all([p_(this,void 0,void 0,function*(){yield rl(Ow.FAST_PICKS_RACE_DELAY),!d.isCancellationRequested&&(g||(f=u(c.picks,!0)))}),p_(this,void 0,void 0,function*(){e.busy=!0;try{const m=yield c.additionalPicks;if(d.isCancellationRequested)return;let _,C;KS(c.picks)?(_=c.picks.items,C=c.picks.active):_=c.picks;let b,v;if(KS(m)?(b=m.items,v=m.active):b=m,b.length>0||!f){let w;if(!C&&!v){const y=e.activeItems[0];y&&_.indexOf(y)!==-1&&(w=y)}u({items:[..._,...b],active:C||v||w})}}finally{d.isCancellationRequested||(e.busy=!1),g=!0}})])}else if(!(c instanceof Promise))u(c);else{e.busy=!0;try{const f=yield c;if(d.isCancellationRequested)return;u(f)}finally{d.isCancellationRequested||(e.busy=!1)}}});return n.add(e.onDidChangeValue(()=>a())),a(),n.add(e.onDidAccept(l=>{const[d]=e.selectedItems;typeof(d==null?void 0:d.accept)=="function"&&(l.inBackground||e.hide(),d.accept(e.keyMods,l))})),n.add(e.onDidTriggerItemButton(({button:l,item:d})=>p_(this,void 0,void 0,function*(){var h,c;if(typeof d.trigger=="function"){const u=(c=(h=d.buttons)===null||h===void 0?void 0:h.indexOf(l))!==null&&c!==void 0?c:-1;if(u>=0){const f=d.trigger(u,e.keyMods),g=typeof f=="number"?f:yield f;if(t.isCancellationRequested)return;switch(g){case Ec.NO_ACTION:break;case Ec.CLOSE_PICKER:e.hide();break;case Ec.REFRESH_PICKER:a();break;case Ec.REMOVE_ITEM:const m=e.items.indexOf(d);if(m!==-1){const _=e.items.slice(),C=_.splice(m,1),b=e.activeItems.filter(w=>w!==C[0]),v=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=_,b&&(e.activeItems=b),e.keepScrollPosition=v}break}}}}))),n}}Ow.FAST_PICKS_RACE_DELAY=200;var IB=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},hd=function(s,e){return function(t,i){e(t,i,s)}},wR=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};let Ip=class eb extends Ow{constructor(e,t,i,n,o,r){super(eb.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=o,this.dialogService=r,this.commandsHistory=this._register(this.instantiationService.createInstance(mh)),this.options=e}_getPicks(e,t,i){return wR(this,void 0,void 0,function*(){const n=yield this.getCommandPicks(t,i);if(i.isCancellationRequested)return[];const o=[];for(const d of n){const h=qn(eb.WORD_FILTER(e,d.label)),c=d.commandAlias?qn(eb.WORD_FILTER(e,d.commandAlias)):void 0;h||c?(d.highlights={label:h,detail:this.options.showAlias?c:void 0},o.push(d)):e===d.commandId&&o.push(d)}const r=new Map;for(const d of o){const h=r.get(d.label);h?(d.description=d.commandId,h.description=h.commandId):r.set(d.label,d)}o.sort((d,h)=>{const c=this.commandsHistory.peek(d.commandId),u=this.commandsHistory.peek(h.commandId);return c&&u?c>u?-1:1:c?-1:u?1:d.label.localeCompare(h.label)});const a=[];let l=!1;for(let d=0;dwR(this,void 0,void 0,function*(){this.commandsHistory.push(h.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:h.commandId,from:"quick open"});try{yield this.commandService.executeCommand(h.commandId)}catch(f){br(f)||this.dialogService.show(Wt.Error,p("canNotRun","Command '{0}' resulted in an error ({1})",h.label,kB(f)))}})}))}return a})}};Ip.PREFIX=">";Ip.WORD_FILTER=Ek(Ov,vK,WP);Ip=IB([hd(1,Ge),hd(2,Nt),hd(3,Yt),hd(4,Nl),hd(5,Kp)],Ip);let mh=class ai extends H{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=ai.getConfiguredCommandHistoryLength(this.configurationService),ai.cache&&ai.cache.limit!==this.configuredCommandsHistoryLength&&(ai.cache.limit=this.configuredCommandsHistoryLength,ai.saveState(this.storageService))}load(){const e=this.storageService.get(ai.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch{}const i=ai.cache=new Il(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((o,r)=>o.value-r.value),n.forEach(o=>i.set(o.key,o.value))}ai.counter=this.storageService.getNumber(ai.PREF_KEY_COUNTER,0,ai.counter)}push(e){ai.cache&&(ai.cache.set(e,ai.counter++),ai.saveState(this.storageService))}peek(e){var t;return(t=ai.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!ai.cache)return;const t={usesLRU:!0,entries:[]};ai.cache.forEach((i,n)=>t.entries.push({key:n,value:i})),e.store(ai.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(ai.PREF_KEY_COUNTER,ai.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,i;const o=(i=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||i===void 0?void 0:i.history;return typeof o=="number"?o:ai.DEFAULT_COMMANDS_HISTORY_LENGTH}};mh.DEFAULT_COMMANDS_HISTORY_LENGTH=50;mh.PREF_KEY_CACHE="commandPalette.mru.cache";mh.PREF_KEY_COUNTER="commandPalette.mru.counter";mh.counter=1;mh=IB([hd(0,yr),hd(1,Ht)],mh);class mre extends Ip{constructor(e,t,i,n,o,r){super(e,t,i,n,o,r)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:GP(i.label)||i.id});return t}}var _re=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},lc=function(s,e){return function(t,i){e(t,i,s)}},bre=function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};let Ep=class extends mre{constructor(e,t,i,n,o,r){super({showAlias:!1},e,i,n,o,r),this.codeEditorService=t}get activeTextEditorControl(){return qn(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return bre(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}};Ep=_re([lc(0,Ge),lc(1,tt),lc(2,Nt),lc(3,Yt),lc(4,Nl),lc(5,Kp)],Ep);Xt.as(Ah.Quickaccess).registerQuickAccessProvider({ctor:Ep,prefix:Ep.PREFIX,helpEntries:[{description:Hb.quickCommandHelp,needsEditor:!0}]});class Cre extends oe{constructor(){super({id:"editor.action.quickCommand",label:Hb.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:E.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(Ml).quickAccess.show(Ep.PREFIX)}}ee(Cre);var vre=function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},dc=function(s,e){return function(t,i){e(t,i,s)}};let BD=class extends wl{constructor(e,t,i,n,o,r,a){super(!0,e,t,i,n,o,r,a)}};BD=vre([dc(1,ve),dc(2,tt),dc(3,ni),dc(4,Ge),dc(5,yr),dc(6,Ht)],BD);nt(wl.ID,BD);class wre extends oe{constructor(){super({id:"editor.action.toggleHighContrast",label:py.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(Ih);this._originalThemeName?(i.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=i.getColorTheme().themeName,i.setTheme("hc-black"))}}ee(wre);const ple=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:uY,Emitter:pu,KeyCode:fY,KeyMod:gY,MarkerSeverity:CY,MarkerTag:vY,Position:pY,Range:mY,Selection:_Y,SelectionDirection:bY,Token:SY,Uri:wY,editor:yY,languages:on},Symbol.toStringTag,{value:"Module"}));export{vY as M,mY as R,wY as U,CY as a,ple as b,yY as e,on as l,M2 as t}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["assets/tsMode-DDE-1NRs.js","assets/index-B4ouchdD.js","assets/index-CYnGJR9k.css","assets/cssMode-BXyGtfi-.js","assets/jsonMode-nuEbFdwa.js","assets/htmlMode-DoczOHPa.js","assets/handlebars-5MWJYwBX.js","assets/html-xJfJX0-n.js","assets/javascript-5SbqB3Bt.js","assets/typescript-pkxEcGpK.js","assets/liquid-DThbe4kJ.js","assets/python-B7vJgDf7.js","assets/razor-DVRmGTba.js","assets/xml-CjTdprsw.js"] + __vite__mapDeps.viteFileDeps = ["assets/tsMode-zxqcXIbW.js","assets/index-5zY5TMAp.js","assets/index-Ct-2Rvz_.css","assets/cssMode-C9EIlsuu.js","assets/jsonMode-Bv4GarVJ.js","assets/htmlMode-xuNzmemc.js","assets/handlebars-C1nVRnNW.js","assets/html-D-6iRZaq.js","assets/javascript-DCZNW9t7.js","assets/typescript-3xYj8q83.js","assets/liquid-BsAcyCib.js","assets/python-CqWPWcCu.js","assets/razor-5aWRmidA.js","assets/xml-CPUo3pfG.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/admin-views/dist/assets/editor.main-CrWz42xi.js.gz b/admin-views/dist/assets/editor.main-CrWz42xi.js.gz new file mode 100644 index 00000000..99ead412 Binary files /dev/null and b/admin-views/dist/assets/editor.main-CrWz42xi.js.gz differ diff --git a/admin-views/dist/assets/editor.main-x561mIg5.js.gz b/admin-views/dist/assets/editor.main-x561mIg5.js.gz deleted file mode 100644 index a1ffc0d9..00000000 Binary files a/admin-views/dist/assets/editor.main-x561mIg5.js.gz and /dev/null differ diff --git a/admin-views/dist/assets/exceljs.min-Boo_2_59.js b/admin-views/dist/assets/exceljs.min-BhWLMZIL.js similarity index 99% rename from admin-views/dist/assets/exceljs.min-Boo_2_59.js rename to admin-views/dist/assets/exceljs.min-BhWLMZIL.js index 41e8040a..05fc99fd 100644 --- a/admin-views/dist/assets/exceljs.min-Boo_2_59.js +++ b/admin-views/dist/assets/exceljs.min-BhWLMZIL.js @@ -1,4 +1,4 @@ -import{p as Ve,q as Kt,s as De}from"./index-B4ouchdD.js";function qe(Ee,Fe){for(var s=0;sT[S]})}}}return Object.freeze(Object.defineProperty(Ee,Symbol.toStringTag,{value:"Module"}))}var $e={exports:{}};/*! ExcelJS 19-10-2023 */(function(Ee,Fe){(function(s){Ee.exports=s()})(function(){return function s(T,S,m){function o(t,e){if(!S[t]){if(!T[t]){var l=typeof De=="function"&&De;if(!e&&l)return l(t,!0);if(a)return a(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var i=S[t]={exports:{}};T[t][0].call(i.exports,function(c){return o(T[t][1][c]||c)},i,i.exports,s,T,S,m)}return S[t].exports}for(var a=typeof De=="function"&&De,r=0;r{const d=this.workbook.addWorksheet(c.sheetName),f=c.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],w=c.map||function(A){if(A==="")return null;const N=Number(A);if(!Number.isNaN(N)&&N!==1/0)return N;const L=f.reduce((P,D)=>{if(P)return P;const $=t(A,D,!0);return $.isValid()?$:null},null);if(L)return new Date(L.valueOf());const j=n[A];return j!==void 0?j:A},_=o.parse(c.parserOptions).on("data",A=>{d.addRow(A.map(w))}).on("end",()=>{_.emit("worksheet",d)});_.on("worksheet",h).on("error",u),i.pipe(_)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(i,c){return new Promise((h,u)=>{c=c||{};const d=this.workbook.getWorksheet(c.sheetName||c.sheetId),f=o.format(c.formatterOptions);i.on("finish",()=>{h()}),f.on("error",u),f.pipe(i);const{dateFormat:w,dateUTC:_}=c,A=c.map||(j=>{if(j){if(j.text||j.hyperlink)return j.hyperlink||j.text||"";if(j.formula||j.result)return j.result||"";if(j instanceof Date)return w?_?t.utc(j).format(w):t(j).format(w):_?t.utc(j).format():t(j).format();if(j.error)return j.error;if(typeof j=="object")return JSON.stringify(j)}return j}),N=c.includeEmptyRows===void 0||c.includeEmptyRows;let L=1;d&&d.eachRow((j,P)=>{if(N)for(;L++2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=r,t)if(typeof t=="string"){const l=m.decodeAddress(t);this.nativeCol=l.col+e,this.nativeColOff=0,this.nativeRow=l.row+e,this.nativeRowOff=0}else t.nativeCol!==void 0?(this.nativeCol=t.nativeCol||0,this.nativeColOff=t.nativeColOff||0,this.nativeRow=t.nativeRow||0,this.nativeRowOff=t.nativeRowOff||0):t.col!==void 0?(this.col=t.col+e,this.row=t.row+e):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(r){return r instanceof o||r==null?r:new o(r)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(r){this.nativeCol=Math.floor(r),this.nativeColOff=Math.floor((r-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(r){this.nativeRow=Math.floor(r),this.nativeRowOff=Math.floor((r-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(r){this.nativeCol=r.nativeCol,this.nativeColOff=r.nativeColOff,this.nativeRow=r.nativeRow,this.nativeRowOff=r.nativeRowOff}}T.exports=o},{"../utils/col-cache":19}],3:[function(s,T,S){const m=s("../utils/col-cache"),o=s("../utils/under-dash"),a=s("./enums"),{slideFormula:r}=s("../utils/shared-formula"),t=s("./note");class e{constructor(i,c,h){if(!i||!c)throw new Error("A Cell needs a Row");this._row=i,this._column=c,m.validateAddress(h),this._address=h,this._value=l.create(e.Types.Null,this),this.style=this._mergeStyle(i.style,c.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(i){this.style.numFmt=i}get font(){return this.style.font}set font(i){this.style.font=i}get alignment(){return this.style.alignment}set alignment(i){this.style.alignment=i}get border(){return this.style.border}set border(i){this.style.border=i}get fill(){return this.style.fill}set fill(i){this.style.fill=i}get protection(){return this.style.protection}set protection(i){this.style.protection=i}_mergeStyle(i,c,h){const u=i&&i.numFmt||c&&c.numFmt;u&&(h.numFmt=u);const d=i&&i.font||c&&c.font;d&&(h.font=d);const f=i&&i.alignment||c&&c.alignment;f&&(h.alignment=f);const w=i&&i.border||c&&c.border;w&&(h.border=w);const _=i&&i.fill||c&&c.fill;_&&(h.fill=_);const A=i&&i.protection||c&&c.protection;return A&&(h.protection=A),h}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===e.Types.Merge}merge(i,c){this._value.release(),this._value=l.create(e.Types.Merge,this,i),c||(this.style=i.style)}unmerge(){this.type===e.Types.Merge&&(this._value.release(),this._value=l.create(e.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(i){return this._value.type===e.Types.Merge&&this._value.isMergedTo(i)}get master(){return this.type===e.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===e.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(i){this.type!==e.Types.Merge?(this._value.release(),this._value=l.create(l.getType(i),this,i)):this._value.master.value=i}get note(){return this._comment&&this._comment.note}set note(i){this._comment=new t(i)}get text(){return this._value.toString()}get html(){return o.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(i){this.type===e.Types.String&&(this._value=l.create(e.Types.Hyperlink,this,{text:this._value.value,hyperlink:i}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:i}=this._row;return{sheetName:i.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(i){this.names=[i]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(i){const{definedNames:c}=this.workbook;c.removeAllNames(this.fullAddress),i.forEach(h=>{c.addEx(this.fullAddress,h)})}addName(i){this.workbook.definedNames.addEx(this.fullAddress,i)}removeName(i){this.workbook.definedNames.removeEx(this.fullAddress,i)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(i){this._dataValidations.add(this.address,i)}get model(){const{model:i}=this._value;return i.style=this.style,this._comment&&(i.comment=this._comment.model),i}set model(i){if(this._value.release(),this._value=l.create(i.type,this),this._value.model=i,i.comment)switch(i.comment.type){case"note":this._comment=t.fromModel(i.comment)}i.style?this.style=i.style:this.style={}}}e.Types=a.ValueType;const l={getType:n=>n==null?e.Types.Null:n instanceof String||typeof n=="string"?e.Types.String:typeof n=="number"?e.Types.Number:typeof n=="boolean"?e.Types.Boolean:n instanceof Date?e.Types.Date:n.text&&n.hyperlink?e.Types.Hyperlink:n.formula||n.sharedFormula?e.Types.Formula:n.richText?e.Types.RichText:n.sharedString?e.Types.SharedString:n.error?e.Types.Error:e.Types.JSON,types:[{t:e.Types.Null,f:class{constructor(n){this.model={address:n.address,type:e.Types.Null}}get value(){return null}set value(n){}get type(){return e.Types.Null}get effectiveType(){return e.Types.Null}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return""}release(){}toString(){return""}}},{t:e.Types.Number,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.Number,value:i}}get value(){return this.model.value}set value(n){this.model.value=n}get type(){return e.Types.Number}get effectiveType(){return e.Types.Number}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:e.Types.String,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.String,value:i}}get value(){return this.model.value}set value(n){this.model.value=n}get type(){return e.Types.String}get effectiveType(){return e.Types.String}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:e.Types.Date,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.Date,value:i}}get value(){return this.model.value}set value(n){this.model.value=n}get type(){return e.Types.Date}get effectiveType(){return e.Types.Date}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:e.Types.Hyperlink,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.Hyperlink,text:i?i.text:void 0,hyperlink:i?i.hyperlink:void 0},i&&i.tooltip&&(this.model.tooltip=i.tooltip)}get value(){const n={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(n.tooltip=this.model.tooltip),n}set value(n){this.model={text:n.text,hyperlink:n.hyperlink},n.tooltip&&(this.model.tooltip=n.tooltip)}get text(){return this.model.text}set text(n){this.model.text=n}get hyperlink(){return this.model.hyperlink}set hyperlink(n){this.model.hyperlink=n}get type(){return e.Types.Hyperlink}get effectiveType(){return e.Types.Hyperlink}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:e.Types.Formula,f:class{constructor(n,i){this.cell=n,this.model={address:n.address,type:e.Types.Formula,shareType:i?i.shareType:void 0,ref:i?i.ref:void 0,formula:i?i.formula:void 0,sharedFormula:i?i.sharedFormula:void 0,result:i?i.result:void 0}}_copyModel(n){const i={},c=h=>{const u=n[h];u&&(i[h]=u)};return c("formula"),c("result"),c("ref"),c("shareType"),c("sharedFormula"),i}get value(){return this._copyModel(this.model)}set value(n){this.model=this._copyModel(n)}validate(n){switch(l.getType(n)){case e.Types.Null:case e.Types.String:case e.Types.Number:case e.Types.Date:break;case e.Types.Hyperlink:case e.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(n){this.model.formula=n}get formulaType(){return this.model.formula?a.FormulaType.Master:this.model.sharedFormula?a.FormulaType.Shared:a.FormulaType.None}get result(){return this.model.result}set result(n){this.model.result=n}get type(){return e.Types.Formula}get effectiveType(){const n=this.model.result;return n==null?a.ValueType.Null:n instanceof String||typeof n=="string"?a.ValueType.String:typeof n=="number"?a.ValueType.Number:n instanceof Date?a.ValueType.Date:n.text&&n.hyperlink?a.ValueType.Hyperlink:n.formula?a.ValueType.Formula:a.ValueType.Null}get address(){return this.model.address}set address(n){this.model.address=n}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:n}=this.cell,i=n.findCell(this.model.sharedFormula);this._translatedFormula=i&&r(i.formula,i.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:e.Types.Merge,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.Merge,master:i?i.address:void 0},this._master=i,i&&i.addMergeRef()}get value(){return this._master.value}set value(n){n instanceof e?(this._master&&this._master.releaseMergeRef(),n.addMergeRef(),this._master=n):this._master.value=n}isMergedTo(n){return n===this._master}get master(){return this._master}get type(){return e.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:e.Types.JSON,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.String,value:JSON.stringify(i),rawValue:i}}get value(){return this.model.rawValue}set value(n){this.model.rawValue=n,this.model.value=JSON.stringify(n)}get type(){return e.Types.String}get effectiveType(){return e.Types.String}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:e.Types.SharedString,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.SharedString,value:i}}get value(){return this.model.value}set value(n){this.model.value=n}get type(){return e.Types.SharedString}get effectiveType(){return e.Types.SharedString}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:e.Types.RichText,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.String,value:i}}get value(){return this.model.value}set value(n){this.model.value=n}toString(){return this.model.value.richText.map(n=>n.text).join("")}get type(){return e.Types.RichText}get effectiveType(){return e.Types.RichText}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:e.Types.Boolean,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.Boolean,value:i}}get value(){return this.model.value}set value(n){this.model.value=n}get type(){return e.Types.Boolean}get effectiveType(){return e.Types.Boolean}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:e.Types.Error,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.Error,value:i}}get value(){return this.model.value}set value(n){this.model.value=n}get type(){return e.Types.Error}get effectiveType(){return e.Types.Error}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((n,i)=>(n[i.t]=i.f,n),[]),create(n,i,c){const h=this.types[n];if(!h)throw new Error("Could not create Value of type "+n);return new h(i,c)}};T.exports=e},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(s,T,S){const m=s("../utils/under-dash"),o=s("./enums"),a=s("../utils/col-cache");class r{constructor(e,l,n){this._worksheet=e,this._number=l,n!==!1&&(this.defn=n)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return a.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(e){e?(this.key=e.key,this.width=e.width!==void 0?e.width:9,this.outlineLevel=e.outlineLevel,e.style?this.style=e.style:this.style={},this.header=e.header,this._hidden=!!e.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(e){e!==void 0?(this._header=e,this.headers.forEach((l,n)=>{this._worksheet.getCell(n+1,this.number).value=l})):this._header=void 0}get key(){return this._key}set key(e){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=e,e&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(e){this._hidden=e}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(e){this._outlineLevel=e}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(e){return this.width===e.width&&this.hidden===e.hidden&&this.outlineLevel===e.outlineLevel&&m.isEqual(this.style,e.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;const e=this.style;return!e||!(e.font||e.numFmt||e.alignment||e.border||e.fill||e.protection)}get headerCount(){return this.headers.length}eachCell(e,l){const n=this.number;l||(l=e,e=null),this._worksheet.eachRow(e,(i,c)=>{l(i.getCell(n),c)})}get values(){const e=[];return this.eachCell((l,n)=>{l&&l.type!==o.ValueType.Null&&(e[n]=l.value)}),e}set values(e){if(!e)return;const l=this.number;let n=0;e.hasOwnProperty("0")&&(n=1),e.forEach((i,c)=>{this._worksheet.getCell(c+n,l).value=i})}_applyStyle(e,l){return this.style[e]=l,this.eachCell(n=>{n[e]=l}),l}get numFmt(){return this.style.numFmt}set numFmt(e){this._applyStyle("numFmt",e)}get font(){return this.style.font}set font(e){this._applyStyle("font",e)}get alignment(){return this.style.alignment}set alignment(e){this._applyStyle("alignment",e)}get protection(){return this.style.protection}set protection(e){this._applyStyle("protection",e)}get border(){return this.style.border}set border(e){this._applyStyle("border",e)}get fill(){return this.style.fill}set fill(e){this._applyStyle("fill",e)}static toModel(e){const l=[];let n=null;return e&&e.forEach((i,c)=>{i.isDefault?n&&(n=null):n&&i.equivalentTo(n)?n.max=c+1:(n={min:c+1,max:c+1,width:i.width!==void 0?i.width:9,style:i.style,isCustomWidth:i.isCustomWidth,hidden:i.hidden,outlineLevel:i.outlineLevel,collapsed:i.collapsed},l.push(n))}),l.length?l:void 0}static fromModel(e,l){const n=[];let i=1,c=0;for(l=(l=l||[]).sort(function(h,u){return h.min-u.min});c{l.removeCellEx(e)})}forEach(e){m.each(this.matrixMap,(l,n)=>{l.forEach(i=>{e(n,i)})})}getNames(e){return this.getNamesEx(o.decodeEx(e))}getNamesEx(e){return m.map(this.matrixMap,(l,n)=>l.findCellEx(e)&&n).filter(Boolean)}_explore(e,l){l.mark=!1;const{sheetName:n}=l,i=new r(l.row,l.col,l.row,l.col,n);let c,h;function u(f,w){const _=e.findCellAt(n,f,l.col);return!(!_||!_.mark)&&(i[w]=f,_.mark=!1,!0)}for(h=l.row-1;u(h,"top");h--);for(h=l.row+1;u(h,"bottom");h++);function d(f,w){const _=[];for(h=i.top;h<=i.bottom;h++){const A=e.findCellAt(n,h,f);if(!A||!A.mark)return!1;_.push(A)}i[w]=f;for(let A=0;A<_.length;A++)_[A].mark=!1;return!0}for(c=l.col-1;d(c,"left");c--);for(c=l.col+1;d(c,"right");c++);return i}getRanges(e,l){return(l=l||this.matrixMap[e])?(l.forEach(n=>{n.mark=!0}),{name:e,ranges:l.map(n=>n.mark&&this._explore(l,n)).filter(Boolean).map(n=>n.$shortRange)}):{name:e,ranges:[]}}normaliseMatrix(e,l){e.forEachInSheet(l,(n,i,c)=>{n&&(n.row===i&&n.col===c||(n.row=i,n.col=c,n.address=o.n2l(c)+i))})}spliceRows(e,l,n,i){m.each(this.matrixMap,c=>{c.spliceRows(e,l,n,i),this.normaliseMatrix(c,e)})}spliceColumns(e,l,n,i){m.each(this.matrixMap,c=>{c.spliceColumns(e,l,n,i),this.normaliseMatrix(c,e)})}get model(){return m.map(this.matrixMap,(e,l)=>this.getRanges(l,e)).filter(e=>e.ranges.length)}set model(e){const l=this.matrixMap={};e.forEach(n=>{const i=l[n.name]=new a;n.ranges.forEach(c=>{t.test(c.split("!").pop()||"")&&i.addCell(c)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(s,T,S){T.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(s,T,S){const m=s("../utils/col-cache"),o=s("./anchor");T.exports=class{constructor(a,r){this.worksheet=a,this.model=r}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(a){let{type:r,imageId:t,range:e,hyperlinks:l}=a;if(this.type=r,this.imageId=t,r==="image")if(typeof e=="string"){const n=m.decode(e);this.range={tl:new o(this.worksheet,{col:n.left,row:n.top},-1),br:new o(this.worksheet,{col:n.right,row:n.bottom},0),editAs:"oneCell"}}else this.range={tl:new o(this.worksheet,e.tl,0),br:e.br&&new o(this.worksheet,e.br,0),ext:e.ext,editAs:e.editAs,hyperlinks:l||e.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(s,T,S){const m=s("../utils/under-dash");class o{constructor(r){this.note=r}get model(){let r=null;switch(typeof this.note){case"string":r={type:"note",note:{texts:[{text:this.note}]}};break;default:r={type:"note",note:this.note}}return m.deepMerge({},o.DEFAULT_CONFIGS,r)}set model(r){const{note:t}=r,{texts:e}=t;e.length===1&&Object.keys(e[0]).length===1?this.note=e[0].text:this.note=t}static fromModel(r){const t=new o;return t.model=r,t}}o.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},T.exports=o},{"../utils/under-dash":26}],10:[function(s,T,S){const m=s("../utils/col-cache");class o{constructor(){this.decode(arguments)}setTLBR(r,t,e,l,n){if(arguments.length<4){const i=m.decodeAddress(r),c=m.decodeAddress(t);this.model={top:Math.min(i.row,c.row),left:Math.min(i.col,c.col),bottom:Math.max(i.row,c.row),right:Math.max(i.col,c.col),sheetName:e},this.setTLBR(i.row,i.col,c.row,c.col,n)}else this.model={top:Math.min(r,e),left:Math.min(t,l),bottom:Math.max(r,e),right:Math.max(t,l),sheetName:n}}decode(r){switch(r.length){case 5:this.setTLBR(r[0],r[1],r[2],r[3],r[4]);break;case 4:this.setTLBR(r[0],r[1],r[2],r[3]);break;case 3:this.setTLBR(r[0],r[1],r[2]);break;case 2:this.setTLBR(r[0],r[1]);break;case 1:{const t=r[0];if(t instanceof o)this.model={top:t.model.top,left:t.model.left,bottom:t.model.bottom,right:t.model.right,sheetName:t.sheetName};else if(t instanceof Array)this.decode(t);else if(t.top&&t.left&&t.bottom&&t.right)this.model={top:t.top,left:t.left,bottom:t.bottom,right:t.right,sheetName:t.sheetName};else{const e=m.decodeEx(t);e.top?this.model={top:e.top,left:e.left,bottom:e.bottom,right:e.right,sheetName:e.sheetName}:this.model={top:e.row,left:e.col,bottom:e.row,right:e.col,sheetName:e.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+r.length)}}get top(){return this.model.top||1}set top(r){this.model.top=r}get left(){return this.model.left||1}set left(r){this.model.left=r}get bottom(){return this.model.bottom||1}set bottom(r){this.model.bottom=r}get right(){return this.model.right||1}set right(r){this.model.right=r}get sheetName(){return this.model.sheetName}set sheetName(r){this.model.sheetName=r}get _serialisedSheetName(){const{sheetName:r}=this.model;return r?/^[a-zA-Z0-9]*$/.test(r)?r+"!":`'${r}'!`:""}expand(r,t,e,l){(!this.model.top||rthis.bottom)&&(this.bottom=e),(!this.model.right||l>this.right)&&(this.right=l)}expandRow(r){if(r){const{dimensions:t,number:e}=r;t&&this.expand(e,t.min,e,t.max)}}expandToAddress(r){const t=m.decodeEx(r);this.expand(t.row,t.col,t.row,t.col)}get tl(){return m.n2l(this.left)+this.top}get $t$l(){return`$${m.n2l(this.left)}$${this.top}`}get br(){return m.n2l(this.right)+this.bottom}get $b$r(){return`$${m.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&!(r.bottomthis.bottom)&&!(r.rightthis.right)}contains(r){const t=m.decodeEx(r);return this.containsEx(t)}containsEx(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&r.row>=this.top&&r.row<=this.bottom&&r.col>=this.left&&r.col<=this.right}forEachAddress(r){for(let t=this.left;t<=this.right;t++)for(let e=this.top;e<=this.bottom;e++)r(m.encodeAddress(e,t),e,t)}}T.exports=o},{"../utils/col-cache":19}],11:[function(s,T,S){const m=s("../utils/under-dash"),o=s("./enums"),a=s("../utils/col-cache"),r=s("./cell");T.exports=class{constructor(t,e){this._worksheet=t,this._number=e,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(t){return this._cells[t-1]}getCellEx(t){let e=this._cells[t.col-1];if(!e){const l=this._worksheet.getColumn(t.col);e=new r(this,l,t.address),this._cells[t.col-1]=e}return e}getCell(t){if(typeof t=="string"){const e=this._worksheet.getColumnKey(t);t=e?e.number:a.l2n(t)}return this._cells[t-1]||this.getCellEx({address:a.encodeAddress(this._number,t),row:this._number,col:t})}splice(t,e){const l=t+e;for(var n=arguments.length,i=new Array(n>2?n-2:0),c=2;c0)for(d=u;d>=l;d--)f=this._cells[d-1],f?(w=this.getCell(d+h),w.value=f.value,w.style=f.style,w._comment=f._comment):this._cells[d+h-1]=void 0;for(d=0;d{l&&l.type!==o.ValueType.Null&&e(l,n+1)})}addPageBreak(t,e){const l=this._worksheet,n=Math.max(0,t-1)||0,i=Math.max(0,e-1)||16838,c={id:this._number,max:i,man:1};n&&(c.min=n),l.rowBreaks.push(c)}get values(){const t=[];return this._cells.forEach(e=>{e&&e.type!==o.ValueType.Null&&(t[e.col]=e.value)}),t}set values(t){if(this._cells=[],t)if(t instanceof Array){let e=0;t.hasOwnProperty("0")&&(e=1),t.forEach((l,n)=>{l!==void 0&&(this.getCellEx({address:a.encodeAddress(this._number,n+e),row:this._number,col:n+e}).value=l)})}else this._worksheet.eachColumnKey((e,l)=>{t[l]!==void 0&&(this.getCellEx({address:a.encodeAddress(this._number,e.number),row:this._number,col:e.number}).value=t[l])})}get hasValues(){return m.some(this._cells,t=>t&&t.type!==o.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let t=0;return this.eachCell(()=>{t++}),t}get dimensions(){let t=0,e=0;return this._cells.forEach(l=>{l&&l.type!==o.ValueType.Null&&((!t||t>l.col)&&(t=l.col),e0?{min:t,max:e}:null}_applyStyle(t,e){return this.style[t]=e,this._cells.forEach(l=>{l&&(l[t]=e)}),e}get numFmt(){return this.style.numFmt}set numFmt(t){this._applyStyle("numFmt",t)}get font(){return this.style.font}set font(t){this._applyStyle("font",t)}get alignment(){return this.style.alignment}set alignment(t){this._applyStyle("alignment",t)}get protection(){return this.style.protection}set protection(t){this._applyStyle("protection",t)}get border(){return this.style.border}set border(t){this._applyStyle("border",t)}get fill(){return this.style.fill}set fill(t){this._applyStyle("fill",t)}get hidden(){return!!this._hidden}set hidden(t){this._hidden=t}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(t){this._outlineLevel=t}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){const t=[];let e=0,l=0;return this._cells.forEach(n=>{if(n){const i=n.model;i&&((!e||e>n.col)&&(e=n.col),l{switch(l.type){case r.Types.Merge:break;default:{let n;if(l.address)n=a.decodeAddress(l.address);else if(e){const{row:i}=e,c=e.col+1;n={row:i,col:c,address:a.encodeAddress(i,c),$col$row:`$${a.n2l(c)}$${i}`}}e=n,this.getCellEx(n).model=l;break}}}),t.height?this.height=t.height:delete this.height,this.hidden=t.hidden,this.outlineLevel=t.outlineLevel||0,this.style=t.style&&JSON.parse(JSON.stringify(t.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(s,T,S){const m=s("../utils/col-cache");class o{constructor(r,t,e){this.table=r,this.column=t,this.index=e}_set(r,t){this.table.cacheState(),this.column[r]=t}get name(){return this.column.name}set name(r){this._set("name",r)}get filterButton(){return this.column.filterButton}set filterButton(r){this.column.filterButton=r}get style(){return this.column.style}set style(r){this.column.style=r}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(r){this._set("totalsRowLabel",r)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(r){this._set("totalsRowFunction",r)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(r){this._set("totalsRowResult",r)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(r){this._set("totalsRowFormula",r)}}T.exports=class{constructor(a,r){this.worksheet=a,r&&(this.table=r,this.validate(),this.store())}getFormula(a){switch(a.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${a.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${a.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${a.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${a.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${a.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${a.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${a.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${a.name}])`;case"custom":return a.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+a.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){const{table:a}=this,r=(h,u,d)=>{h[u]===void 0&&(h[u]=d)};r(a,"headerRow",!0),r(a,"totalsRow",!1),r(a,"style",{}),r(a.style,"theme","TableStyleMedium2"),r(a.style,"showFirstColumn",!1),r(a.style,"showLastColumn",!1),r(a.style,"showRowStripes",!1),r(a.style,"showColumnStripes",!1);const t=(h,u)=>{if(!h)throw new Error(u)};t(a.ref,"Table must have ref"),t(a.columns,"Table must have column definitions"),t(a.rows,"Table must have row definitions"),a.tl=m.decodeAddress(a.ref);const{row:e,col:l}=a.tl;t(e>0,"Table must be on valid row"),t(l>0,"Table must be on valid col");const{width:n,filterHeight:i,tableHeight:c}=this;a.autoFilterRef=m.encode(e,l,e+i-1,l+n-1),a.tableRef=m.encode(e,l,e+c-1,l+n-1),a.columns.forEach((h,u)=>{t(h.name,`Column ${u} must have a name`),u===0?r(h,"totalsRowLabel","Total"):(r(h,"totalsRowFunction","none"),h.totalsRowFormula=this.getFormula(h))})}store(){const a=(i,c)=>{c&&Object.keys(c).forEach(h=>{i[h]=c[h]})},{worksheet:r,table:t}=this,{row:e,col:l}=t.tl;let n=0;if(t.headerRow){const i=r.getRow(e+n++);t.columns.forEach((c,h)=>{const{style:u,name:d}=c,f=i.getCell(l+h);f.value=d,a(f,u)})}if(t.rows.forEach(i=>{const c=r.getRow(e+n++);i.forEach((h,u)=>{const d=c.getCell(l+u);d.value=h,a(d,t.columns[u].style)})}),t.totalsRow){const i=r.getRow(e+n++);t.columns.forEach((c,h)=>{const u=i.getCell(l+h);if(h===0)u.value=c.totalsRowLabel;else{const d=this.getFormula(c);u.value=d?{formula:c.totalsRowFormula,result:c.totalsRowResult}:null}a(u,c.style)})}}load(a){const{table:r}=this,{row:t,col:e}=r.tl;let l=0;if(r.headerRow){const n=a.getRow(t+l++);r.columns.forEach((i,c)=>{n.getCell(e+c).value=i.name})}if(r.rows.forEach(n=>{const i=a.getRow(t+l++);n.forEach((c,h)=>{i.getCell(e+h).value=c})}),r.totalsRow){const n=a.getRow(t+l++);r.columns.forEach((i,c)=>{const h=n.getCell(e+c);c===0?h.value=i.totalsRowLabel:this.getFormula(i)&&(h.value={formula:i.totalsRowFormula,result:i.totalsRowResult})})}}get model(){return this.table}set model(a){this.table=a}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const a=m.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let r=0;r1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(a,r)}getColumn(a){const r=this.table.columns[a];return new o(this,r,a)}addColumn(a,r,t){this.cacheState(),t===void 0?(this.table.columns.push(a),this.table.rows.forEach((e,l)=>{e.push(r[l])})):(this.table.columns.splice(t,0,a),this.table.rows.forEach((e,l)=>{e.splice(t,0,r[l])}))}removeColumns(a){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(a,r),this.table.rows.forEach(t=>{t.splice(a,r)})}_assign(a,r,t){this.cacheState(),a[r]=t}get ref(){return this.table.ref}set ref(a){this._assign(this.table,"ref",a)}get name(){return this.table.name}set name(a){this.table.name=a}get displayName(){return this.table.displyName||this.table.name}set displayNamename(a){this.table.displayName=a}get headerRow(){return this.table.headerRow}set headerRow(a){this._assign(this.table,"headerRow",a)}get totalsRow(){return this.table.totalsRow}set totalsRow(a){this._assign(this.table,"totalsRow",a)}get theme(){return this.table.style.name}set theme(a){this.table.style.name=a}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(a){this.table.style.showFirstColumn=a}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(a){this.table.style.showLastColumn=a}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(a){this.table.style.showRowStripes=a}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(a){this.table.style.showColumnStripes=a}}},{"../utils/col-cache":19}],13:[function(s,T,S){const m=s("./worksheet"),o=s("./defined-names"),a=s("../xlsx/xlsx"),r=s("../csv/csv");T.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new o}get xlsx(){return this._xlsx||(this._xlsx=new a(this)),this._xlsx}get csv(){return this._csv||(this._csv=new r(this)),this._csv}get nextId(){for(let t=1;t(u&&u.orderNo)>h?u.orderNo:h,0),i=Object.assign({},e,{id:l,name:t,orderNo:n+1,workbook:this}),c=new m(i);return this._worksheets[l]=c,c}removeWorksheetEx(t){delete this._worksheets[t.id]}removeWorksheet(t){const e=this.getWorksheet(t);e&&e.destroy()}getWorksheet(t){return t===void 0?this._worksheets.find(Boolean):typeof t=="number"?this._worksheets[t]:typeof t=="string"?this._worksheets.find(e=>e&&e.name===t):void 0}get worksheets(){return this._worksheets.slice(1).sort((t,e)=>t.orderNo-e.orderNo).filter(Boolean)}eachSheet(t){this.worksheets.forEach(e=>{t(e,e.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(t){const e=this.media.length;return this.media.push(Object.assign({},t,{type:"image"})),e}getImage(t){return this.media[t]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(t=>t.model),sheets:this.worksheets.map(t=>t.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(t){this.creator=t.creator,this.lastModifiedBy=t.lastModifiedBy,this.lastPrinted=t.lastPrinted,this.created=t.created,this.modified=t.modified,this.company=t.company,this.manager=t.manager,this.title=t.title,this.subject=t.subject,this.keywords=t.keywords,this.category=t.category,this.description=t.description,this.language=t.language,this.revision=t.revision,this.contentStatus=t.contentStatus,this.properties=t.properties,this.calcProperties=t.calcProperties,this._worksheets=[],t.worksheets.forEach(e=>{const{id:l,name:n,state:i}=e,c=t.sheets&&t.sheets.findIndex(h=>h.id===l);(this._worksheets[l]=new m({id:l,name:n,orderNo:c,state:i,workbook:this})).model=e}),this._definedNames.model=t.definedNames,this.views=t.views,this._themes=t.themes,this.media=t.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(s,T,S){const m=s("../utils/under-dash"),o=s("../utils/col-cache"),a=s("./range"),r=s("./row"),t=s("./column"),e=s("./enums"),l=s("./image"),n=s("./table"),i=s("./data-validations"),c=s("../utils/encryptor"),{copyStyle:h}=s("../utils/copy-style");T.exports=class{constructor(u){u=u||{},this._workbook=u.workbook,this.id=u.id,this.orderNo=u.orderNo,this.name=u.name,this.state=u.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},u.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!u.pageSetup||!u.pageSetup.fitToWidth&&!u.pageSetup.fitToHeight||u.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},u.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},u.headerFooter),this.dataValidations=new i,this.views=u.views||[],this.autoFilter=u.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(u){if(u===void 0&&(u="sheet"+this.id),this._name!==u){if(typeof u!="string")throw new Error("The name has to be a string.");if(u==="")throw new Error("The name can't be empty.");if(u==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(u))throw new Error(`Worksheet name ${u} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(u))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+u);if(u&&u.length>31&&(console.warn(`Worksheet name ${u} exceeds 31 chars. This will be truncated`),u=u.substring(0,31)),this._workbook._worksheets.find(d=>d&&d.name.toLowerCase()===u.toLowerCase()))throw new Error("Worksheet name already exists: "+u);this._name=u}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const u=new a;return this._rows.forEach(d=>{if(d){const f=d.dimensions;f&&u.expand(d.number,f.min,d.number,f.max)}}),u}get columns(){return this._columns}set columns(u){this._headerRowCount=u.reduce((w,_)=>{const A=(_.header?1:_.headers&&_.headers.length)||0;return Math.max(w,A)},0);let d=1;const f=this._columns=[];u.forEach(w=>{const _=new t(this,d++,!1);f.push(_),_.defn=w})}getColumnKey(u){return this._keys[u]}setColumnKey(u,d){this._keys[u]=d}deleteColumnKey(u){delete this._keys[u]}eachColumnKey(u){m.each(this._keys,u)}getColumn(u){if(typeof u=="string"){const d=this._keys[u];if(d)return d;u=o.l2n(u)}if(this._columns||(this._columns=[]),u>this._columns.length){let d=this._columns.length+1;for(;d<=u;)this._columns.push(new t(this,d++))}return this._columns[u-1]}spliceColumns(u,d){const f=this._rows.length;for(var w=arguments.length,_=new Array(w>2?w-2:0),A=2;A0)for(let P=0;P{D.push(B[P]||null)});const $=this.getRow(P+1);$.splice.apply($,D)}else this._rows.forEach(P=>{P&&P.splice(u,d)});const N=_.length-d,L=u+d,j=this._columns.length;if(N<0)for(let P=u+_.length;P<=j;P++)this.getColumn(P).defn=this.getColumn(P-N).defn;else if(N>0)for(let P=j;P>=L;P--)this.getColumn(P+N).defn=this.getColumn(P).defn;for(let P=u;P{u=Math.max(u,d.cellCount)}),u}get actualColumnCount(){const u=[];let d=0;return this.eachRow(f=>{f.eachCell(w=>{let{col:_}=w;u[_]||(u[_]=!0,d++)})}),d}_commitRow(){}get _lastRowNumber(){const u=this._rows;let d=u.length;for(;d>0&&u[d-1]===void 0;)d--;return d}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(u){return this._rows[u-1]}findRows(u,d){return this._rows.slice(u-1,u-1+d)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let u=0;return this.eachRow(()=>{u++}),u}getRow(u){let d=this._rows[u-1];return d||(d=this._rows[u-1]=new r(this,u)),d}getRows(u,d){if(d<1)return;const f=[];for(let w=u;w1&&arguments[1]!==void 0?arguments[1]:"n";const f=this._nextRow,w=this.getRow(f);return w.values=u,this._setStyleOption(f,d[0]==="i"?d:"n"),w}addRows(u){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const f=[];return u.forEach(w=>{f.push(this.addRow(w,d))}),f}insertRow(u,d){let f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(u,0,d),this._setStyleOption(u,f),this.getRow(u)}insertRows(u,d){let f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(u,0,...d),f!=="n")for(let w=0;w1&&arguments[1]!==void 0?arguments[1]:"n";d[0]==="o"&&this.findRow(u+1)!==void 0?this._copyStyle(u+1,u,d[1]==="+"):d[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u,d[1]==="+")}_copyStyle(u,d){let f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const w=this.getRow(u),_=this.getRow(d);_.style=h(w.style),w.eachCell({includeEmpty:f},(A,N)=>{_.getCell(N).style=h(A.style)}),_.height=w.height}duplicateRow(u,d){let f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const w=this._rows[u-1],_=new Array(d).fill(w.values);this.spliceRows(u+1,f?0:d,..._);for(let A=0;A{N.getCell(j).style=L.style})}}spliceRows(u,d){const f=u+d;for(var w=arguments.length,_=new Array(w>2?w-2:0),A=2;A{$.getCell(x).style=B.style}),this._rows[P-1]=void 0}else this._rows[P+L-1]=void 0;else if(L>0)for(P=j;P>=f;P--)if(D=this._rows[P-1],D){const $=this.getRow(P+L);$.values=D.values,$.style=D.style,$.height=D.height,D.eachCell({includeEmpty:!0},(B,x)=>{if($.getCell(x).style=B.style,B._value.constructor.name==="MergeValue"){const M=this.getRow(B._row._number+N).getCell(x),v=B._value._master,p=this.getRow(v._row._number+N).getCell(v._column._number);M.merge(p)}})}else this._rows[P+L-1]=void 0;for(P=0;P{f&&f.hasValues&&d(f,f.number)})}getSheetValues(){const u=[];return this._rows.forEach(d=>{d&&(u[d.number]=d.values)}),u}findCell(u,d){const f=o.getAddress(u,d),w=this._rows[f.row-1];return w?w.findCell(f.col):void 0}getCell(u,d){const f=o.getAddress(u,d);return this.getRow(f.row).getCellEx(f)}mergeCells(){for(var u=arguments.length,d=new Array(u),f=0;f{if(w.intersects(u))throw new Error("Cannot merge already merged cells")});const f=this.getCell(u.top,u.left);for(let w=u.top;w<=u.bottom;w++)for(let _=u.left;_<=u.right;_++)(w>u.top||_>u.left)&&this.getCell(w,_).merge(f,d);this._merges[f.address]=u}_unMergeMaster(u){const d=this._merges[u.address];if(d){for(let f=d.top;f<=d.bottom;f++)for(let w=d.left;w<=d.right;w++)this.getCell(f,w).unmerge();delete this._merges[u.address]}}get hasMerges(){return m.some(this._merges,Boolean)}unMergeCells(){for(var u=arguments.length,d=new Array(u),f=0;f3&&arguments[3]!==void 0?arguments[3]:"shared";const _=o.decode(u),{top:A,left:N,bottom:L,right:j}=_,P=j-N+1,D=o.encodeAddress(A,N),$=w==="shared";let B;B=typeof f=="function"?f:Array.isArray(f)?Array.isArray(f[0])?(M,v)=>f[M-A][v-N]:(M,v)=>f[(M-A)*P+(v-N)]:()=>{};let x=!0;for(let M=A;M<=L;M++)for(let v=N;v<=j;v++)x?(this.getCell(M,v).value={shareType:w,formula:d,ref:u,result:B(M,v)},x=!1):this.getCell(M,v).value=$?{sharedFormula:D,result:B(M,v)}:B(M,v)}addImage(u,d){const f={type:"image",imageId:u,range:d};this._media.push(new l(this,f))}getImages(){return this._media.filter(u=>u.type==="image")}addBackgroundImage(u){const d={type:"background",imageId:u};this._media.push(new l(this,d))}getBackgroundImageId(){const u=this._media.find(d=>d.type==="background");return u&&u.imageId}protect(u,d){return new Promise(f=>{this.sheetProtection={sheet:!0},d&&"spinCount"in d&&(d.spinCount=Number.isFinite(d.spinCount)?Math.round(Math.max(0,d.spinCount)):1e5),u&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=c.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=d&&"spinCount"in d?d.spinCount:1e5,this.sheetProtection.hashValue=c.convertPasswordToHash(u,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),d&&(this.sheetProtection=Object.assign(this.sheetProtection,d),!u&&"spinCount"in d&&delete this.sheetProtection.spinCount),f()})}unprotect(){this.sheetProtection=null}addTable(u){const d=new n(this,u);return this.tables[u.name]=d,d}getTable(u){return this.tables[u]}removeTable(u){delete this.tables[u]}getTables(){return Object.values(this.tables)}addConditionalFormatting(u){this.conditionalFormattings.push(u)}removeConditionalFormatting(u){typeof u=="number"?this.conditionalFormattings.splice(u,1):this.conditionalFormattings=u instanceof Function?this.conditionalFormattings.filter(u):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(u){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=u}get model(){const u={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(w=>w.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(w=>w.model),conditionalFormattings:this.conditionalFormattings};u.cols=t.toModel(this.columns);const d=u.rows=[],f=u.dimensions=new a;return this._rows.forEach(w=>{const _=w&&w.model;_&&(f.expand(_.number,_.min,_.number,_.max),d.push(_))}),u.merges=[],m.each(this._merges,w=>{u.merges.push(w.range)}),u}_parseRows(u){this._rows=[],u.rows.forEach(d=>{const f=new r(this,d.number);this._rows[f.number-1]=f,f.model=d})}_parseMergeCells(u){m.each(u.mergeCells,d=>{this.mergeCellsWithoutStyle(d)})}set model(u){this.name=u.name,this._columns=t.fromModel(this,u.cols),this._parseRows(u),this._parseMergeCells(u),this.dataValidations=new i(u.dataValidations),this.properties=u.properties,this.pageSetup=u.pageSetup,this.headerFooter=u.headerFooter,this.views=u.views,this.autoFilter=u.autoFilter,this._media=u.media.map(d=>new l(this,d)),this.sheetProtection=u.sheetProtection,this.tables=u.tables.reduce((d,f)=>{const w=new n;return w.model=f,d[f.name]=w,d},{}),this.conditionalFormattings=u.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(s,T,S){s("core-js/modules/es.promise"),s("core-js/modules/es.promise.finally"),s("core-js/modules/es.object.assign"),s("core-js/modules/es.object.keys"),s("core-js/modules/es.object.values"),s("core-js/modules/es.symbol"),s("core-js/modules/es.symbol.async-iterator"),s("core-js/modules/es.array.iterator"),s("core-js/modules/es.array.includes"),s("core-js/modules/es.array.find-index"),s("core-js/modules/es.array.find"),s("core-js/modules/es.string.from-code-point"),s("core-js/modules/es.string.includes"),s("core-js/modules/es.number.is-nan"),s("regenerator-runtime/runtime");const m={Workbook:s("./doc/workbook")},o=s("./doc/enums");Object.keys(o).forEach(a=>{m[a]=o[a]}),T.exports=m},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(s,T,S){const m=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");S.bufferToString=function(o){return typeof o=="string"?o:m?m.decode(o):o.toString()}},{}],17:[function(s,T,S){const m=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:o}=s("buffer");S.stringToBuffer=function(a){return typeof a!="string"?a:m?o.from(m.encode(a).buffer):o.from(a)}},{buffer:220}],18:[function(s,T,S){const m=s("./under-dash"),o=s("./col-cache");T.exports=class{constructor(a){this.template=a,this.sheets={}}addCell(a){this.addCellEx(o.decodeEx(a))}getCell(a){return this.findCellEx(o.decodeEx(a),!0)}findCell(a){return this.findCellEx(o.decodeEx(a),!1)}findCellAt(a,r,t){const e=this.sheets[a],l=e&&e[r];return l&&l[t]}addCellEx(a){if(a.top)for(let r=a.top;r<=a.bottom;r++)for(let t=a.left;t<=a.right;t++)this.getCellAt(a.sheetName,r,t);else this.findCellEx(a,!0)}getCellEx(a){return this.findCellEx(a,!0)}findCellEx(a,r){const t=this.findSheet(a,r),e=this.findSheetRow(t,a,r);return this.findRowCell(e,a,r)}getCellAt(a,r,t){const e=this.sheets[a]||(this.sheets[a]=[]),l=e[r]||(e[r]=[]);return l[t]||(l[t]={sheetName:a,address:o.n2l(t)+r,row:r,col:t})}removeCellEx(a){const r=this.findSheet(a);if(!r)return;const t=this.findSheetRow(r,a);t&&delete t[a.col]}forEachInSheet(a,r){const t=this.sheets[a];t&&t.forEach((e,l)=>{e&&e.forEach((n,i)=>{n&&r(n,l,i)})})}forEach(a){m.each(this.sheets,(r,t)=>{this.forEachInSheet(t,a)})}map(a){const r=[];return this.forEach(t=>{r.push(a(t))}),r}findSheet(a,r){const t=a.sheetName;return this.sheets[t]?this.sheets[t]:r?this.sheets[t]=[]:void 0}findSheetRow(a,r,t){const{row:e}=r;return a&&a[e]?a[e]:t?a[e]=[]:void 0}findRowCell(a,r,t){const{col:e}=r;return a&&a[e]?a[e]:t?a[e]=this.template?Object.assign(r,JSON.parse(JSON.stringify(this.template))):r:void 0}spliceRows(a,r,t,e){const l=this.sheets[a];if(l){const n=[];for(let i=0;i{i.splice(r,t,...n)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(s,T,S){const m=/^[A-Z]+\d+$/,o={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:a=>a<=26?1:a<=676?2:3,_fill(a){let r,t,e,l,n,i=1;if(a>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&a>=1){for(;i<=26;)r=this._dictionary[i-1],this._n2l[i]=r,this._l2n[r]=i,i++;this._l2nFill=1}if(this._l2nFill<2&&a>=2){for(i=27;i<=702;)t=i-27,e=t%26,l=Math.floor(t/26),r=this._dictionary[l]+this._dictionary[e],this._n2l[i]=r,this._l2n[r]=i,i++;this._l2nFill=2}if(this._l2nFill<3&&a>=3){for(i=703;i<=16384;)t=i-703,e=t%26,l=Math.floor(t/26)%26,n=Math.floor(t/676),r=this._dictionary[n]+this._dictionary[l]+this._dictionary[e],this._n2l[i]=r,this._l2n[r]=i,i++;this._l2nFill=3}},l2n(a){if(this._l2n[a]||this._fill(a.length),!this._l2n[a])throw new Error("Out of bounds. Invalid column letter: "+a);return this._l2n[a]},n2l(a){if(a<1||a>16384)throw new Error(a+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[a]||this._fill(this._level(a)),this._n2l[a]},_hash:{},validateAddress(a){if(!m.test(a))throw new Error("Invalid Address: "+a);return!0},decodeAddress(a){const r=a.length<5&&this._hash[a];if(r)return r;let t=!1,e="",l=0,n=!1,i="",c=0;for(let u,d=0;d=65&&u<=90)t=!0,e+=a[d],l=26*l+u-64;else if(u>=48&&u<=57)n=!0,i+=a[d],c=10*c+u-48;else if(n&&t&&u!==36)break;if(t){if(l>16384)throw new Error("Out of bounds. Invalid column letter: "+e)}else l=void 0;n||(c=void 0);const h={address:a=e+i,col:l,row:c,$col$row:`$${e}$${i}`};return l<=100&&c<=100&&(this._hash[a]=h,this._hash[h.$col$row]=h),h},getAddress(a,r){if(r){const t=this.n2l(r)+a;return this.decodeAddress(t)}return this.decodeAddress(a)},decode(a){const r=a.split(":");if(r.length===2){const t=this.decodeAddress(r[0]),e=this.decodeAddress(r[1]),l={top:Math.min(t.row,e.row),left:Math.min(t.col,e.col),bottom:Math.max(t.row,e.row),right:Math.max(t.col,e.col)};return l.tl=this.n2l(l.left)+l.top,l.br=this.n2l(l.right)+l.bottom,l.dimensions=`${l.tl}:${l.br}`,l}return this.decodeAddress(a)},decodeEx(a){const r=a.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),t=r[1]||r[2],e=r[3],l=e.split(":");if(l.length>1){let i=this.decodeAddress(l[0]),c=this.decodeAddress(l[1]);const h=Math.min(i.row,c.row),u=Math.min(i.col,c.col),d=Math.max(i.row,c.row),f=Math.max(i.col,c.col);return i=this.n2l(u)+h,c=this.n2l(f)+d,{top:h,left:u,bottom:d,right:f,sheetName:t,tl:{address:i,col:u,row:h,$col$row:`$${this.n2l(u)}$${h}`,sheetName:t},br:{address:c,col:f,row:d,$col$row:`$${this.n2l(f)}$${d}`,sheetName:t},dimensions:`${i}:${c}`}}if(e.startsWith("#"))return t?{sheetName:t,error:e}:{error:e};const n=this.decodeAddress(e);return t?{sheetName:t,...n}:n},encodeAddress:(a,r)=>o.n2l(r)+a,encode(){switch(arguments.length){case 2:return o.encodeAddress(arguments[0],arguments[1]);case 4:return`${o.encodeAddress(arguments[0],arguments[1])}:${o.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(a,r){const[t,e,,l,n]=a,[i,c]=r;return i>=t&&i<=l&&c>=e&&c<=n}};T.exports=o},{}],20:[function(s,T,S){const m=(a,r)=>({...a,...r.reduce((t,e)=>(a[e]&&(t[e]={...a[e]}),t),{})}),o=function(a,r,t){let e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];a[t]&&(r[t]=m(a[t],e))};S.copyStyle=a=>{if(!a)return a;if(r=a,Object.keys(r).length===0)return{};var r;const t={...a};return o(a,t,"font",["color"]),o(a,t,"alignment"),o(a,t,"protection"),a.border&&(o(a,t,"border"),o(a.border,t.border,"top",["color"]),o(a.border,t.border,"left",["color"]),o(a.border,t.border,"bottom",["color"]),o(a.border,t.border,"right",["color"]),o(a.border,t.border,"diagonal",["color"])),a.fill&&(o(a,t,"fill",["fgColor","bgColor","center"]),a.fill.stops&&(t.fill.stops=a.fill.stops.map(e=>m(e,["color"])))),t}},{}],21:[function(s,T,S){(function(m){(function(){const o=s("crypto"),a={hash(r){const t=o.createHash(r);for(var e=arguments.length,l=new Array(e>1?e-1:0),n=1;no.randomBytes(r)};T.exports=a}).call(this)}).call(this,s("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(s,T,S){const{SaxesParser:m}=s("saxes"),{PassThrough:o}=s("readable-stream"),{bufferToString:a}=s("./browser-buffer-decode");T.exports=async function*(r){r.pipe&&!r[Symbol.asyncIterator]&&(r=r.pipe(new o));const t=new m;let e;t.on("error",n=>{e=n});let l=[];t.on("opentag",n=>l.push({eventType:"opentag",value:n})),t.on("text",n=>l.push({eventType:"text",value:n})),t.on("closetag",n=>l.push({eventType:"closetag",value:n}));for await(const n of r){if(t.write(a(n)),e)throw e;yield l,l=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(s,T,S){const m=s("./col-cache"),o=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,a=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;T.exports={slideFormula:function(r,t,e){const l=m.decode(t),n=m.decode(e);return r.replace(o,(i,c,h,u,d)=>{if(d)return i;const f=a.exec(u);if(f){const w=f[1],_=f[2].toUpperCase(),A=f[3],N=f[4];if(_.length>3||_.length===3&&_>"XFD")return i;let L=m.l2n(_),j=parseInt(N,10);return w||(L+=n.col-l.col),A||(j+=n.row-l.row),(c||"")+(w||"")+m.n2l(L)+(A||"")+j}return i})}}},{"./col-cache":19}],24:[function(s,T,S){(function(m,o){(function(){const a=s("readable-stream"),r=s("./utils"),t=s("./string-buf");class e{constructor(u,d){this._data=u,this._encoding=d}get length(){return this.toBuffer().length}copy(u,d,f,w){return this.toBuffer().copy(u,d,f,w)}toBuffer(){return this._buffer||(this._buffer=o.from(this._data,this._encoding)),this._buffer}}class l{constructor(u){this._data=u}get length(){return this._data.length}copy(u,d,f,w){return this._data._buf.copy(u,d,f,w)}toBuffer(){return this._data.toBuffer()}}class n{constructor(u){this._data=u}get length(){return this._data.length}copy(u,d,f,w){this._data.copy(u,d,f,w)}toBuffer(){return this._data}}class i{constructor(u){this.size=u,this.buffer=o.alloc(u),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;const u=o.alloc(this.iWrite-this.iRead);return this.buffer.copy(u,0,this.iRead,this.iWrite),u}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(u){let d;return u===0?null:u===void 0||u>=this.length?(d=this.toBuffer(),this.iRead=this.iWrite,d):(d=o.alloc(u),this.buffer.copy(d,0,this.iRead,u),this.iRead+=u,d)}write(u,d,f){const w=Math.min(f,this.size-this.iWrite);return u.copy(this.buffer,this.iWrite,d,d+w),this.iWrite+=w,w}}const c=function(h){h=h||{},this.bufSize=h.bufSize||1048576,this.buffers=[],this.batch=h.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};r.inherits(c,a.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return o.concat(this.buffers.map(h=>h.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const u=this.buffers[this.buffers.length-1];if(!u.full)return u}const h=new i(this.bufSize);return this.buffers.push(h),h},async _pipe(h){await Promise.all(this.pipes.map(function(u){return new Promise(d=>{u.write(h.toBuffer(),()=>{d()})})}))},_writeToBuffers(h){let u=0;const d=h.length;for(;u1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(f),m.nextTick(d)):(await this._pipe(f),d());else this.paused||this.emit("data",f.toBuffer()),this._writeToBuffers(f),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(h,u,d){const f=w=>{w?d(w):(this._flush(),this.pipes.forEach(_=>{_.end()}),this.emit("finish"))};h?this.write(h,u,f):f()},read(h){let u;if(h){for(u=[];h&&this.buffers.length&&!this.buffers[0].eod;){const d=this.buffers[0],f=d.read(h);h-=f.length,u.push(f),d.eod&&d.full&&this.buffers.shift()}return o.concat(u)}return u=this.buffers.map(d=>d.toBuffer()).filter(Boolean),this.buffers=[],o.concat(u)},setEncoding(h){this.encoding=h},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(h){this.pipes.push(h),!this.paused&&this.buffers.length&&this.end()},unpipe(h){this.pipes=this.pipes.filter(u=>u!==h)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),T.exports=c}).call(this)}).call(this,s("_process"),s("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(s,T,S){(function(m){(function(){T.exports=class{constructor(o){this._buf=m.alloc(o&&o.size||16384),this._encoding=o&&o.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=m.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(o){o=o||0,this._buffer=void 0,this._inPos=o}_grow(o){let a=2*this._buf.length;for(;a=this._buf.length-4;)this._grow(this._inPos+o.length),a=this._inPos+this._buf.write(o,this._inPos,this._encoding);this._inPos=a}addStringBuf(o){o.length&&(this._buffer=void 0,this.length+o.length>this.capacity&&this._grow(this.length+o.length),o._buf.copy(this._buf,this._inPos,0,o.length),this._inPos+=o.length)}}}).call(this)}).call(this,s("buffer").Buffer)},{buffer:220}],26:[function(s,T,S){const{toString:m}=Object.prototype,o=/["&<>]/,a={each:function(r,t){r&&(Array.isArray(r)?r.forEach(t):Object.keys(r).forEach(e=>{t(r[e],e)}))},some:function(r,t){return!!r&&(Array.isArray(r)?r.some(t):Object.keys(r).some(e=>t(r[e],e)))},every:function(r,t){return!r||(Array.isArray(r)?r.every(t):Object.keys(r).every(e=>t(r[e],e)))},map:function(r,t){return r?Array.isArray(r)?r.map(t):Object.keys(r).map(e=>t(r[e],e)):[]},keyBy:(r,t)=>r.reduce((e,l)=>(e[l[t]]=l,e),{}),isEqual:function(r,t){const e=typeof r,l=typeof t,n=Array.isArray(r),i=Array.isArray(t);let c;if(e!==l)return!1;switch(typeof r){case"object":if(n||i)return!(!n||!i)&&r.length===t.length&&r.every((h,u)=>{const d=t[u];return a.isEqual(h,d)});if(r===null||t===null)return r===t;if(c=Object.keys(r),Object.keys(t).length!==c.length)return!1;for(const h of c)if(!t.hasOwnProperty(h))return!1;return a.every(r,(h,u)=>{const d=t[u];return a.isEqual(h,d)});default:return r===t}},escapeHtml(r){const t=o.exec(r);if(!t)return r;let e="",l="",n=0,i=t.index;for(;i":l=">";break;default:continue}n!==i&&(e+=r.substring(n,i)),n=i+1,e+=l}return n!==i?e+r.substring(n,i):e},strcmp:(r,t)=>rt?1:0,isUndefined:r=>m.call(r)==="[object Undefined]",isObject:r=>m.call(r)==="[object Object]",deepMerge(){const r=arguments[0]||{},{length:t}=arguments;let e,l,n;function i(c,h){e=r[h],n=Array.isArray(c),a.isObject(c)||n?(n?(n=!1,l=e&&Array.isArray(e)?e:[]):l=e&&a.isObject(e)?e:{},r[h]=a.deepMerge(l,c)):a.isUndefined(c)||(r[h]=c)}for(let c=0;c&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,t={nop(){},promiseImmediate:e=>new Promise(l=>{m.setImmediate?o(()=>{l(e)}):setTimeout(()=>{l(e)},1)}),inherits:function(e,l,n,i){e.super_=l,i||(i=n,n=null),n&&Object.keys(n).forEach(h=>{Object.defineProperty(e,h,Object.getOwnPropertyDescriptor(n,h))});const c={constructor:{value:e,enumerable:!1,writable:!1,configurable:!0}};i&&Object.keys(i).forEach(h=>{c[h]=Object.getOwnPropertyDescriptor(i,h)}),e.prototype=Object.create(l.prototype,c)},dateToExcel:(e,l)=>25569+e.getTime()/864e5-(l?1462:0),excelToDate(e,l){const n=Math.round(24*(e-25569+(l?1462:0))*3600*1e3);return new Date(n)},parsePath(e){const l=e.lastIndexOf("/");return{path:e.substring(0,l),name:e.substring(l+1)}},getRelsPath(e){const l=t.parsePath(e);return`${l.path}/_rels/${l.name}.rels`},xmlEncode(e){const l=r.exec(e);if(!l)return e;let n="",i="",c=0,h=l.index;for(;h=11&&u!==13)){i="";break}continue}c!==h&&(n+=e.substring(c,h)),c=h+1,i&&(n+=i)}return c!==h?n+e.substring(c,h):n},xmlDecode:e=>e.replace(/&([a-z]*);/g,l=>{switch(l){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return l}}),validInt(e){const l=parseInt(e,10);return Number.isNaN(l)?0:l},isDateFmt(e){return e?(e=(e=e.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:e=>new Promise(l=>{a.access(e,a.constants.F_OK,n=>{l(!n)})})},toIsoDateString:e=>e.toIsoString().subsstr(0,10),parseBoolean:e=>e===!0||e==="true"||e===1||e==="1"};T.exports=t}).call(this)}).call(this,typeof Kt<"u"?Kt:typeof self<"u"?self:typeof window<"u"?window:{},s("timers").setImmediate)},{fs:216,timers:523}],28:[function(s,T,S){const m=s("./under-dash"),o=s("./utils");function a(e,l,n){e.push(` ${l}="${o.xmlEncode(n.toString())}"`)}function r(e,l){if(l){const n=[];m.each(l,(i,c)=>{i!==void 0&&a(n,c,i)}),e.push(n.join(""))}}class t{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(l){const n=this._xml;n.push(" +import{p as Ve,q as Kt,s as De}from"./index-5zY5TMAp.js";function qe(Ee,Fe){for(var s=0;sT[S]})}}}return Object.freeze(Object.defineProperty(Ee,Symbol.toStringTag,{value:"Module"}))}var $e={exports:{}};/*! ExcelJS 19-10-2023 */(function(Ee,Fe){(function(s){Ee.exports=s()})(function(){return function s(T,S,m){function o(t,e){if(!S[t]){if(!T[t]){var l=typeof De=="function"&&De;if(!e&&l)return l(t,!0);if(a)return a(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var i=S[t]={exports:{}};T[t][0].call(i.exports,function(c){return o(T[t][1][c]||c)},i,i.exports,s,T,S,m)}return S[t].exports}for(var a=typeof De=="function"&&De,r=0;r{const d=this.workbook.addWorksheet(c.sheetName),f=c.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],w=c.map||function(A){if(A==="")return null;const N=Number(A);if(!Number.isNaN(N)&&N!==1/0)return N;const L=f.reduce((P,D)=>{if(P)return P;const $=t(A,D,!0);return $.isValid()?$:null},null);if(L)return new Date(L.valueOf());const j=n[A];return j!==void 0?j:A},_=o.parse(c.parserOptions).on("data",A=>{d.addRow(A.map(w))}).on("end",()=>{_.emit("worksheet",d)});_.on("worksheet",h).on("error",u),i.pipe(_)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}write(i,c){return new Promise((h,u)=>{c=c||{};const d=this.workbook.getWorksheet(c.sheetName||c.sheetId),f=o.format(c.formatterOptions);i.on("finish",()=>{h()}),f.on("error",u),f.pipe(i);const{dateFormat:w,dateUTC:_}=c,A=c.map||(j=>{if(j){if(j.text||j.hyperlink)return j.hyperlink||j.text||"";if(j.formula||j.result)return j.result||"";if(j instanceof Date)return w?_?t.utc(j).format(w):t(j).format(w):_?t.utc(j).format():t(j).format();if(j.error)return j.error;if(typeof j=="object")return JSON.stringify(j)}return j}),N=c.includeEmptyRows===void 0||c.includeEmptyRows;let L=1;d&&d.eachRow((j,P)=>{if(N)for(;L++2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=r,t)if(typeof t=="string"){const l=m.decodeAddress(t);this.nativeCol=l.col+e,this.nativeColOff=0,this.nativeRow=l.row+e,this.nativeRowOff=0}else t.nativeCol!==void 0?(this.nativeCol=t.nativeCol||0,this.nativeColOff=t.nativeColOff||0,this.nativeRow=t.nativeRow||0,this.nativeRowOff=t.nativeRowOff||0):t.col!==void 0?(this.col=t.col+e,this.row=t.row+e):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0}static asInstance(r){return r instanceof o||r==null?r:new o(r)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(r){this.nativeCol=Math.floor(r),this.nativeColOff=Math.floor((r-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(r){this.nativeRow=Math.floor(r),this.nativeRowOff=Math.floor((r-this.nativeRow)*this.rowHeight)}get colWidth(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}get rowHeight(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(r){this.nativeCol=r.nativeCol,this.nativeColOff=r.nativeColOff,this.nativeRow=r.nativeRow,this.nativeRowOff=r.nativeRowOff}}T.exports=o},{"../utils/col-cache":19}],3:[function(s,T,S){const m=s("../utils/col-cache"),o=s("../utils/under-dash"),a=s("./enums"),{slideFormula:r}=s("../utils/shared-formula"),t=s("./note");class e{constructor(i,c,h){if(!i||!c)throw new Error("A Cell needs a Row");this._row=i,this._column=c,m.validateAddress(h),this._address=h,this._value=l.create(e.Types.Null,this),this.style=this._mergeStyle(i.style,c.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(i){this.style.numFmt=i}get font(){return this.style.font}set font(i){this.style.font=i}get alignment(){return this.style.alignment}set alignment(i){this.style.alignment=i}get border(){return this.style.border}set border(i){this.style.border=i}get fill(){return this.style.fill}set fill(i){this.style.fill=i}get protection(){return this.style.protection}set protection(i){this.style.protection=i}_mergeStyle(i,c,h){const u=i&&i.numFmt||c&&c.numFmt;u&&(h.numFmt=u);const d=i&&i.font||c&&c.font;d&&(h.font=d);const f=i&&i.alignment||c&&c.alignment;f&&(h.alignment=f);const w=i&&i.border||c&&c.border;w&&(h.border=w);const _=i&&i.fill||c&&c.fill;_&&(h.fill=_);const A=i&&i.protection||c&&c.protection;return A&&(h.protection=A),h}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===e.Types.Merge}merge(i,c){this._value.release(),this._value=l.create(e.Types.Merge,this,i),c||(this.style=i.style)}unmerge(){this.type===e.Types.Merge&&(this._value.release(),this._value=l.create(e.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(i){return this._value.type===e.Types.Merge&&this._value.isMergedTo(i)}get master(){return this.type===e.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===e.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(i){this.type!==e.Types.Merge?(this._value.release(),this._value=l.create(l.getType(i),this,i)):this._value.master.value=i}get note(){return this._comment&&this._comment.note}set note(i){this._comment=new t(i)}get text(){return this._value.toString()}get html(){return o.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(i){this.type===e.Types.String&&(this._value=l.create(e.Types.Hyperlink,this,{text:this._value.value,hyperlink:i}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:i}=this._row;return{sheetName:i.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(i){this.names=[i]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(i){const{definedNames:c}=this.workbook;c.removeAllNames(this.fullAddress),i.forEach(h=>{c.addEx(this.fullAddress,h)})}addName(i){this.workbook.definedNames.addEx(this.fullAddress,i)}removeName(i){this.workbook.definedNames.removeEx(this.fullAddress,i)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(i){this._dataValidations.add(this.address,i)}get model(){const{model:i}=this._value;return i.style=this.style,this._comment&&(i.comment=this._comment.model),i}set model(i){if(this._value.release(),this._value=l.create(i.type,this),this._value.model=i,i.comment)switch(i.comment.type){case"note":this._comment=t.fromModel(i.comment)}i.style?this.style=i.style:this.style={}}}e.Types=a.ValueType;const l={getType:n=>n==null?e.Types.Null:n instanceof String||typeof n=="string"?e.Types.String:typeof n=="number"?e.Types.Number:typeof n=="boolean"?e.Types.Boolean:n instanceof Date?e.Types.Date:n.text&&n.hyperlink?e.Types.Hyperlink:n.formula||n.sharedFormula?e.Types.Formula:n.richText?e.Types.RichText:n.sharedString?e.Types.SharedString:n.error?e.Types.Error:e.Types.JSON,types:[{t:e.Types.Null,f:class{constructor(n){this.model={address:n.address,type:e.Types.Null}}get value(){return null}set value(n){}get type(){return e.Types.Null}get effectiveType(){return e.Types.Null}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return""}release(){}toString(){return""}}},{t:e.Types.Number,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.Number,value:i}}get value(){return this.model.value}set value(n){this.model.value=n}get type(){return e.Types.Number}get effectiveType(){return e.Types.Number}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:e.Types.String,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.String,value:i}}get value(){return this.model.value}set value(n){this.model.value=n}get type(){return e.Types.String}get effectiveType(){return e.Types.String}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:e.Types.Date,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.Date,value:i}}get value(){return this.model.value}set value(n){this.model.value=n}get type(){return e.Types.Date}get effectiveType(){return e.Types.Date}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:e.Types.Hyperlink,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.Hyperlink,text:i?i.text:void 0,hyperlink:i?i.hyperlink:void 0},i&&i.tooltip&&(this.model.tooltip=i.tooltip)}get value(){const n={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(n.tooltip=this.model.tooltip),n}set value(n){this.model={text:n.text,hyperlink:n.hyperlink},n.tooltip&&(this.model.tooltip=n.tooltip)}get text(){return this.model.text}set text(n){this.model.text=n}get hyperlink(){return this.model.hyperlink}set hyperlink(n){this.model.hyperlink=n}get type(){return e.Types.Hyperlink}get effectiveType(){return e.Types.Hyperlink}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:e.Types.Formula,f:class{constructor(n,i){this.cell=n,this.model={address:n.address,type:e.Types.Formula,shareType:i?i.shareType:void 0,ref:i?i.ref:void 0,formula:i?i.formula:void 0,sharedFormula:i?i.sharedFormula:void 0,result:i?i.result:void 0}}_copyModel(n){const i={},c=h=>{const u=n[h];u&&(i[h]=u)};return c("formula"),c("result"),c("ref"),c("shareType"),c("sharedFormula"),i}get value(){return this._copyModel(this.model)}set value(n){this.model=this._copyModel(n)}validate(n){switch(l.getType(n)){case e.Types.Null:case e.Types.String:case e.Types.Number:case e.Types.Date:break;case e.Types.Hyperlink:case e.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(n){this.model.formula=n}get formulaType(){return this.model.formula?a.FormulaType.Master:this.model.sharedFormula?a.FormulaType.Shared:a.FormulaType.None}get result(){return this.model.result}set result(n){this.model.result=n}get type(){return e.Types.Formula}get effectiveType(){const n=this.model.result;return n==null?a.ValueType.Null:n instanceof String||typeof n=="string"?a.ValueType.String:typeof n=="number"?a.ValueType.Number:n instanceof Date?a.ValueType.Date:n.text&&n.hyperlink?a.ValueType.Hyperlink:n.formula?a.ValueType.Formula:a.ValueType.Null}get address(){return this.model.address}set address(n){this.model.address=n}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:n}=this.cell,i=n.findCell(this.model.sharedFormula);this._translatedFormula=i&&r(i.formula,i.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:e.Types.Merge,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.Merge,master:i?i.address:void 0},this._master=i,i&&i.addMergeRef()}get value(){return this._master.value}set value(n){n instanceof e?(this._master&&this._master.releaseMergeRef(),n.addMergeRef(),this._master=n):this._master.value=n}isMergedTo(n){return n===this._master}get master(){return this._master}get type(){return e.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:e.Types.JSON,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.String,value:JSON.stringify(i),rawValue:i}}get value(){return this.model.rawValue}set value(n){this.model.rawValue=n,this.model.value=JSON.stringify(n)}get type(){return e.Types.String}get effectiveType(){return e.Types.String}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:e.Types.SharedString,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.SharedString,value:i}}get value(){return this.model.value}set value(n){this.model.value=n}get type(){return e.Types.SharedString}get effectiveType(){return e.Types.SharedString}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:e.Types.RichText,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.String,value:i}}get value(){return this.model.value}set value(n){this.model.value=n}toString(){return this.model.value.richText.map(n=>n.text).join("")}get type(){return e.Types.RichText}get effectiveType(){return e.Types.RichText}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:e.Types.Boolean,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.Boolean,value:i}}get value(){return this.model.value}set value(n){this.model.value=n}get type(){return e.Types.Boolean}get effectiveType(){return e.Types.Boolean}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:e.Types.Error,f:class{constructor(n,i){this.model={address:n.address,type:e.Types.Error,value:i}}get value(){return this.model.value}set value(n){this.model.value=n}get type(){return e.Types.Error}get effectiveType(){return e.Types.Error}get address(){return this.model.address}set address(n){this.model.address=n}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((n,i)=>(n[i.t]=i.f,n),[]),create(n,i,c){const h=this.types[n];if(!h)throw new Error("Could not create Value of type "+n);return new h(i,c)}};T.exports=e},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(s,T,S){const m=s("../utils/under-dash"),o=s("./enums"),a=s("../utils/col-cache");class r{constructor(e,l,n){this._worksheet=e,this._number=l,n!==!1&&(this.defn=n)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return a.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(e){e?(this.key=e.key,this.width=e.width!==void 0?e.width:9,this.outlineLevel=e.outlineLevel,e.style?this.style=e.style:this.style={},this.header=e.header,this._hidden=!!e.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(e){e!==void 0?(this._header=e,this.headers.forEach((l,n)=>{this._worksheet.getCell(n+1,this.number).value=l})):this._header=void 0}get key(){return this._key}set key(e){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=e,e&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(e){this._hidden=e}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(e){this._outlineLevel=e}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(e){return this.width===e.width&&this.hidden===e.hidden&&this.outlineLevel===e.outlineLevel&&m.isEqual(this.style,e.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;const e=this.style;return!e||!(e.font||e.numFmt||e.alignment||e.border||e.fill||e.protection)}get headerCount(){return this.headers.length}eachCell(e,l){const n=this.number;l||(l=e,e=null),this._worksheet.eachRow(e,(i,c)=>{l(i.getCell(n),c)})}get values(){const e=[];return this.eachCell((l,n)=>{l&&l.type!==o.ValueType.Null&&(e[n]=l.value)}),e}set values(e){if(!e)return;const l=this.number;let n=0;e.hasOwnProperty("0")&&(n=1),e.forEach((i,c)=>{this._worksheet.getCell(c+n,l).value=i})}_applyStyle(e,l){return this.style[e]=l,this.eachCell(n=>{n[e]=l}),l}get numFmt(){return this.style.numFmt}set numFmt(e){this._applyStyle("numFmt",e)}get font(){return this.style.font}set font(e){this._applyStyle("font",e)}get alignment(){return this.style.alignment}set alignment(e){this._applyStyle("alignment",e)}get protection(){return this.style.protection}set protection(e){this._applyStyle("protection",e)}get border(){return this.style.border}set border(e){this._applyStyle("border",e)}get fill(){return this.style.fill}set fill(e){this._applyStyle("fill",e)}static toModel(e){const l=[];let n=null;return e&&e.forEach((i,c)=>{i.isDefault?n&&(n=null):n&&i.equivalentTo(n)?n.max=c+1:(n={min:c+1,max:c+1,width:i.width!==void 0?i.width:9,style:i.style,isCustomWidth:i.isCustomWidth,hidden:i.hidden,outlineLevel:i.outlineLevel,collapsed:i.collapsed},l.push(n))}),l.length?l:void 0}static fromModel(e,l){const n=[];let i=1,c=0;for(l=(l=l||[]).sort(function(h,u){return h.min-u.min});c{l.removeCellEx(e)})}forEach(e){m.each(this.matrixMap,(l,n)=>{l.forEach(i=>{e(n,i)})})}getNames(e){return this.getNamesEx(o.decodeEx(e))}getNamesEx(e){return m.map(this.matrixMap,(l,n)=>l.findCellEx(e)&&n).filter(Boolean)}_explore(e,l){l.mark=!1;const{sheetName:n}=l,i=new r(l.row,l.col,l.row,l.col,n);let c,h;function u(f,w){const _=e.findCellAt(n,f,l.col);return!(!_||!_.mark)&&(i[w]=f,_.mark=!1,!0)}for(h=l.row-1;u(h,"top");h--);for(h=l.row+1;u(h,"bottom");h++);function d(f,w){const _=[];for(h=i.top;h<=i.bottom;h++){const A=e.findCellAt(n,h,f);if(!A||!A.mark)return!1;_.push(A)}i[w]=f;for(let A=0;A<_.length;A++)_[A].mark=!1;return!0}for(c=l.col-1;d(c,"left");c--);for(c=l.col+1;d(c,"right");c++);return i}getRanges(e,l){return(l=l||this.matrixMap[e])?(l.forEach(n=>{n.mark=!0}),{name:e,ranges:l.map(n=>n.mark&&this._explore(l,n)).filter(Boolean).map(n=>n.$shortRange)}):{name:e,ranges:[]}}normaliseMatrix(e,l){e.forEachInSheet(l,(n,i,c)=>{n&&(n.row===i&&n.col===c||(n.row=i,n.col=c,n.address=o.n2l(c)+i))})}spliceRows(e,l,n,i){m.each(this.matrixMap,c=>{c.spliceRows(e,l,n,i),this.normaliseMatrix(c,e)})}spliceColumns(e,l,n,i){m.each(this.matrixMap,c=>{c.spliceColumns(e,l,n,i),this.normaliseMatrix(c,e)})}get model(){return m.map(this.matrixMap,(e,l)=>this.getRanges(l,e)).filter(e=>e.ranges.length)}set model(e){const l=this.matrixMap={};e.forEach(n=>{const i=l[n.name]=new a;n.ranges.forEach(c=>{t.test(c.split("!").pop()||"")&&i.addCell(c)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(s,T,S){T.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(s,T,S){const m=s("../utils/col-cache"),o=s("./anchor");T.exports=class{constructor(a,r){this.worksheet=a,this.model=r}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(a){let{type:r,imageId:t,range:e,hyperlinks:l}=a;if(this.type=r,this.imageId=t,r==="image")if(typeof e=="string"){const n=m.decode(e);this.range={tl:new o(this.worksheet,{col:n.left,row:n.top},-1),br:new o(this.worksheet,{col:n.right,row:n.bottom},0),editAs:"oneCell"}}else this.range={tl:new o(this.worksheet,e.tl,0),br:e.br&&new o(this.worksheet,e.br,0),ext:e.ext,editAs:e.editAs,hyperlinks:l||e.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(s,T,S){const m=s("../utils/under-dash");class o{constructor(r){this.note=r}get model(){let r=null;switch(typeof this.note){case"string":r={type:"note",note:{texts:[{text:this.note}]}};break;default:r={type:"note",note:this.note}}return m.deepMerge({},o.DEFAULT_CONFIGS,r)}set model(r){const{note:t}=r,{texts:e}=t;e.length===1&&Object.keys(e[0]).length===1?this.note=e[0].text:this.note=t}static fromModel(r){const t=new o;return t.model=r,t}}o.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},T.exports=o},{"../utils/under-dash":26}],10:[function(s,T,S){const m=s("../utils/col-cache");class o{constructor(){this.decode(arguments)}setTLBR(r,t,e,l,n){if(arguments.length<4){const i=m.decodeAddress(r),c=m.decodeAddress(t);this.model={top:Math.min(i.row,c.row),left:Math.min(i.col,c.col),bottom:Math.max(i.row,c.row),right:Math.max(i.col,c.col),sheetName:e},this.setTLBR(i.row,i.col,c.row,c.col,n)}else this.model={top:Math.min(r,e),left:Math.min(t,l),bottom:Math.max(r,e),right:Math.max(t,l),sheetName:n}}decode(r){switch(r.length){case 5:this.setTLBR(r[0],r[1],r[2],r[3],r[4]);break;case 4:this.setTLBR(r[0],r[1],r[2],r[3]);break;case 3:this.setTLBR(r[0],r[1],r[2]);break;case 2:this.setTLBR(r[0],r[1]);break;case 1:{const t=r[0];if(t instanceof o)this.model={top:t.model.top,left:t.model.left,bottom:t.model.bottom,right:t.model.right,sheetName:t.sheetName};else if(t instanceof Array)this.decode(t);else if(t.top&&t.left&&t.bottom&&t.right)this.model={top:t.top,left:t.left,bottom:t.bottom,right:t.right,sheetName:t.sheetName};else{const e=m.decodeEx(t);e.top?this.model={top:e.top,left:e.left,bottom:e.bottom,right:e.right,sheetName:e.sheetName}:this.model={top:e.row,left:e.col,bottom:e.row,right:e.col,sheetName:e.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+r.length)}}get top(){return this.model.top||1}set top(r){this.model.top=r}get left(){return this.model.left||1}set left(r){this.model.left=r}get bottom(){return this.model.bottom||1}set bottom(r){this.model.bottom=r}get right(){return this.model.right||1}set right(r){this.model.right=r}get sheetName(){return this.model.sheetName}set sheetName(r){this.model.sheetName=r}get _serialisedSheetName(){const{sheetName:r}=this.model;return r?/^[a-zA-Z0-9]*$/.test(r)?r+"!":`'${r}'!`:""}expand(r,t,e,l){(!this.model.top||rthis.bottom)&&(this.bottom=e),(!this.model.right||l>this.right)&&(this.right=l)}expandRow(r){if(r){const{dimensions:t,number:e}=r;t&&this.expand(e,t.min,e,t.max)}}expandToAddress(r){const t=m.decodeEx(r);this.expand(t.row,t.col,t.row,t.col)}get tl(){return m.n2l(this.left)+this.top}get $t$l(){return`$${m.n2l(this.left)}$${this.top}`}get br(){return m.n2l(this.right)+this.bottom}get $b$r(){return`$${m.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&!(r.bottomthis.bottom)&&!(r.rightthis.right)}contains(r){const t=m.decodeEx(r);return this.containsEx(t)}containsEx(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&r.row>=this.top&&r.row<=this.bottom&&r.col>=this.left&&r.col<=this.right}forEachAddress(r){for(let t=this.left;t<=this.right;t++)for(let e=this.top;e<=this.bottom;e++)r(m.encodeAddress(e,t),e,t)}}T.exports=o},{"../utils/col-cache":19}],11:[function(s,T,S){const m=s("../utils/under-dash"),o=s("./enums"),a=s("../utils/col-cache"),r=s("./cell");T.exports=class{constructor(t,e){this._worksheet=t,this._number=e,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(t){return this._cells[t-1]}getCellEx(t){let e=this._cells[t.col-1];if(!e){const l=this._worksheet.getColumn(t.col);e=new r(this,l,t.address),this._cells[t.col-1]=e}return e}getCell(t){if(typeof t=="string"){const e=this._worksheet.getColumnKey(t);t=e?e.number:a.l2n(t)}return this._cells[t-1]||this.getCellEx({address:a.encodeAddress(this._number,t),row:this._number,col:t})}splice(t,e){const l=t+e;for(var n=arguments.length,i=new Array(n>2?n-2:0),c=2;c0)for(d=u;d>=l;d--)f=this._cells[d-1],f?(w=this.getCell(d+h),w.value=f.value,w.style=f.style,w._comment=f._comment):this._cells[d+h-1]=void 0;for(d=0;d{l&&l.type!==o.ValueType.Null&&e(l,n+1)})}addPageBreak(t,e){const l=this._worksheet,n=Math.max(0,t-1)||0,i=Math.max(0,e-1)||16838,c={id:this._number,max:i,man:1};n&&(c.min=n),l.rowBreaks.push(c)}get values(){const t=[];return this._cells.forEach(e=>{e&&e.type!==o.ValueType.Null&&(t[e.col]=e.value)}),t}set values(t){if(this._cells=[],t)if(t instanceof Array){let e=0;t.hasOwnProperty("0")&&(e=1),t.forEach((l,n)=>{l!==void 0&&(this.getCellEx({address:a.encodeAddress(this._number,n+e),row:this._number,col:n+e}).value=l)})}else this._worksheet.eachColumnKey((e,l)=>{t[l]!==void 0&&(this.getCellEx({address:a.encodeAddress(this._number,e.number),row:this._number,col:e.number}).value=t[l])})}get hasValues(){return m.some(this._cells,t=>t&&t.type!==o.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let t=0;return this.eachCell(()=>{t++}),t}get dimensions(){let t=0,e=0;return this._cells.forEach(l=>{l&&l.type!==o.ValueType.Null&&((!t||t>l.col)&&(t=l.col),e0?{min:t,max:e}:null}_applyStyle(t,e){return this.style[t]=e,this._cells.forEach(l=>{l&&(l[t]=e)}),e}get numFmt(){return this.style.numFmt}set numFmt(t){this._applyStyle("numFmt",t)}get font(){return this.style.font}set font(t){this._applyStyle("font",t)}get alignment(){return this.style.alignment}set alignment(t){this._applyStyle("alignment",t)}get protection(){return this.style.protection}set protection(t){this._applyStyle("protection",t)}get border(){return this.style.border}set border(t){this._applyStyle("border",t)}get fill(){return this.style.fill}set fill(t){this._applyStyle("fill",t)}get hidden(){return!!this._hidden}set hidden(t){this._hidden=t}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(t){this._outlineLevel=t}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){const t=[];let e=0,l=0;return this._cells.forEach(n=>{if(n){const i=n.model;i&&((!e||e>n.col)&&(e=n.col),l{switch(l.type){case r.Types.Merge:break;default:{let n;if(l.address)n=a.decodeAddress(l.address);else if(e){const{row:i}=e,c=e.col+1;n={row:i,col:c,address:a.encodeAddress(i,c),$col$row:`$${a.n2l(c)}$${i}`}}e=n,this.getCellEx(n).model=l;break}}}),t.height?this.height=t.height:delete this.height,this.hidden=t.hidden,this.outlineLevel=t.outlineLevel||0,this.style=t.style&&JSON.parse(JSON.stringify(t.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(s,T,S){const m=s("../utils/col-cache");class o{constructor(r,t,e){this.table=r,this.column=t,this.index=e}_set(r,t){this.table.cacheState(),this.column[r]=t}get name(){return this.column.name}set name(r){this._set("name",r)}get filterButton(){return this.column.filterButton}set filterButton(r){this.column.filterButton=r}get style(){return this.column.style}set style(r){this.column.style=r}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(r){this._set("totalsRowLabel",r)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(r){this._set("totalsRowFunction",r)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(r){this._set("totalsRowResult",r)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(r){this._set("totalsRowFormula",r)}}T.exports=class{constructor(a,r){this.worksheet=a,r&&(this.table=r,this.validate(),this.store())}getFormula(a){switch(a.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${a.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${a.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${a.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${a.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${a.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${a.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${a.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${a.name}])`;case"custom":return a.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+a.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){const{table:a}=this,r=(h,u,d)=>{h[u]===void 0&&(h[u]=d)};r(a,"headerRow",!0),r(a,"totalsRow",!1),r(a,"style",{}),r(a.style,"theme","TableStyleMedium2"),r(a.style,"showFirstColumn",!1),r(a.style,"showLastColumn",!1),r(a.style,"showRowStripes",!1),r(a.style,"showColumnStripes",!1);const t=(h,u)=>{if(!h)throw new Error(u)};t(a.ref,"Table must have ref"),t(a.columns,"Table must have column definitions"),t(a.rows,"Table must have row definitions"),a.tl=m.decodeAddress(a.ref);const{row:e,col:l}=a.tl;t(e>0,"Table must be on valid row"),t(l>0,"Table must be on valid col");const{width:n,filterHeight:i,tableHeight:c}=this;a.autoFilterRef=m.encode(e,l,e+i-1,l+n-1),a.tableRef=m.encode(e,l,e+c-1,l+n-1),a.columns.forEach((h,u)=>{t(h.name,`Column ${u} must have a name`),u===0?r(h,"totalsRowLabel","Total"):(r(h,"totalsRowFunction","none"),h.totalsRowFormula=this.getFormula(h))})}store(){const a=(i,c)=>{c&&Object.keys(c).forEach(h=>{i[h]=c[h]})},{worksheet:r,table:t}=this,{row:e,col:l}=t.tl;let n=0;if(t.headerRow){const i=r.getRow(e+n++);t.columns.forEach((c,h)=>{const{style:u,name:d}=c,f=i.getCell(l+h);f.value=d,a(f,u)})}if(t.rows.forEach(i=>{const c=r.getRow(e+n++);i.forEach((h,u)=>{const d=c.getCell(l+u);d.value=h,a(d,t.columns[u].style)})}),t.totalsRow){const i=r.getRow(e+n++);t.columns.forEach((c,h)=>{const u=i.getCell(l+h);if(h===0)u.value=c.totalsRowLabel;else{const d=this.getFormula(c);u.value=d?{formula:c.totalsRowFormula,result:c.totalsRowResult}:null}a(u,c.style)})}}load(a){const{table:r}=this,{row:t,col:e}=r.tl;let l=0;if(r.headerRow){const n=a.getRow(t+l++);r.columns.forEach((i,c)=>{n.getCell(e+c).value=i.name})}if(r.rows.forEach(n=>{const i=a.getRow(t+l++);n.forEach((c,h)=>{i.getCell(e+h).value=c})}),r.totalsRow){const n=a.getRow(t+l++);r.columns.forEach((i,c)=>{const h=n.getCell(e+c);c===0?h.value=i.totalsRowLabel:this.getFormula(i)&&(h.value={formula:i.totalsRowFormula,result:i.totalsRowResult})})}}get model(){return this.table}set model(a){this.table=a}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const a=m.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let r=0;r1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(a,r)}getColumn(a){const r=this.table.columns[a];return new o(this,r,a)}addColumn(a,r,t){this.cacheState(),t===void 0?(this.table.columns.push(a),this.table.rows.forEach((e,l)=>{e.push(r[l])})):(this.table.columns.splice(t,0,a),this.table.rows.forEach((e,l)=>{e.splice(t,0,r[l])}))}removeColumns(a){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(a,r),this.table.rows.forEach(t=>{t.splice(a,r)})}_assign(a,r,t){this.cacheState(),a[r]=t}get ref(){return this.table.ref}set ref(a){this._assign(this.table,"ref",a)}get name(){return this.table.name}set name(a){this.table.name=a}get displayName(){return this.table.displyName||this.table.name}set displayNamename(a){this.table.displayName=a}get headerRow(){return this.table.headerRow}set headerRow(a){this._assign(this.table,"headerRow",a)}get totalsRow(){return this.table.totalsRow}set totalsRow(a){this._assign(this.table,"totalsRow",a)}get theme(){return this.table.style.name}set theme(a){this.table.style.name=a}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(a){this.table.style.showFirstColumn=a}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(a){this.table.style.showLastColumn=a}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(a){this.table.style.showRowStripes=a}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(a){this.table.style.showColumnStripes=a}}},{"../utils/col-cache":19}],13:[function(s,T,S){const m=s("./worksheet"),o=s("./defined-names"),a=s("../xlsx/xlsx"),r=s("../csv/csv");T.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new o}get xlsx(){return this._xlsx||(this._xlsx=new a(this)),this._xlsx}get csv(){return this._csv||(this._csv=new r(this)),this._csv}get nextId(){for(let t=1;t(u&&u.orderNo)>h?u.orderNo:h,0),i=Object.assign({},e,{id:l,name:t,orderNo:n+1,workbook:this}),c=new m(i);return this._worksheets[l]=c,c}removeWorksheetEx(t){delete this._worksheets[t.id]}removeWorksheet(t){const e=this.getWorksheet(t);e&&e.destroy()}getWorksheet(t){return t===void 0?this._worksheets.find(Boolean):typeof t=="number"?this._worksheets[t]:typeof t=="string"?this._worksheets.find(e=>e&&e.name===t):void 0}get worksheets(){return this._worksheets.slice(1).sort((t,e)=>t.orderNo-e.orderNo).filter(Boolean)}eachSheet(t){this.worksheets.forEach(e=>{t(e,e.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(t){const e=this.media.length;return this.media.push(Object.assign({},t,{type:"image"})),e}getImage(t){return this.media[t]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(t=>t.model),sheets:this.worksheets.map(t=>t.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(t){this.creator=t.creator,this.lastModifiedBy=t.lastModifiedBy,this.lastPrinted=t.lastPrinted,this.created=t.created,this.modified=t.modified,this.company=t.company,this.manager=t.manager,this.title=t.title,this.subject=t.subject,this.keywords=t.keywords,this.category=t.category,this.description=t.description,this.language=t.language,this.revision=t.revision,this.contentStatus=t.contentStatus,this.properties=t.properties,this.calcProperties=t.calcProperties,this._worksheets=[],t.worksheets.forEach(e=>{const{id:l,name:n,state:i}=e,c=t.sheets&&t.sheets.findIndex(h=>h.id===l);(this._worksheets[l]=new m({id:l,name:n,orderNo:c,state:i,workbook:this})).model=e}),this._definedNames.model=t.definedNames,this.views=t.views,this._themes=t.themes,this.media=t.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(s,T,S){const m=s("../utils/under-dash"),o=s("../utils/col-cache"),a=s("./range"),r=s("./row"),t=s("./column"),e=s("./enums"),l=s("./image"),n=s("./table"),i=s("./data-validations"),c=s("../utils/encryptor"),{copyStyle:h}=s("../utils/copy-style");T.exports=class{constructor(u){u=u||{},this._workbook=u.workbook,this.id=u.id,this.orderNo=u.orderNo,this.name=u.name,this.state=u.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},u.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!u.pageSetup||!u.pageSetup.fitToWidth&&!u.pageSetup.fitToHeight||u.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},u.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},u.headerFooter),this.dataValidations=new i,this.views=u.views||[],this.autoFilter=u.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(u){if(u===void 0&&(u="sheet"+this.id),this._name!==u){if(typeof u!="string")throw new Error("The name has to be a string.");if(u==="")throw new Error("The name can't be empty.");if(u==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(u))throw new Error(`Worksheet name ${u} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(u))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+u);if(u&&u.length>31&&(console.warn(`Worksheet name ${u} exceeds 31 chars. This will be truncated`),u=u.substring(0,31)),this._workbook._worksheets.find(d=>d&&d.name.toLowerCase()===u.toLowerCase()))throw new Error("Worksheet name already exists: "+u);this._name=u}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const u=new a;return this._rows.forEach(d=>{if(d){const f=d.dimensions;f&&u.expand(d.number,f.min,d.number,f.max)}}),u}get columns(){return this._columns}set columns(u){this._headerRowCount=u.reduce((w,_)=>{const A=(_.header?1:_.headers&&_.headers.length)||0;return Math.max(w,A)},0);let d=1;const f=this._columns=[];u.forEach(w=>{const _=new t(this,d++,!1);f.push(_),_.defn=w})}getColumnKey(u){return this._keys[u]}setColumnKey(u,d){this._keys[u]=d}deleteColumnKey(u){delete this._keys[u]}eachColumnKey(u){m.each(this._keys,u)}getColumn(u){if(typeof u=="string"){const d=this._keys[u];if(d)return d;u=o.l2n(u)}if(this._columns||(this._columns=[]),u>this._columns.length){let d=this._columns.length+1;for(;d<=u;)this._columns.push(new t(this,d++))}return this._columns[u-1]}spliceColumns(u,d){const f=this._rows.length;for(var w=arguments.length,_=new Array(w>2?w-2:0),A=2;A0)for(let P=0;P{D.push(B[P]||null)});const $=this.getRow(P+1);$.splice.apply($,D)}else this._rows.forEach(P=>{P&&P.splice(u,d)});const N=_.length-d,L=u+d,j=this._columns.length;if(N<0)for(let P=u+_.length;P<=j;P++)this.getColumn(P).defn=this.getColumn(P-N).defn;else if(N>0)for(let P=j;P>=L;P--)this.getColumn(P+N).defn=this.getColumn(P).defn;for(let P=u;P{u=Math.max(u,d.cellCount)}),u}get actualColumnCount(){const u=[];let d=0;return this.eachRow(f=>{f.eachCell(w=>{let{col:_}=w;u[_]||(u[_]=!0,d++)})}),d}_commitRow(){}get _lastRowNumber(){const u=this._rows;let d=u.length;for(;d>0&&u[d-1]===void 0;)d--;return d}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(u){return this._rows[u-1]}findRows(u,d){return this._rows.slice(u-1,u-1+d)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let u=0;return this.eachRow(()=>{u++}),u}getRow(u){let d=this._rows[u-1];return d||(d=this._rows[u-1]=new r(this,u)),d}getRows(u,d){if(d<1)return;const f=[];for(let w=u;w1&&arguments[1]!==void 0?arguments[1]:"n";const f=this._nextRow,w=this.getRow(f);return w.values=u,this._setStyleOption(f,d[0]==="i"?d:"n"),w}addRows(u){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const f=[];return u.forEach(w=>{f.push(this.addRow(w,d))}),f}insertRow(u,d){let f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(u,0,d),this._setStyleOption(u,f),this.getRow(u)}insertRows(u,d){let f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(u,0,...d),f!=="n")for(let w=0;w1&&arguments[1]!==void 0?arguments[1]:"n";d[0]==="o"&&this.findRow(u+1)!==void 0?this._copyStyle(u+1,u,d[1]==="+"):d[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u,d[1]==="+")}_copyStyle(u,d){let f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const w=this.getRow(u),_=this.getRow(d);_.style=h(w.style),w.eachCell({includeEmpty:f},(A,N)=>{_.getCell(N).style=h(A.style)}),_.height=w.height}duplicateRow(u,d){let f=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const w=this._rows[u-1],_=new Array(d).fill(w.values);this.spliceRows(u+1,f?0:d,..._);for(let A=0;A{N.getCell(j).style=L.style})}}spliceRows(u,d){const f=u+d;for(var w=arguments.length,_=new Array(w>2?w-2:0),A=2;A{$.getCell(x).style=B.style}),this._rows[P-1]=void 0}else this._rows[P+L-1]=void 0;else if(L>0)for(P=j;P>=f;P--)if(D=this._rows[P-1],D){const $=this.getRow(P+L);$.values=D.values,$.style=D.style,$.height=D.height,D.eachCell({includeEmpty:!0},(B,x)=>{if($.getCell(x).style=B.style,B._value.constructor.name==="MergeValue"){const M=this.getRow(B._row._number+N).getCell(x),v=B._value._master,p=this.getRow(v._row._number+N).getCell(v._column._number);M.merge(p)}})}else this._rows[P+L-1]=void 0;for(P=0;P{f&&f.hasValues&&d(f,f.number)})}getSheetValues(){const u=[];return this._rows.forEach(d=>{d&&(u[d.number]=d.values)}),u}findCell(u,d){const f=o.getAddress(u,d),w=this._rows[f.row-1];return w?w.findCell(f.col):void 0}getCell(u,d){const f=o.getAddress(u,d);return this.getRow(f.row).getCellEx(f)}mergeCells(){for(var u=arguments.length,d=new Array(u),f=0;f{if(w.intersects(u))throw new Error("Cannot merge already merged cells")});const f=this.getCell(u.top,u.left);for(let w=u.top;w<=u.bottom;w++)for(let _=u.left;_<=u.right;_++)(w>u.top||_>u.left)&&this.getCell(w,_).merge(f,d);this._merges[f.address]=u}_unMergeMaster(u){const d=this._merges[u.address];if(d){for(let f=d.top;f<=d.bottom;f++)for(let w=d.left;w<=d.right;w++)this.getCell(f,w).unmerge();delete this._merges[u.address]}}get hasMerges(){return m.some(this._merges,Boolean)}unMergeCells(){for(var u=arguments.length,d=new Array(u),f=0;f3&&arguments[3]!==void 0?arguments[3]:"shared";const _=o.decode(u),{top:A,left:N,bottom:L,right:j}=_,P=j-N+1,D=o.encodeAddress(A,N),$=w==="shared";let B;B=typeof f=="function"?f:Array.isArray(f)?Array.isArray(f[0])?(M,v)=>f[M-A][v-N]:(M,v)=>f[(M-A)*P+(v-N)]:()=>{};let x=!0;for(let M=A;M<=L;M++)for(let v=N;v<=j;v++)x?(this.getCell(M,v).value={shareType:w,formula:d,ref:u,result:B(M,v)},x=!1):this.getCell(M,v).value=$?{sharedFormula:D,result:B(M,v)}:B(M,v)}addImage(u,d){const f={type:"image",imageId:u,range:d};this._media.push(new l(this,f))}getImages(){return this._media.filter(u=>u.type==="image")}addBackgroundImage(u){const d={type:"background",imageId:u};this._media.push(new l(this,d))}getBackgroundImageId(){const u=this._media.find(d=>d.type==="background");return u&&u.imageId}protect(u,d){return new Promise(f=>{this.sheetProtection={sheet:!0},d&&"spinCount"in d&&(d.spinCount=Number.isFinite(d.spinCount)?Math.round(Math.max(0,d.spinCount)):1e5),u&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=c.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=d&&"spinCount"in d?d.spinCount:1e5,this.sheetProtection.hashValue=c.convertPasswordToHash(u,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),d&&(this.sheetProtection=Object.assign(this.sheetProtection,d),!u&&"spinCount"in d&&delete this.sheetProtection.spinCount),f()})}unprotect(){this.sheetProtection=null}addTable(u){const d=new n(this,u);return this.tables[u.name]=d,d}getTable(u){return this.tables[u]}removeTable(u){delete this.tables[u]}getTables(){return Object.values(this.tables)}addConditionalFormatting(u){this.conditionalFormattings.push(u)}removeConditionalFormatting(u){typeof u=="number"?this.conditionalFormattings.splice(u,1):this.conditionalFormattings=u instanceof Function?this.conditionalFormattings.filter(u):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(u){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=u}get model(){const u={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map(w=>w.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(w=>w.model),conditionalFormattings:this.conditionalFormattings};u.cols=t.toModel(this.columns);const d=u.rows=[],f=u.dimensions=new a;return this._rows.forEach(w=>{const _=w&&w.model;_&&(f.expand(_.number,_.min,_.number,_.max),d.push(_))}),u.merges=[],m.each(this._merges,w=>{u.merges.push(w.range)}),u}_parseRows(u){this._rows=[],u.rows.forEach(d=>{const f=new r(this,d.number);this._rows[f.number-1]=f,f.model=d})}_parseMergeCells(u){m.each(u.mergeCells,d=>{this.mergeCellsWithoutStyle(d)})}set model(u){this.name=u.name,this._columns=t.fromModel(this,u.cols),this._parseRows(u),this._parseMergeCells(u),this.dataValidations=new i(u.dataValidations),this.properties=u.properties,this.pageSetup=u.pageSetup,this.headerFooter=u.headerFooter,this.views=u.views,this.autoFilter=u.autoFilter,this._media=u.media.map(d=>new l(this,d)),this.sheetProtection=u.sheetProtection,this.tables=u.tables.reduce((d,f)=>{const w=new n;return w.model=f,d[f.name]=w,d},{}),this.conditionalFormattings=u.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(s,T,S){s("core-js/modules/es.promise"),s("core-js/modules/es.promise.finally"),s("core-js/modules/es.object.assign"),s("core-js/modules/es.object.keys"),s("core-js/modules/es.object.values"),s("core-js/modules/es.symbol"),s("core-js/modules/es.symbol.async-iterator"),s("core-js/modules/es.array.iterator"),s("core-js/modules/es.array.includes"),s("core-js/modules/es.array.find-index"),s("core-js/modules/es.array.find"),s("core-js/modules/es.string.from-code-point"),s("core-js/modules/es.string.includes"),s("core-js/modules/es.number.is-nan"),s("regenerator-runtime/runtime");const m={Workbook:s("./doc/workbook")},o=s("./doc/enums");Object.keys(o).forEach(a=>{m[a]=o[a]}),T.exports=m},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(s,T,S){const m=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");S.bufferToString=function(o){return typeof o=="string"?o:m?m.decode(o):o.toString()}},{}],17:[function(s,T,S){const m=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:o}=s("buffer");S.stringToBuffer=function(a){return typeof a!="string"?a:m?o.from(m.encode(a).buffer):o.from(a)}},{buffer:220}],18:[function(s,T,S){const m=s("./under-dash"),o=s("./col-cache");T.exports=class{constructor(a){this.template=a,this.sheets={}}addCell(a){this.addCellEx(o.decodeEx(a))}getCell(a){return this.findCellEx(o.decodeEx(a),!0)}findCell(a){return this.findCellEx(o.decodeEx(a),!1)}findCellAt(a,r,t){const e=this.sheets[a],l=e&&e[r];return l&&l[t]}addCellEx(a){if(a.top)for(let r=a.top;r<=a.bottom;r++)for(let t=a.left;t<=a.right;t++)this.getCellAt(a.sheetName,r,t);else this.findCellEx(a,!0)}getCellEx(a){return this.findCellEx(a,!0)}findCellEx(a,r){const t=this.findSheet(a,r),e=this.findSheetRow(t,a,r);return this.findRowCell(e,a,r)}getCellAt(a,r,t){const e=this.sheets[a]||(this.sheets[a]=[]),l=e[r]||(e[r]=[]);return l[t]||(l[t]={sheetName:a,address:o.n2l(t)+r,row:r,col:t})}removeCellEx(a){const r=this.findSheet(a);if(!r)return;const t=this.findSheetRow(r,a);t&&delete t[a.col]}forEachInSheet(a,r){const t=this.sheets[a];t&&t.forEach((e,l)=>{e&&e.forEach((n,i)=>{n&&r(n,l,i)})})}forEach(a){m.each(this.sheets,(r,t)=>{this.forEachInSheet(t,a)})}map(a){const r=[];return this.forEach(t=>{r.push(a(t))}),r}findSheet(a,r){const t=a.sheetName;return this.sheets[t]?this.sheets[t]:r?this.sheets[t]=[]:void 0}findSheetRow(a,r,t){const{row:e}=r;return a&&a[e]?a[e]:t?a[e]=[]:void 0}findRowCell(a,r,t){const{col:e}=r;return a&&a[e]?a[e]:t?a[e]=this.template?Object.assign(r,JSON.parse(JSON.stringify(this.template))):r:void 0}spliceRows(a,r,t,e){const l=this.sheets[a];if(l){const n=[];for(let i=0;i{i.splice(r,t,...n)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(s,T,S){const m=/^[A-Z]+\d+$/,o={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:a=>a<=26?1:a<=676?2:3,_fill(a){let r,t,e,l,n,i=1;if(a>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&a>=1){for(;i<=26;)r=this._dictionary[i-1],this._n2l[i]=r,this._l2n[r]=i,i++;this._l2nFill=1}if(this._l2nFill<2&&a>=2){for(i=27;i<=702;)t=i-27,e=t%26,l=Math.floor(t/26),r=this._dictionary[l]+this._dictionary[e],this._n2l[i]=r,this._l2n[r]=i,i++;this._l2nFill=2}if(this._l2nFill<3&&a>=3){for(i=703;i<=16384;)t=i-703,e=t%26,l=Math.floor(t/26)%26,n=Math.floor(t/676),r=this._dictionary[n]+this._dictionary[l]+this._dictionary[e],this._n2l[i]=r,this._l2n[r]=i,i++;this._l2nFill=3}},l2n(a){if(this._l2n[a]||this._fill(a.length),!this._l2n[a])throw new Error("Out of bounds. Invalid column letter: "+a);return this._l2n[a]},n2l(a){if(a<1||a>16384)throw new Error(a+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[a]||this._fill(this._level(a)),this._n2l[a]},_hash:{},validateAddress(a){if(!m.test(a))throw new Error("Invalid Address: "+a);return!0},decodeAddress(a){const r=a.length<5&&this._hash[a];if(r)return r;let t=!1,e="",l=0,n=!1,i="",c=0;for(let u,d=0;d=65&&u<=90)t=!0,e+=a[d],l=26*l+u-64;else if(u>=48&&u<=57)n=!0,i+=a[d],c=10*c+u-48;else if(n&&t&&u!==36)break;if(t){if(l>16384)throw new Error("Out of bounds. Invalid column letter: "+e)}else l=void 0;n||(c=void 0);const h={address:a=e+i,col:l,row:c,$col$row:`$${e}$${i}`};return l<=100&&c<=100&&(this._hash[a]=h,this._hash[h.$col$row]=h),h},getAddress(a,r){if(r){const t=this.n2l(r)+a;return this.decodeAddress(t)}return this.decodeAddress(a)},decode(a){const r=a.split(":");if(r.length===2){const t=this.decodeAddress(r[0]),e=this.decodeAddress(r[1]),l={top:Math.min(t.row,e.row),left:Math.min(t.col,e.col),bottom:Math.max(t.row,e.row),right:Math.max(t.col,e.col)};return l.tl=this.n2l(l.left)+l.top,l.br=this.n2l(l.right)+l.bottom,l.dimensions=`${l.tl}:${l.br}`,l}return this.decodeAddress(a)},decodeEx(a){const r=a.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),t=r[1]||r[2],e=r[3],l=e.split(":");if(l.length>1){let i=this.decodeAddress(l[0]),c=this.decodeAddress(l[1]);const h=Math.min(i.row,c.row),u=Math.min(i.col,c.col),d=Math.max(i.row,c.row),f=Math.max(i.col,c.col);return i=this.n2l(u)+h,c=this.n2l(f)+d,{top:h,left:u,bottom:d,right:f,sheetName:t,tl:{address:i,col:u,row:h,$col$row:`$${this.n2l(u)}$${h}`,sheetName:t},br:{address:c,col:f,row:d,$col$row:`$${this.n2l(f)}$${d}`,sheetName:t},dimensions:`${i}:${c}`}}if(e.startsWith("#"))return t?{sheetName:t,error:e}:{error:e};const n=this.decodeAddress(e);return t?{sheetName:t,...n}:n},encodeAddress:(a,r)=>o.n2l(r)+a,encode(){switch(arguments.length){case 2:return o.encodeAddress(arguments[0],arguments[1]);case 4:return`${o.encodeAddress(arguments[0],arguments[1])}:${o.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(a,r){const[t,e,,l,n]=a,[i,c]=r;return i>=t&&i<=l&&c>=e&&c<=n}};T.exports=o},{}],20:[function(s,T,S){const m=(a,r)=>({...a,...r.reduce((t,e)=>(a[e]&&(t[e]={...a[e]}),t),{})}),o=function(a,r,t){let e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];a[t]&&(r[t]=m(a[t],e))};S.copyStyle=a=>{if(!a)return a;if(r=a,Object.keys(r).length===0)return{};var r;const t={...a};return o(a,t,"font",["color"]),o(a,t,"alignment"),o(a,t,"protection"),a.border&&(o(a,t,"border"),o(a.border,t.border,"top",["color"]),o(a.border,t.border,"left",["color"]),o(a.border,t.border,"bottom",["color"]),o(a.border,t.border,"right",["color"]),o(a.border,t.border,"diagonal",["color"])),a.fill&&(o(a,t,"fill",["fgColor","bgColor","center"]),a.fill.stops&&(t.fill.stops=a.fill.stops.map(e=>m(e,["color"])))),t}},{}],21:[function(s,T,S){(function(m){(function(){const o=s("crypto"),a={hash(r){const t=o.createHash(r);for(var e=arguments.length,l=new Array(e>1?e-1:0),n=1;no.randomBytes(r)};T.exports=a}).call(this)}).call(this,s("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(s,T,S){const{SaxesParser:m}=s("saxes"),{PassThrough:o}=s("readable-stream"),{bufferToString:a}=s("./browser-buffer-decode");T.exports=async function*(r){r.pipe&&!r[Symbol.asyncIterator]&&(r=r.pipe(new o));const t=new m;let e;t.on("error",n=>{e=n});let l=[];t.on("opentag",n=>l.push({eventType:"opentag",value:n})),t.on("text",n=>l.push({eventType:"text",value:n})),t.on("closetag",n=>l.push({eventType:"closetag",value:n}));for await(const n of r){if(t.write(a(n)),e)throw e;yield l,l=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(s,T,S){const m=s("./col-cache"),o=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,a=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;T.exports={slideFormula:function(r,t,e){const l=m.decode(t),n=m.decode(e);return r.replace(o,(i,c,h,u,d)=>{if(d)return i;const f=a.exec(u);if(f){const w=f[1],_=f[2].toUpperCase(),A=f[3],N=f[4];if(_.length>3||_.length===3&&_>"XFD")return i;let L=m.l2n(_),j=parseInt(N,10);return w||(L+=n.col-l.col),A||(j+=n.row-l.row),(c||"")+(w||"")+m.n2l(L)+(A||"")+j}return i})}}},{"./col-cache":19}],24:[function(s,T,S){(function(m,o){(function(){const a=s("readable-stream"),r=s("./utils"),t=s("./string-buf");class e{constructor(u,d){this._data=u,this._encoding=d}get length(){return this.toBuffer().length}copy(u,d,f,w){return this.toBuffer().copy(u,d,f,w)}toBuffer(){return this._buffer||(this._buffer=o.from(this._data,this._encoding)),this._buffer}}class l{constructor(u){this._data=u}get length(){return this._data.length}copy(u,d,f,w){return this._data._buf.copy(u,d,f,w)}toBuffer(){return this._data.toBuffer()}}class n{constructor(u){this._data=u}get length(){return this._data.length}copy(u,d,f,w){this._data.copy(u,d,f,w)}toBuffer(){return this._data}}class i{constructor(u){this.size=u,this.buffer=o.alloc(u),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;const u=o.alloc(this.iWrite-this.iRead);return this.buffer.copy(u,0,this.iRead,this.iWrite),u}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(u){let d;return u===0?null:u===void 0||u>=this.length?(d=this.toBuffer(),this.iRead=this.iWrite,d):(d=o.alloc(u),this.buffer.copy(d,0,this.iRead,u),this.iRead+=u,d)}write(u,d,f){const w=Math.min(f,this.size-this.iWrite);return u.copy(this.buffer,this.iWrite,d,d+w),this.iWrite+=w,w}}const c=function(h){h=h||{},this.bufSize=h.bufSize||1048576,this.buffers=[],this.batch=h.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};r.inherits(c,a.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return o.concat(this.buffers.map(h=>h.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const u=this.buffers[this.buffers.length-1];if(!u.full)return u}const h=new i(this.bufSize);return this.buffers.push(h),h},async _pipe(h){await Promise.all(this.pipes.map(function(u){return new Promise(d=>{u.write(h.toBuffer(),()=>{d()})})}))},_writeToBuffers(h){let u=0;const d=h.length;for(;u1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(f),m.nextTick(d)):(await this._pipe(f),d());else this.paused||this.emit("data",f.toBuffer()),this._writeToBuffers(f),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(h,u,d){const f=w=>{w?d(w):(this._flush(),this.pipes.forEach(_=>{_.end()}),this.emit("finish"))};h?this.write(h,u,f):f()},read(h){let u;if(h){for(u=[];h&&this.buffers.length&&!this.buffers[0].eod;){const d=this.buffers[0],f=d.read(h);h-=f.length,u.push(f),d.eod&&d.full&&this.buffers.shift()}return o.concat(u)}return u=this.buffers.map(d=>d.toBuffer()).filter(Boolean),this.buffers=[],o.concat(u)},setEncoding(h){this.encoding=h},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(h){this.pipes.push(h),!this.paused&&this.buffers.length&&this.end()},unpipe(h){this.pipes=this.pipes.filter(u=>u!==h)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),T.exports=c}).call(this)}).call(this,s("_process"),s("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(s,T,S){(function(m){(function(){T.exports=class{constructor(o){this._buf=m.alloc(o&&o.size||16384),this._encoding=o&&o.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=m.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(o){o=o||0,this._buffer=void 0,this._inPos=o}_grow(o){let a=2*this._buf.length;for(;a=this._buf.length-4;)this._grow(this._inPos+o.length),a=this._inPos+this._buf.write(o,this._inPos,this._encoding);this._inPos=a}addStringBuf(o){o.length&&(this._buffer=void 0,this.length+o.length>this.capacity&&this._grow(this.length+o.length),o._buf.copy(this._buf,this._inPos,0,o.length),this._inPos+=o.length)}}}).call(this)}).call(this,s("buffer").Buffer)},{buffer:220}],26:[function(s,T,S){const{toString:m}=Object.prototype,o=/["&<>]/,a={each:function(r,t){r&&(Array.isArray(r)?r.forEach(t):Object.keys(r).forEach(e=>{t(r[e],e)}))},some:function(r,t){return!!r&&(Array.isArray(r)?r.some(t):Object.keys(r).some(e=>t(r[e],e)))},every:function(r,t){return!r||(Array.isArray(r)?r.every(t):Object.keys(r).every(e=>t(r[e],e)))},map:function(r,t){return r?Array.isArray(r)?r.map(t):Object.keys(r).map(e=>t(r[e],e)):[]},keyBy:(r,t)=>r.reduce((e,l)=>(e[l[t]]=l,e),{}),isEqual:function(r,t){const e=typeof r,l=typeof t,n=Array.isArray(r),i=Array.isArray(t);let c;if(e!==l)return!1;switch(typeof r){case"object":if(n||i)return!(!n||!i)&&r.length===t.length&&r.every((h,u)=>{const d=t[u];return a.isEqual(h,d)});if(r===null||t===null)return r===t;if(c=Object.keys(r),Object.keys(t).length!==c.length)return!1;for(const h of c)if(!t.hasOwnProperty(h))return!1;return a.every(r,(h,u)=>{const d=t[u];return a.isEqual(h,d)});default:return r===t}},escapeHtml(r){const t=o.exec(r);if(!t)return r;let e="",l="",n=0,i=t.index;for(;i":l=">";break;default:continue}n!==i&&(e+=r.substring(n,i)),n=i+1,e+=l}return n!==i?e+r.substring(n,i):e},strcmp:(r,t)=>rt?1:0,isUndefined:r=>m.call(r)==="[object Undefined]",isObject:r=>m.call(r)==="[object Object]",deepMerge(){const r=arguments[0]||{},{length:t}=arguments;let e,l,n;function i(c,h){e=r[h],n=Array.isArray(c),a.isObject(c)||n?(n?(n=!1,l=e&&Array.isArray(e)?e:[]):l=e&&a.isObject(e)?e:{},r[h]=a.deepMerge(l,c)):a.isUndefined(c)||(r[h]=c)}for(let c=0;c&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,t={nop(){},promiseImmediate:e=>new Promise(l=>{m.setImmediate?o(()=>{l(e)}):setTimeout(()=>{l(e)},1)}),inherits:function(e,l,n,i){e.super_=l,i||(i=n,n=null),n&&Object.keys(n).forEach(h=>{Object.defineProperty(e,h,Object.getOwnPropertyDescriptor(n,h))});const c={constructor:{value:e,enumerable:!1,writable:!1,configurable:!0}};i&&Object.keys(i).forEach(h=>{c[h]=Object.getOwnPropertyDescriptor(i,h)}),e.prototype=Object.create(l.prototype,c)},dateToExcel:(e,l)=>25569+e.getTime()/864e5-(l?1462:0),excelToDate(e,l){const n=Math.round(24*(e-25569+(l?1462:0))*3600*1e3);return new Date(n)},parsePath(e){const l=e.lastIndexOf("/");return{path:e.substring(0,l),name:e.substring(l+1)}},getRelsPath(e){const l=t.parsePath(e);return`${l.path}/_rels/${l.name}.rels`},xmlEncode(e){const l=r.exec(e);if(!l)return e;let n="",i="",c=0,h=l.index;for(;h=11&&u!==13)){i="";break}continue}c!==h&&(n+=e.substring(c,h)),c=h+1,i&&(n+=i)}return c!==h?n+e.substring(c,h):n},xmlDecode:e=>e.replace(/&([a-z]*);/g,l=>{switch(l){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return l}}),validInt(e){const l=parseInt(e,10);return Number.isNaN(l)?0:l},isDateFmt(e){return e?(e=(e=e.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:e=>new Promise(l=>{a.access(e,a.constants.F_OK,n=>{l(!n)})})},toIsoDateString:e=>e.toIsoString().subsstr(0,10),parseBoolean:e=>e===!0||e==="true"||e===1||e==="1"};T.exports=t}).call(this)}).call(this,typeof Kt<"u"?Kt:typeof self<"u"?self:typeof window<"u"?window:{},s("timers").setImmediate)},{fs:216,timers:523}],28:[function(s,T,S){const m=s("./under-dash"),o=s("./utils");function a(e,l,n){e.push(` ${l}="${o.xmlEncode(n.toString())}"`)}function r(e,l){if(l){const n=[];m.each(l,(i,c)=>{i!==void 0&&a(n,c,i)}),e.push(n.join(""))}}class t{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(l){const n=this._xml;n.push(" `)}openNode(l,n){const i=this.tos,c=this._xml;i&&this.open&&c.push(">"),this._stack.push(l),c.push("<"),c.push(l),r(c,n),this.leaf=!0,this.open=!0}addAttribute(l,n){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");n!==void 0&&a(this._xml,l,n)}addAttributes(l){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");r(this._xml,l)}writeText(l){const n=this._xml;this.open&&(n.push(">"),this.open=!1),this.leaf=!1,n.push(o.xmlEncode(l.toString()))}writeXml(l){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(l)}closeNode(){const l=this._stack.pop(),n=this._xml;this.leaf?n.push("/>"):(n.push("")),this.open=!1,this.leaf=!1}leafNode(l,n,i){this.openNode(l,n),i!==void 0&&this.writeText(i),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){const l=this._rollbacks.pop();this._xml.length>l.xml&&this._xml.splice(l.xml,this._xml.length-l.xml),this._stack.length>l.stack&&this._stack.splice(l.stack,this._stack.length-l.stack),this.leaf=l.leaf,this.open=l.open}get xml(){return this.closeAll(),this._xml.join("")}}t.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},T.exports=t},{"./under-dash":26,"./utils":27}],29:[function(s,T,S){(function(m){(function(){const o=s("events"),a=s("jszip"),r=s("./stream-buf"),{stringToBuffer:t}=s("./browser-buffer-encode");class e extends o.EventEmitter{constructor(n){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},n),this.zip=new a,this.stream=new r}append(n,i){i.hasOwnProperty("base64")&&i.base64?this.zip.file(i.name,n,{base64:!0}):(m.browser&&typeof n=="string"&&(n=t(n)),this.zip.file(i.name,n))}async finalize(){const n=await this.zip.generateAsync(this.options);this.stream.end(n),this.emit("finish")}read(n){return this.stream.read(n)}setEncoding(n){return this.stream.setEncoding(n)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(n,i){return this.stream.pipe(n,i)}unpipe(n){return this.stream.unpipe(n)}unshift(n){return this.stream.unshift(n)}wrap(n){return this.stream.wrap(n)}}T.exports={ZipWriter:e}}).call(this)}).call(this,s("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(s,T,S){T.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],31:[function(s,T,S){T.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],32:[function(s,T,S){const m=s("../../utils/parse-sax"),o=s("../../utils/xml-stream");class a{prepare(){}render(){}parseOpen(t){}parseText(t){}parseClose(t){}reconcile(t,e){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(t=>{t instanceof a?t.reset():t.xform&&t.xform.reset()})}mergeModel(t){this.model=Object.assign(this.model||{},t)}async parse(t){for await(const e of t)for(const{eventType:l,value:n}of e)if(l==="opentag")this.parseOpen(n);else if(l==="text")this.parseText(n);else if(l==="closetag"&&!this.parseClose(n.name))return this.model;return this.model}async parseStream(t){return this.parse(m(t))}get xml(){return this.toXml(this.model)}toXml(t){const e=new o;return this.render(e,t),e.xml}static toAttribute(t,e){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(t===void 0){if(l)return e}else if(l||t!==e)return t.toString()}static toStringAttribute(t,e){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return a.toAttribute(t,e,l)}static toStringValue(t,e){return t===void 0?e:t}static toBoolAttribute(t,e){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(t===void 0){if(l)return e}else if(l||t!==e)return t?"1":"0"}static toBoolValue(t,e){return t===void 0?e:t==="1"}static toIntAttribute(t,e){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return a.toAttribute(t,e,l)}static toIntValue(t,e){return t===void 0?e:parseInt(t,10)}static toFloatAttribute(t,e){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return a.toAttribute(t,e,l)}static toFloatValue(t,e){return t===void 0?e:parseFloat(t)}}T.exports=a},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(s,T,S){const m=s("../base-xform"),o=s("../../../utils/col-cache");function a(t){try{return o.decodeEx(t),!0}catch{return!1}}function r(t){const e=[];let l=!1,n="";return t.split(",").forEach(i=>{if(!i)return;const c=(i.match(/'/g)||[]).length;if(!c)return void(l?n+=i+",":a(i)&&e.push(i));const h=c%2==0;!l&&h&&a(i)?e.push(i):l&&!h?(l=!1,a(n+i)&&e.push(n+i),n=""):(l=!0,n+=i+",")}),e}T.exports=class extends m{render(t,e){t.openNode("definedName",{name:e.name,localSheetId:e.localSheetId}),t.writeText(e.ranges.join(",")),t.closeNode()}parseOpen(t){switch(t.name){case"definedName":return this._parsedName=t.attributes.name,this._parsedLocalSheetId=t.attributes.localSheetId,this._parsedText=[],!0;default:return!1}}parseText(t){this._parsedText.push(t)}parseClose(){return this.model={name:this._parsedName,ranges:r(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(s,T,S){const m=s("../../../utils/utils"),o=s("../base-xform");T.exports=class extends o{render(a,r){a.leafNode("sheet",{sheetId:r.id,name:r.name,state:r.state,"r:id":r.rId})}parseOpen(a){return a.name==="sheet"&&(this.model={name:m.xmlDecode(a.attributes.name),id:parseInt(a.attributes.sheetId,10),state:a.attributes.state,rId:a.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{render(o,a){o.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:a.fullCalcOnLoad?1:void 0})}parseOpen(o){return o.name==="calcPr"&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{render(o,a){o.leafNode("workbookPr",{date1904:a.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(o){return o.name==="workbookPr"&&(this.model={date1904:o.attributes.date1904==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],37:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{render(o,a){const r={xWindow:a.x||0,yWindow:a.y||0,windowWidth:a.width||12e3,windowHeight:a.height||24e3,firstSheet:a.firstSheet,activeTab:a.activeTab};a.visibility&&a.visibility!=="visible"&&(r.visibility=a.visibility),o.leafNode("workbookView",r)}parseOpen(o){if(o.name==="workbookView"){const a=this.model={},r=function(e,l,n){const i=l!==void 0?a[e]=l:n;i!==void 0&&(a[e]=i)},t=function(e,l,n){const i=l!==void 0?a[e]=parseInt(l,10):n;i!==void 0&&(a[e]=i)};return t("x",o.attributes.xWindow,0),t("y",o.attributes.yWindow,0),t("width",o.attributes.windowWidth,25e3),t("height",o.attributes.windowHeight,1e4),r("visibility",o.attributes.visibility,"visible"),t("activeTab",o.attributes.activeTab,void 0),t("firstSheet",o.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(s,T,S){const m=s("../../../utils/under-dash"),o=s("../../../utils/col-cache"),a=s("../../../utils/xml-stream"),r=s("../base-xform"),t=s("../static-xform"),e=s("../list-xform"),l=s("./defined-name-xform"),n=s("./sheet-xform"),i=s("./workbook-view-xform"),c=s("./workbook-properties-xform"),h=s("./workbook-calc-properties-xform");class u extends r{constructor(){super(),this.map={fileVersion:u.STATIC_XFORMS.fileVersion,workbookPr:new c,bookViews:new e({tag:"bookViews",count:!1,childXform:new i}),sheets:new e({tag:"sheets",count:!1,childXform:new n}),definedNames:new e({tag:"definedNames",count:!1,childXform:new l}),calcPr:new h}}prepare(f){f.sheets=f.worksheets;const w=[];let _=0;f.sheets.forEach(A=>{if(A.pageSetup&&A.pageSetup.printArea&&A.pageSetup.printArea.split("&&").forEach(N=>{const L=N.split(":"),j={name:"_xlnm.Print_Area",ranges:[`'${A.name}'!$${L[0]}:$${L[1]}`],localSheetId:_};w.push(j)}),A.pageSetup&&(A.pageSetup.printTitlesRow||A.pageSetup.printTitlesColumn)){const N=[];if(A.pageSetup.printTitlesColumn){const j=A.pageSetup.printTitlesColumn.split(":");N.push(`'${A.name}'!$${j[0]}:$${j[1]}`)}if(A.pageSetup.printTitlesRow){const j=A.pageSetup.printTitlesRow.split(":");N.push(`'${A.name}'!$${j[0]}:$${j[1]}`)}const L={name:"_xlnm.Print_Titles",ranges:N,localSheetId:_};w.push(L)}_++}),w.length&&(f.definedNames=f.definedNames.concat(w)),(f.media||[]).forEach((A,N)=>{A.name=A.type+(N+1)})}render(f,w){f.openXml(a.StdDocAttributes),f.openNode("workbook",u.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(f),this.map.workbookPr.render(f,w.properties),this.map.bookViews.render(f,w.views),this.map.sheets.render(f,w.sheets),this.map.definedNames.render(f,w.definedNames),this.map.calcPr.render(f,w.calcProperties),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"workbook":return!0;default:return this.parser=this.map[f.name],this.parser&&this.parser.parseOpen(f),!0}}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){if(this.parser)return this.parser.parseClose(f)||(this.parser=void 0),!0;switch(f){case"workbook":return this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1;default:return!0}}reconcile(f){const w=(f.workbookRels||[]).reduce((j,P)=>(j[P.Id]=P,j),{}),_=[];let A,N=0;(f.sheets||[]).forEach(j=>{const P=w[j.rId];P&&(A=f.worksheetHash["xl/"+P.Target.replace(/^(\s|\/xl\/)+/,"")],A&&(A.name=j.name,A.id=j.id,A.state=j.state,_[N++]=A))});const L=[];m.each(f.definedNames,j=>{if(j.name==="_xlnm.Print_Area"){if(A=_[j.localSheetId],A){A.pageSetup||(A.pageSetup={});const P=o.decodeEx(j.ranges[0]);A.pageSetup.printArea=A.pageSetup.printArea?`${A.pageSetup.printArea}&&${P.dimensions}`:P.dimensions}}else if(j.name==="_xlnm.Print_Titles"){if(A=_[j.localSheetId],A){A.pageSetup||(A.pageSetup={});const P=j.ranges.join(","),D=/\$/g,$=/\$\d+:\$\d+/,B=P.match($);if(B&&B.length){const v=B[0];A.pageSetup.printTitlesRow=v.replace(D,"")}const x=/\$[A-Z]+:\$[A-Z]+/,M=P.match(x);if(M&&M.length){const v=M[0];A.pageSetup.printTitlesColumn=v.replace(D,"")}}}else L.push(j)}),f.definedNames=L,f.media.forEach((j,P)=>{j.index=P})}}u.WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},u.STATIC_XFORMS={fileVersion:new t({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},T.exports=u},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./defined-name-xform":33,"./sheet-xform":34,"./workbook-calc-properties-xform":35,"./workbook-properties-xform":36,"./workbook-view-xform":37}],39:[function(s,T,S){const m=s("../strings/rich-text-xform"),o=s("../../../utils/utils"),a=s("../base-xform"),r=T.exports=function(t){this.model=t};o.inherits(r,a,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new m),this._richTextXform},render(t,e){e=e||this.model,t.openNode("comment",{ref:e.ref,authorId:0}),t.openNode("text"),e&&e.note&&e.note.texts&&e.note.texts.forEach(l=>{this.richTextXform.render(t,l)}),t.closeNode(),t.closeNode()},parseOpen(t){if(this.parser)return this.parser.parseOpen(t),!0;switch(t.name){case"comment":return this.model={type:"note",note:{texts:[]},...t.attributes},!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(t),!0;default:return!1}},parseText(t){this.parser&&this.parser.parseText(t)},parseClose(t){switch(t){case"comment":return!1;case"r":return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(t),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(s,T,S){const m=s("../../../utils/xml-stream"),o=s("../../../utils/utils"),a=s("../base-xform"),r=s("./comment-xform"),t=T.exports=function(){this.map={comment:new r}};o.inherits(t,a,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(e,l){l=l||this.model,e.openXml(m.StdDocAttributes),e.openNode("comments",t.COMMENTS_ATTRIBUTES),e.openNode("authors"),e.leafNode("author",null,"Author"),e.closeNode(),e.openNode("commentList"),l.comments.forEach(n=>{this.map.comment.render(e,n)}),e.closeNode(),e.closeNode()},parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(e),!0;default:return!1}},parseText(e){this.parser&&this.parser.parseText(e)},parseClose(e){switch(e){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(e),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(s,T,S){const m=s("../../base-xform");T.exports=class extends m{constructor(o){super(),this._model=o}get tag(){return this._model&&this._model.tag}render(o,a,r){(a===r[2]||this.tag==="x:SizeWithCells"&&a===r[1])&&o.leafNode(this.tag)}parseOpen(o){switch(o.name){case this.tag:return this.model={},this.model[this.tag]=!0,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../base-xform":32}],42:[function(s,T,S){const m=s("../../base-xform");T.exports=class extends m{constructor(o){super(),this._model=o}get tag(){return this._model&&this._model.tag}render(o,a){o.leafNode(this.tag,null,a)}parseOpen(o){switch(o.name){case this.tag:return this.text="",!0;default:return!1}}parseText(o){this.text=o}parseClose(){return!1}}},{"../../base-xform":32}],43:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"x:Anchor"}getAnchorRect(o){const a=Math.floor(o.left),r=Math.floor(68*(o.left-a)),t=Math.floor(o.top),e=Math.floor(18*(o.top-t)),l=Math.floor(o.right),n=Math.floor(68*(o.right-l)),i=Math.floor(o.bottom);return[a,r,t,e,l,n,i,Math.floor(18*(o.bottom-i))]}getDefaultRect(o){const a=o.col,r=Math.max(o.row-2,0);return[a,6,r,14,a+2,2,r+4,16]}render(o,a){const r=a.anchor?this.getAnchorRect(a.anchor):this.getDefaultRect(a.refAddress);o.leafNode("x:Anchor",null,r.join(", "))}parseOpen(o){switch(o.name){case this.tag:return this.text="",!0;default:return!1}}parseText(o){this.text=o}parseClose(){return!1}}},{"../base-xform":32}],44:[function(s,T,S){const m=s("../base-xform"),o=s("./vml-anchor-xform"),a=s("./style/vml-protection-xform"),r=s("./style/vml-position-xform"),t=["twoCells","oneCells","absolute"];T.exports=class extends m{constructor(){super(),this.map={"x:Anchor":new o,"x:Locked":new a({tag:"x:Locked"}),"x:LockText":new a({tag:"x:LockText"}),"x:SizeWithCells":new r({tag:"x:SizeWithCells"}),"x:MoveWithCells":new r({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(e,l){const{protection:n,editAs:i}=l.note;e.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(e,i,t),this.map["x:SizeWithCells"].render(e,i,t),this.map["x:Anchor"].render(e,l),this.map["x:Locked"].render(e,n.locked),e.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(e,n.lockText),e.leafNode("x:Row",null,l.refAddress.row-1),e.leafNode("x:Column",null,l.refAddress.col-1),e.closeNode()}parseOpen(e){switch(e.name){case this.tag:this.reset(),this.model={anchor:[],protection:{},editAs:""};break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.normalizeModel(),!1;default:return!0}}normalizeModel(){const e=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),l=Object.keys(e).length;this.model.editAs=t[l],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}}},{"../base-xform":32,"./style/vml-position-xform":41,"./style/vml-protection-xform":42,"./vml-anchor-xform":43}],45:[function(s,T,S){const m=s("../../../utils/xml-stream"),o=s("../base-xform"),a=s("./vml-shape-xform");class r extends o{constructor(){super(),this.map={"v:shape":new a}}get tag(){return"xml"}render(e,l){e.openXml(m.StdDocAttributes),e.openNode(this.tag,r.DRAWING_ATTRIBUTES),e.openNode("o:shapelayout",{"v:ext":"edit"}),e.leafNode("o:idmap",{"v:ext":"edit",data:1}),e.closeNode(),e.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),e.leafNode("v:stroke",{joinstyle:"miter"}),e.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),e.closeNode(),l.comments.forEach((n,i)=>{this.map["v:shape"].render(e,n,i)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset(),this.model={comments:[]};break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0;switch(e){case this.tag:return!1;default:return!0}}reconcile(e,l){e.anchors.forEach(n=>{n.br?this.map["xdr:twoCellAnchor"].reconcile(n,l):this.map["xdr:oneCellAnchor"].reconcile(n,l)})}}r.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},T.exports=r},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(s,T,S){const m=s("../base-xform"),o=s("./vml-textbox-xform"),a=s("./vml-client-data-xform");class r extends m{constructor(){super(),this.map={"v:textbox":new o,"x:ClientData":new a}}get tag(){return"v:shape"}render(e,l,n){e.openNode("v:shape",r.V_SHAPE_ATTRIBUTES(l,n)),e.leafNode("v:fill",{color2:"infoBackground [80]"}),e.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),e.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(e,l),this.map["x:ClientData"].render(e,l),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset(),this.model={margins:{insetmode:e.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}};break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1;default:return!0}}}r.V_SHAPE_ATTRIBUTES=(t,e)=>({id:"_x0000_s"+(1025+e),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":t.note.margins&&t.note.margins.insetmode}),T.exports=r},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"v:textbox"}conversionUnit(o,a,r){return`${parseFloat(o)*a.toFixed(2)}${r}`}reverseConversionUnit(o){return(o||"").split(",").map(a=>Number(parseFloat(this.conversionUnit(parseFloat(a),.1,"")).toFixed(2)))}render(o,a){const r={style:"mso-direction-alt:auto"};if(a&&a.note){let{inset:t}=a.note&&a.note.margins;Array.isArray(t)&&(t=t.map(e=>this.conversionUnit(e,10,"mm")).join(",")),t&&(r.inset=t)}o.openNode("v:textbox",r),o.leafNode("div",{style:"text-align:left"}),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:return this.model={inset:this.reverseConversionUnit(o.attributes.inset)},!0;default:return!0}}parseText(){}parseClose(o){switch(o){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],48:[function(s,T,S){const m=s("./base-xform");T.exports=class extends m{createNewModel(o){return{}}parseOpen(o){return this.parser=this.parser||this.map[o.name],this.parser?(this.parser.parseOpen(o),!0):o.name===this.tag&&(this.model=this.createNewModel(o),!0)}parseText(o){this.parser&&this.parser.parseText(o)}onParserClose(o,a){this.model[o]=a.model}parseClose(o){return this.parser?(this.parser.parseClose(o)||(this.onParserClose(o,this.parser),this.parser=void 0),!0):o!==this.tag}}},{"./base-xform":32}],49:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{render(o,a){o.openNode("HeadingPairs"),o.openNode("vt:vector",{size:2,baseType:"variant"}),o.openNode("vt:variant"),o.leafNode("vt:lpstr",void 0,"Worksheets"),o.closeNode(),o.openNode("vt:variant"),o.leafNode("vt:i4",void 0,a.length),o.closeNode(),o.closeNode(),o.closeNode()}parseOpen(o){return o.name==="HeadingPairs"}parseText(){}parseClose(o){return o!=="HeadingPairs"}}},{"../base-xform":32}],50:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{render(o,a){o.openNode("TitlesOfParts"),o.openNode("vt:vector",{size:a.length,baseType:"lpstr"}),a.forEach(r=>{o.leafNode("vt:lpstr",void 0,r.name)}),o.closeNode(),o.closeNode()}parseOpen(o){return o.name==="TitlesOfParts"}parseText(){}parseClose(o){return o!=="TitlesOfParts"}}},{"../base-xform":32}],51:[function(s,T,S){const m=s("../../../utils/xml-stream"),o=s("../base-xform"),a=s("../simple/string-xform"),r=s("./app-heading-pairs-xform"),t=s("./app-titles-of-parts-xform");class e extends o{constructor(){super(),this.map={Company:new a({tag:"Company"}),Manager:new a({tag:"Manager"}),HeadingPairs:new r,TitleOfParts:new t}}render(n,i){n.openXml(m.StdDocAttributes),n.openNode("Properties",e.PROPERTY_ATTRIBUTES),n.leafNode("Application",void 0,"Microsoft Excel"),n.leafNode("DocSecurity",void 0,"0"),n.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(n,i.worksheets),this.map.TitleOfParts.render(n,i.worksheets),this.map.Company.render(n,i.company||""),this.map.Manager.render(n,i.manager),n.leafNode("LinksUpToDate",void 0,"false"),n.leafNode("SharedDoc",void 0,"false"),n.leafNode("HyperlinksChanged",void 0,"false"),n.leafNode("AppVersion",void 0,"16.0300"),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"Properties":return!0;default:return this.parser=this.map[n.name],!!this.parser&&(this.parser.parseOpen(n),!0)}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.parser=void 0),!0;switch(n){case"Properties":return this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1;default:return!0}}}e.DateFormat=function(l){return l.toISOString().replace(/[.]\d{3,6}/,"")},e.DateAttrs={"xsi:type":"dcterms:W3CDTF"},e.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},T.exports=e},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(s,T,S){const m=s("../../../utils/xml-stream"),o=s("../base-xform");class a extends o{render(t,e){t.openXml(m.StdDocAttributes),t.openNode("Types",a.PROPERTY_ATTRIBUTES);const l={};(e.media||[]).forEach(n=>{if(n.type==="image"){const i=n.extension;l[i]||(l[i]=!0,t.leafNode("Default",{Extension:i,ContentType:"image/"+i}))}}),t.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),t.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),t.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),e.worksheets.forEach(n=>{const i=`/xl/worksheets/sheet${n.id}.xml`;t.leafNode("Override",{PartName:i,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),t.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),t.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),e.sharedStrings&&e.sharedStrings.count&&t.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),e.tables&&e.tables.forEach(n=>{t.leafNode("Override",{PartName:"/xl/tables/"+n.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),e.drawings&&e.drawings.forEach(n=>{t.leafNode("Override",{PartName:`/xl/drawings/${n.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),e.commentRefs&&(t.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),e.commentRefs.forEach(n=>{let{commentName:i}=n;t.leafNode("Override",{PartName:`/xl/${i}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),t.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),t.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),t.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}a.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},T.exports=a},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(s,T,S){const m=s("../../../utils/xml-stream"),o=s("../base-xform"),a=s("../simple/date-xform"),r=s("../simple/string-xform"),t=s("../simple/integer-xform");class e extends o{constructor(){super(),this.map={"dc:creator":new r({tag:"dc:creator"}),"dc:title":new r({tag:"dc:title"}),"dc:subject":new r({tag:"dc:subject"}),"dc:description":new r({tag:"dc:description"}),"dc:identifier":new r({tag:"dc:identifier"}),"dc:language":new r({tag:"dc:language"}),"cp:keywords":new r({tag:"cp:keywords"}),"cp:category":new r({tag:"cp:category"}),"cp:lastModifiedBy":new r({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new a({tag:"cp:lastPrinted",format:e.DateFormat}),"cp:revision":new t({tag:"cp:revision"}),"cp:version":new r({tag:"cp:version"}),"cp:contentStatus":new r({tag:"cp:contentStatus"}),"cp:contentType":new r({tag:"cp:contentType"}),"dcterms:created":new a({tag:"dcterms:created",attrs:e.DateAttrs,format:e.DateFormat}),"dcterms:modified":new a({tag:"dcterms:modified",attrs:e.DateAttrs,format:e.DateFormat})}}render(n,i){n.openXml(m.StdDocAttributes),n.openNode("cp:coreProperties",e.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(n,i.creator),this.map["dc:title"].render(n,i.title),this.map["dc:subject"].render(n,i.subject),this.map["dc:description"].render(n,i.description),this.map["dc:identifier"].render(n,i.identifier),this.map["dc:language"].render(n,i.language),this.map["cp:keywords"].render(n,i.keywords),this.map["cp:category"].render(n,i.category),this.map["cp:lastModifiedBy"].render(n,i.lastModifiedBy),this.map["cp:lastPrinted"].render(n,i.lastPrinted),this.map["cp:revision"].render(n,i.revision),this.map["cp:version"].render(n,i.version),this.map["cp:contentStatus"].render(n,i.contentStatus),this.map["cp:contentType"].render(n,i.contentType),this.map["dcterms:created"].render(n,i.created),this.map["dcterms:modified"].render(n,i.modified),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[n.name],this.parser)return this.parser.parseOpen(n),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(n))}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.parser=void 0),!0;switch(n){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: "+n)}}}e.DateFormat=function(l){return l.toISOString().replace(/[.]\d{3}/,"")},e.DateAttrs={"xsi:type":"dcterms:W3CDTF"},e.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},T.exports=e},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{render(o,a){o.leafNode("Relationship",a)}parseOpen(o){switch(o.name){case"Relationship":return this.model=o.attributes,!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],55:[function(s,T,S){const m=s("../../../utils/xml-stream"),o=s("../base-xform"),a=s("./relationship-xform");class r extends o{constructor(){super(),this.map={Relationship:new a}}render(e,l){l=l||this._values,e.openXml(m.StdDocAttributes),e.openNode("Relationships",r.RELATIONSHIPS_ATTRIBUTES),l.forEach(n=>{this.map.Relationship.render(e,n)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[e.name],this.parser)return this.parser.parseOpen(e),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(e))}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.model.push(this.parser.model),this.parser=void 0),!0;switch(e){case"Relationships":return!1;default:throw new Error("Unexpected xml node in parseClose: "+e)}}}r.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},T.exports=r},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:this.reset(),this.model={range:{editAs:o.attributes.editAs||"oneCell"}};break;default:this.parser=this.map[o.name],this.parser&&this.parser.parseOpen(o)}return!0}parseText(o){this.parser&&this.parser.parseText(o)}reconcilePicture(o,a){if(o&&o.rId){const r=a.rels[o.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(r){const t=r[1],e=a.mediaIndex[t];return a.media[e]}}}}},{"../base-xform":32}],57:[function(s,T,S){const m=s("../base-xform"),o=s("./blip-xform");T.exports=class extends m{constructor(){super(),this.map={"a:blip":new o}}get tag(){return"xdr:blipFill"}render(a,r){a.openNode(this.tag),this.map["a:blip"].render(a,r),a.openNode("a:stretch"),a.leafNode("a:fillRect"),a.closeNode(),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset();break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}parseText(){}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.model=this.map["a:blip"].model,!1;default:return!0}}}},{"../base-xform":32,"./blip-xform":58}],58:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"a:blip"}render(o,a){o.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":a.rId,cstate:"print"})}parseOpen(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:embed"]},!0;default:return!0}}parseText(){}parseClose(o){switch(o){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],59:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"xdr:cNvPicPr"}render(o){o.openNode(this.tag),o.leafNode("a:picLocks",{noChangeAspect:"1"}),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:default:return!0}}parseText(){}parseClose(o){switch(o){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],60:[function(s,T,S){const m=s("../base-xform"),o=s("./hlink-click-xform"),a=s("./ext-lst-xform");T.exports=class extends m{constructor(){super(),this.map={"a:hlinkClick":new o,"a:extLst":new a}}get tag(){return"xdr:cNvPr"}render(r,t){r.openNode(this.tag,{id:t.index,name:"Picture "+t.index}),this.map["a:hlinkClick"].render(r,t),this.map["a:extLst"].render(r,t),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case this.tag:this.reset();break;default:this.parser=this.map[r.name],this.parser&&this.parser.parseOpen(r)}return!0}parseText(){}parseClose(r){if(this.parser)return this.parser.parseClose(r)||(this.parser=void 0),!0;switch(r){case this.tag:return this.model=this.map["a:hlinkClick"].model,!1;default:return!0}}}},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(s,T,S){const m=s("../base-xform"),o=s("../simple/integer-xform");T.exports=class extends m{constructor(a){super(),this.tag=a.tag,this.map={"xdr:col":new o({tag:"xdr:col",zero:!0}),"xdr:colOff":new o({tag:"xdr:colOff",zero:!0}),"xdr:row":new o({tag:"xdr:row",zero:!0}),"xdr:rowOff":new o({tag:"xdr:rowOff",zero:!0})}}render(a,r){a.openNode(this.tag),this.map["xdr:col"].render(a,r.nativeCol),this.map["xdr:colOff"].render(a,r.nativeColOff),this.map["xdr:row"].render(a,r.nativeRow),this.map["xdr:rowOff"].render(a,r.nativeRowOff),a.closeNode()}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:this.reset();break;default:this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)}return!0}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.parser=void 0),!0;switch(a){case this.tag:return this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1;default:return!0}}}},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(s,T,S){const m=s("../../../utils/col-cache"),o=s("../../../utils/xml-stream"),a=s("../base-xform"),r=s("./two-cell-anchor-xform"),t=s("./one-cell-anchor-xform");class e extends a{constructor(){super(),this.map={"xdr:twoCellAnchor":new r,"xdr:oneCellAnchor":new t}}prepare(n){n.anchors.forEach((i,c)=>{i.anchorType=function(h){return(typeof h.range=="string"?m.decode(h.range):h.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"}(i),this.map[i.anchorType].prepare(i,{index:c})})}get tag(){return"xdr:wsDr"}render(n,i){n.openXml(o.StdDocAttributes),n.openNode(this.tag,e.DRAWING_ATTRIBUTES),i.anchors.forEach(c=>{this.map[c.anchorType].render(n,c)}),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.tag:this.reset(),this.model={anchors:[]};break;default:this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n)}return!0}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){if(this.parser)return this.parser.parseClose(n)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0;switch(n){case this.tag:return!1;default:return!0}}reconcile(n,i){n.anchors.forEach(c=>{c.br?this.map["xdr:twoCellAnchor"].reconcile(c,i):this.map["xdr:oneCellAnchor"].reconcile(c,i)})}}e.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},T.exports=e},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"a:extLst"}render(o){o.openNode(this.tag),o.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),o.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),o.closeNode(),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:default:return!0}}parseText(){}parseClose(o){switch(o){case this.tag:return!1;default:return!0}}}},{"../base-xform":32}],64:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{constructor(o){super(),this.tag=o.tag,this.map={}}render(o,a){o.openNode(this.tag);const r=Math.floor(9525*a.width),t=Math.floor(9525*a.height);o.addAttribute("cx",r),o.addAttribute("cy",t),o.closeNode()}parseOpen(o){return o.name===this.tag&&(this.model={width:parseInt(o.attributes.cx||"0",10)/9525,height:parseInt(o.attributes.cy||"0",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],65:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"a:hlinkClick"}render(o,a){a.hyperlinks&&a.hyperlinks.rId&&o.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":a.hyperlinks.rId,tooltip:a.hyperlinks.tooltip})}parseOpen(o){switch(o.name){case this.tag:return this.model={hyperlinks:{rId:o.attributes["r:id"],tooltip:o.attributes.tooltip}},!0;default:return!0}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],66:[function(s,T,S){const m=s("../base-xform"),o=s("./c-nv-pr-xform"),a=s("./c-nv-pic-pr-xform");T.exports=class extends m{constructor(){super(),this.map={"xdr:cNvPr":new o,"xdr:cNvPicPr":new a}}get tag(){return"xdr:nvPicPr"}render(r,t){r.openNode(this.tag),this.map["xdr:cNvPr"].render(r,t),this.map["xdr:cNvPicPr"].render(r,t),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case this.tag:this.reset();break;default:this.parser=this.map[r.name],this.parser&&this.parser.parseOpen(r)}return!0}parseText(){}parseClose(r){if(this.parser)return this.parser.parseClose(r)||(this.parser=void 0),!0;switch(r){case this.tag:return this.model=this.map["xdr:cNvPr"].model,!1;default:return!0}}}},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(s,T,S){const m=s("./base-cell-anchor-xform"),o=s("../static-xform"),a=s("./cell-position-xform"),r=s("./ext-xform"),t=s("./pic-xform");T.exports=class extends m{constructor(){super(),this.map={"xdr:from":new a({tag:"xdr:from"}),"xdr:ext":new r({tag:"xdr:ext"}),"xdr:pic":new t,"xdr:clientData":new o({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(e,l){this.map["xdr:pic"].prepare(e.picture,l)}render(e,l){e.openNode(this.tag,{editAs:l.range.editAs||"oneCell"}),this.map["xdr:from"].render(e,l.range.tl),this.map["xdr:ext"].render(e,l.range.ext),this.map["xdr:pic"].render(e,l.picture),this.map["xdr:clientData"].render(e,{}),e.closeNode()}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(e,l){e.medium=this.reconcilePicture(e.picture,l)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(s,T,S){const m=s("../base-xform"),o=s("../static-xform"),a=s("./blip-fill-xform"),r=s("./nv-pic-pr-xform"),t=s("./sp-pr");T.exports=class extends m{constructor(){super(),this.map={"xdr:nvPicPr":new r,"xdr:blipFill":new a,"xdr:spPr":new o(t)}}get tag(){return"xdr:pic"}prepare(e,l){e.index=l.index+1}render(e,l){e.openNode(this.tag),this.map["xdr:nvPicPr"].render(e,l),this.map["xdr:blipFill"].render(e,l),this.map["xdr:spPr"].render(e,l),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.tag:this.reset();break;default:this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)}return!0}parseText(){}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.mergeModel(this.parser.model),this.parser=void 0),!0;switch(e){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(s,T,S){T.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],70:[function(s,T,S){const m=s("./base-cell-anchor-xform"),o=s("../static-xform"),a=s("./cell-position-xform"),r=s("./pic-xform");T.exports=class extends m{constructor(){super(),this.map={"xdr:from":new a({tag:"xdr:from"}),"xdr:to":new a({tag:"xdr:to"}),"xdr:pic":new r,"xdr:clientData":new o({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(t,e){this.map["xdr:pic"].prepare(t.picture,e)}render(t,e){t.openNode(this.tag,{editAs:e.range.editAs||"oneCell"}),this.map["xdr:from"].render(t,e.range.tl),this.map["xdr:to"].render(t,e.range.br),this.map["xdr:pic"].render(t,e.picture),this.map["xdr:clientData"].render(t,{}),t.closeNode()}parseClose(t){if(this.parser)return this.parser.parseClose(t)||(this.parser=void 0),!0;switch(t){case this.tag:return this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1;default:return!0}}reconcile(t,e){t.medium=this.reconcilePicture(t.picture,e)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(s,T,S){const m=s("./base-xform");T.exports=class extends m{constructor(o){super(),this.tag=o.tag,this.always=!!o.always,this.count=o.count,this.empty=o.empty,this.$count=o.$count||"count",this.$=o.$,this.childXform=o.childXform,this.maxItems=o.maxItems}prepare(o,a){const{childXform:r}=this;o&&o.forEach((t,e)=>{a.index=e,r.prepare(t,a)})}render(o,a){if(this.always||a&&a.length){o.openNode(this.tag,this.$),this.count&&o.addAttribute(this.$count,a&&a.length||0);const{childXform:r}=this;(a||[]).forEach((t,e)=>{r.render(o,t,e)}),o.closeNode()}else this.empty&&o.leafNode(this.tag)}parseOpen(o){if(this.parser)return this.parser.parseOpen(o),!0;switch(o.name){case this.tag:return this.model=[],!0;default:return!!this.childXform.parseOpen(o)&&(this.parser=this.childXform,!0)}}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){if(this.parser){if(!this.parser.parseClose(o)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`);return!0}return!1}reconcile(o,a){if(o){const{childXform:r}=this;o.forEach(t=>{r.reconcile(t,a)})}}}},{"./base-xform":32}],72:[function(s,T,S){const m=s("../../../utils/col-cache"),o=s("../base-xform");T.exports=class extends o{get tag(){return"autoFilter"}render(a,r){if(r)if(typeof r=="string")a.leafNode("autoFilter",{ref:r});else{const t=function(n){return typeof n=="string"?n:m.getAddress(n.row,n.column).address},e=t(r.from),l=t(r.to);e&&l&&a.leafNode("autoFilter",{ref:`${e}:${l}`})}}parseOpen(a){a.name==="autoFilter"&&(this.model=a.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(s,T,S){const m=s("../../../utils/utils"),o=s("../base-xform"),a=s("../../../doc/range"),r=s("../../../doc/enums"),t=s("../strings/rich-text-xform");function e(l){if(l==null)return r.ValueType.Null;if(l instanceof String||typeof l=="string")return r.ValueType.String;if(typeof l=="number")return r.ValueType.Number;if(typeof l=="boolean")return r.ValueType.Boolean;if(l instanceof Date)return r.ValueType.Date;if(l.text&&l.hyperlink)return r.ValueType.Hyperlink;if(l.formula)return r.ValueType.Formula;if(l.error)return r.ValueType.Error;throw new Error("I could not understand type of value")}T.exports=class extends o{constructor(){super(),this.richTextXForm=new t}get tag(){return"c"}prepare(l,n){const i=n.styles.addStyleModel(l.style||{},function(c){switch(c.type){case r.ValueType.Formula:return e(c.result);default:return c.type}}(l));switch(i&&(l.styleId=i),l.comment&&n.comments.push({...l.comment,ref:l.address}),l.type){case r.ValueType.String:case r.ValueType.RichText:n.sharedStrings&&(l.ssId=n.sharedStrings.add(l.value));break;case r.ValueType.Date:n.date1904&&(l.date1904=!0);break;case r.ValueType.Hyperlink:n.sharedStrings&&l.text!==void 0&&l.text!==null&&(l.ssId=n.sharedStrings.add(l.text)),n.hyperlinks.push({address:l.address,target:l.hyperlink,tooltip:l.tooltip});break;case r.ValueType.Merge:n.merges.add(l);break;case r.ValueType.Formula:if(n.date1904&&(l.date1904=!0),l.shareType==="shared"&&(l.si=n.siFormulae++),l.formula)n.formulae[l.address]=l;else if(l.sharedFormula){const c=n.formulae[l.sharedFormula];if(!c)throw new Error("Shared Formula master must exist above and or left of clone for cell "+l.address);c.si===void 0?(c.shareType="shared",c.si=n.siFormulae++,c.range=new a(c.address,l.address)):c.range&&c.range.expandToAddress(l.address),l.si=c.si}}}renderFormula(l,n){let i=null;switch(n.shareType){case"shared":i={t:"shared",ref:n.ref||n.range.range,si:n.si};break;case"array":i={t:"array",ref:n.ref};break;default:n.si!==void 0&&(i={t:"shared",si:n.si})}switch(e(n.result)){case r.ValueType.Null:l.leafNode("f",i,n.formula);break;case r.ValueType.String:l.addAttribute("t","str"),l.leafNode("f",i,n.formula),l.leafNode("v",null,n.result);break;case r.ValueType.Number:l.leafNode("f",i,n.formula),l.leafNode("v",null,n.result);break;case r.ValueType.Boolean:l.addAttribute("t","b"),l.leafNode("f",i,n.formula),l.leafNode("v",null,n.result?1:0);break;case r.ValueType.Error:l.addAttribute("t","e"),l.leafNode("f",i,n.formula),l.leafNode("v",null,n.result.error);break;case r.ValueType.Date:l.leafNode("f",i,n.formula),l.leafNode("v",null,m.dateToExcel(n.result,n.date1904));break;default:throw new Error("I could not understand type of value")}}render(l,n){if(n.type!==r.ValueType.Null||n.styleId){switch(l.openNode("c"),l.addAttribute("r",n.address),n.styleId&&l.addAttribute("s",n.styleId),n.type){case r.ValueType.Null:break;case r.ValueType.Number:l.leafNode("v",null,n.value);break;case r.ValueType.Boolean:l.addAttribute("t","b"),l.leafNode("v",null,n.value?"1":"0");break;case r.ValueType.Error:l.addAttribute("t","e"),l.leafNode("v",null,n.value.error);break;case r.ValueType.String:case r.ValueType.RichText:n.ssId!==void 0?(l.addAttribute("t","s"),l.leafNode("v",null,n.ssId)):n.value&&n.value.richText?(l.addAttribute("t","inlineStr"),l.openNode("is"),n.value.richText.forEach(i=>{this.richTextXForm.render(l,i)}),l.closeNode("is")):(l.addAttribute("t","str"),l.leafNode("v",null,n.value));break;case r.ValueType.Date:l.leafNode("v",null,m.dateToExcel(n.value,n.date1904));break;case r.ValueType.Hyperlink:n.ssId!==void 0?(l.addAttribute("t","s"),l.leafNode("v",null,n.ssId)):(l.addAttribute("t","str"),l.leafNode("v",null,n.text));break;case r.ValueType.Formula:this.renderFormula(l,n);break;case r.ValueType.Merge:}l.closeNode()}}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"c":return this.model={address:l.attributes.r},this.t=l.attributes.t,l.attributes.s&&(this.model.styleId=parseInt(l.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=l.attributes.si,this.model.shareType=l.attributes.t,this.model.ref=l.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(l),!0;default:return!1}}parseText(l){if(this.parser)this.parser.parseText(l);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+l:l;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+l:l:this.model.value=this.model.value?this.model.value+l:l}}parseClose(l){switch(l){case"c":{const{model:n}=this;if(n.formula||n.shareType)n.type=r.ValueType.Formula,n.value&&(this.t==="str"?n.result=m.xmlDecode(n.value):this.t==="b"?n.result=parseInt(n.value,10)!==0:this.t==="e"?n.result={error:n.value}:n.result=parseFloat(n.value),n.value=void 0);else if(n.value!==void 0)switch(this.t){case"s":n.type=r.ValueType.String,n.value=parseInt(n.value,10);break;case"str":n.type=r.ValueType.String,n.value=m.xmlDecode(n.value);break;case"inlineStr":n.type=r.ValueType.String;break;case"b":n.type=r.ValueType.Boolean,n.value=parseInt(n.value,10)!==0;break;case"e":n.type=r.ValueType.Error,n.value={error:n.value};break;default:n.type=r.ValueType.Number,n.value=parseFloat(n.value)}else n.styleId?n.type=r.ValueType.Null:n.type=r.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(l),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(l),!0)}}reconcile(l,n){const i=l.styleId&&n.styles&&n.styles.getStyleModel(l.styleId);switch(i&&(l.style=i),l.styleId!==void 0&&(l.styleId=void 0),l.type){case r.ValueType.String:typeof l.value=="number"&&n.sharedStrings&&(l.value=n.sharedStrings.getString(l.value)),l.value.richText&&(l.type=r.ValueType.RichText);break;case r.ValueType.Number:i&&m.isDateFmt(i.numFmt)&&(l.type=r.ValueType.Date,l.value=m.excelToDate(l.value,n.date1904));break;case r.ValueType.Formula:l.result!==void 0&&i&&m.isDateFmt(i.numFmt)&&(l.result=m.excelToDate(l.result,n.date1904)),l.shareType==="shared"&&(l.ref?n.formulae[l.si]=l.address:(l.sharedFormula=n.formulae[l.si],delete l.shareType),delete l.si)}const c=n.hyperlinkMap[l.address];c&&(l.type===r.ValueType.Formula?(l.text=l.result,l.result=void 0):(l.text=l.value,l.value=void 0),l.type=r.ValueType.Hyperlink,l.hyperlink=c);const h=n.commentsMap&&n.commentsMap[l.address];h&&(l.comment=h)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(s,T,S){const m=s("../../base-xform");T.exports=class extends m{get tag(){return"x14:cfIcon"}render(o,a){o.leafNode(this.tag,{iconSet:a.iconSet,iconId:a.iconId})}parseOpen(o){let{attributes:a}=o;this.model={iconSet:a.iconSet,iconId:m.toIntValue(a.iconId)}}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],75:[function(s,T,S){const{v4:m}=s("uuid"),o=s("../../base-xform"),a=s("../../composite-xform"),r=s("./databar-ext-xform"),t=s("./icon-set-ext-xform"),e={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class l extends a{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new r,"x14:iconSet":this.iconSetXform=new t}}get tag(){return"x14:cfRule"}static isExt(i){return i.type==="dataBar"?r.isExt(i):!(i.type!=="iconSet"||!i.custom&&!e[i.iconSet])}prepare(i){l.isExt(i)&&(i.x14Id=`{${m()}}`.toUpperCase())}render(i,c){if(l.isExt(c))switch(c.type){case"dataBar":this.renderDataBar(i,c);break;case"iconSet":this.renderIconSet(i,c)}}renderDataBar(i,c){i.openNode(this.tag,{type:"dataBar",id:c.x14Id}),this.databarXform.render(i,c),i.closeNode()}renderIconSet(i,c){i.openNode(this.tag,{type:"iconSet",priority:c.priority,id:c.x14Id||`{${m()}}`}),this.iconSetXform.render(i,c),i.closeNode()}createNewModel(i){let{attributes:c}=i;return{type:c.type,x14Id:c.id,priority:o.toIntValue(c.priority)}}onParserClose(i,c){Object.assign(this.model,c.model)}}T.exports=l},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(s,T,S){const m=s("../../composite-xform"),o=s("./f-ext-xform");T.exports=class extends m{constructor(){super(),this.map={"xm:f":this.fExtXform=new o}}get tag(){return"x14:cfvo"}render(a,r){a.openNode(this.tag,{type:r.type}),r.value!==void 0&&this.fExtXform.render(a,r.value),a.closeNode()}createNewModel(a){return{type:a.attributes.type}}onParserClose(a,r){switch(a){case"xm:f":this.model.value=r.model?parseFloat(r.model):0}}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(s,T,S){const m=s("../../composite-xform"),o=s("./sqref-ext-xform"),a=s("./cf-rule-ext-xform");T.exports=class extends m{constructor(){super(),this.map={"xm:sqref":this.sqRef=new o,"x14:cfRule":this.cfRule=new a}}get tag(){return"x14:conditionalFormatting"}prepare(r,t){r.rules.forEach(e=>{this.cfRule.prepare(e,t)})}render(r,t){t.rules.some(a.isExt)&&(r.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),t.rules.filter(a.isExt).forEach(e=>this.cfRule.render(r,e)),this.sqRef.render(r,t.ref),r.closeNode())}createNewModel(){return{rules:[]}}onParserClose(r,t){switch(r){case"xm:sqref":this.model.ref=t.model;break;case"x14:cfRule":this.model.rules.push(t.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(s,T,S){const m=s("../../composite-xform"),o=s("./cf-rule-ext-xform"),a=s("./conditional-formatting-ext-xform");T.exports=class extends m{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new a}}get tag(){return"x14:conditionalFormattings"}hasContent(r){return r.hasExtContent===void 0&&(r.hasExtContent=r.some(t=>t.rules.some(o.isExt))),r.hasExtContent}prepare(r,t){r.forEach(e=>{this.cfXform.prepare(e,t)})}render(r,t){this.hasContent(t)&&(r.openNode(this.tag),t.forEach(e=>this.cfXform.render(r,e)),r.closeNode())}createNewModel(){return[]}onParserClose(r,t){this.model.push(t.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(s,T,S){const m=s("../../base-xform"),o=s("../../composite-xform"),a=s("../../style/color-xform"),r=s("./cfvo-ext-xform");T.exports=class extends o{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new r,"x14:borderColor":this.borderColorXform=new a("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new a("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new a("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new a("x14:axisColor")}}static isExt(t){return!t.gradient}get tag(){return"x14:dataBar"}render(t,e){t.openNode(this.tag,{minLength:m.toIntAttribute(e.minLength,0,!0),maxLength:m.toIntAttribute(e.maxLength,100,!0),border:m.toBoolAttribute(e.border,!1),gradient:m.toBoolAttribute(e.gradient,!0),negativeBarColorSameAsPositive:m.toBoolAttribute(e.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:m.toBoolAttribute(e.negativeBarBorderColorSameAsPositive,!0),axisPosition:m.toAttribute(e.axisPosition,"auto"),direction:m.toAttribute(e.direction,"leftToRight")}),e.cfvo.forEach(l=>{this.cfvoXform.render(t,l)}),this.borderColorXform.render(t,e.borderColor),this.negativeBorderColorXform.render(t,e.negativeBorderColor),this.negativeFillColorXform.render(t,e.negativeFillColor),this.axisColorXform.render(t,e.axisColor),t.closeNode()}createNewModel(t){let{attributes:e}=t;return{cfvo:[],minLength:m.toIntValue(e.minLength,0),maxLength:m.toIntValue(e.maxLength,100),border:m.toBoolValue(e.border,!1),gradient:m.toBoolValue(e.gradient,!0),negativeBarColorSameAsPositive:m.toBoolValue(e.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:m.toBoolValue(e.negativeBarBorderColorSameAsPositive,!0),axisPosition:m.toStringValue(e.axisPosition,"auto"),direction:m.toStringValue(e.direction,"leftToRight")}}onParserClose(t,e){const[,l]=t.split(":");switch(l){case"cfvo":this.model.cfvo.push(e.model);break;default:this.model[l]=e.model}}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(s,T,S){const m=s("../../base-xform");T.exports=class extends m{get tag(){return"xm:f"}render(o,a){o.leafNode(this.tag,null,a)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],81:[function(s,T,S){const m=s("../../base-xform"),o=s("../../composite-xform"),a=s("./cfvo-ext-xform"),r=s("./cf-icon-ext-xform");T.exports=class extends o{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new a,"x14:cfIcon":this.cfIconXform=new r}}get tag(){return"x14:iconSet"}render(t,e){t.openNode(this.tag,{iconSet:m.toStringAttribute(e.iconSet),reverse:m.toBoolAttribute(e.reverse,!1),showValue:m.toBoolAttribute(e.showValue,!0),custom:m.toBoolAttribute(e.icons,!1)}),e.cfvo.forEach(l=>{this.cfvoXform.render(t,l)}),e.icons&&e.icons.forEach((l,n)=>{l.iconId=n,this.cfIconXform.render(t,l)}),t.closeNode()}createNewModel(t){let{attributes:e}=t;return{cfvo:[],iconSet:m.toStringValue(e.iconSet,"3TrafficLights"),reverse:m.toBoolValue(e.reverse,!1),showValue:m.toBoolValue(e.showValue,!0)}}onParserClose(t,e){const[,l]=t.split(":");switch(l){case"cfvo":this.model.cfvo.push(e.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(e.model);break;default:this.model[l]=e.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(s,T,S){const m=s("../../base-xform");T.exports=class extends m{get tag(){return"xm:sqref"}render(o,a){o.leafNode(this.tag,null,a)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],83:[function(s,T,S){const m=s("../../base-xform"),o=s("../../composite-xform"),a=s("../../../../doc/range"),r=s("./databar-xform"),t=s("./ext-lst-ref-xform"),e=s("./formula-xform"),l=s("./color-scale-xform"),n=s("./icon-set-xform"),i={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},c=u=>{const{type:d,operator:f}=u;switch(d){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:d};default:return{type:d,operator:f}}};class h extends o{constructor(){super(),this.map={dataBar:this.databarXform=new r,extLst:this.extLstRefXform=new t,formula:this.formulaXform=new e,colorScale:this.colorScaleXform=new l,iconSet:this.iconSetXform=new n}}get tag(){return"cfRule"}static isPrimitive(d){return d.type!=="iconSet"||!d.custom&&!i[d.iconSet]}render(d,f){switch(f.type){case"expression":this.renderExpression(d,f);break;case"cellIs":this.renderCellIs(d,f);break;case"top10":this.renderTop10(d,f);break;case"aboveAverage":this.renderAboveAverage(d,f);break;case"dataBar":this.renderDataBar(d,f);break;case"colorScale":this.renderColorScale(d,f);break;case"iconSet":this.renderIconSet(d,f);break;case"containsText":this.renderText(d,f);break;case"timePeriod":this.renderTimePeriod(d,f)}}renderExpression(d,f){d.openNode(this.tag,{type:"expression",dxfId:f.dxfId,priority:f.priority}),this.formulaXform.render(d,f.formulae[0]),d.closeNode()}renderCellIs(d,f){d.openNode(this.tag,{type:"cellIs",dxfId:f.dxfId,priority:f.priority,operator:f.operator}),f.formulae.forEach(w=>{this.formulaXform.render(d,w)}),d.closeNode()}renderTop10(d,f){d.leafNode(this.tag,{type:"top10",dxfId:f.dxfId,priority:f.priority,percent:m.toBoolAttribute(f.percent,!1),bottom:m.toBoolAttribute(f.bottom,!1),rank:m.toIntValue(f.rank,10,!0)})}renderAboveAverage(d,f){d.leafNode(this.tag,{type:"aboveAverage",dxfId:f.dxfId,priority:f.priority,aboveAverage:m.toBoolAttribute(f.aboveAverage,!0)})}renderDataBar(d,f){d.openNode(this.tag,{type:"dataBar",priority:f.priority}),this.databarXform.render(d,f),this.extLstRefXform.render(d,f),d.closeNode()}renderColorScale(d,f){d.openNode(this.tag,{type:"colorScale",priority:f.priority}),this.colorScaleXform.render(d,f),d.closeNode()}renderIconSet(d,f){h.isPrimitive(f)&&(d.openNode(this.tag,{type:"iconSet",priority:f.priority}),this.iconSetXform.render(d,f),d.closeNode())}renderText(d,f){d.openNode(this.tag,{type:f.operator,dxfId:f.dxfId,priority:f.priority,operator:m.toStringAttribute(f.operator,"containsText")});const w=(_=>{if(_.formulae&&_.formulae[0])return _.formulae[0];const A=new a(_.ref),{tl:N}=A;switch(_.operator){case"containsText":return`NOT(ISERROR(SEARCH("${_.text}",${N})))`;case"containsBlanks":return`LEN(TRIM(${N}))=0`;case"notContainsBlanks":return`LEN(TRIM(${N}))>0`;case"containsErrors":return`ISERROR(${N})`;case"notContainsErrors":return`NOT(ISERROR(${N}))`;default:return}})(f);w&&this.formulaXform.render(d,w),d.closeNode()}renderTimePeriod(d,f){d.openNode(this.tag,{type:"timePeriod",dxfId:f.dxfId,priority:f.priority,timePeriod:f.timePeriod});const w=(_=>{if(_.formulae&&_.formulae[0])return _.formulae[0];const A=new a(_.ref),{tl:N}=A;switch(_.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${N},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${N},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${N},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${N},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${N},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${N},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${N},1)=TODAY()-1`;case"today":return`FLOOR(${N},1)=TODAY()`;case"tomorrow":return`FLOOR(${N},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${N},1)<=6,FLOOR(${N},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${N})=MONTH(EDATE(TODAY(),0-1)),YEAR(${N})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${N})=MONTH(TODAY()),YEAR(${N})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${N})=MONTH(EDATE(TODAY(),0+1)),YEAR(${N})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(f);w&&this.formulaXform.render(d,w),d.closeNode()}createNewModel(d){let{attributes:f}=d;return{...c(f),dxfId:m.toIntValue(f.dxfId),priority:m.toIntValue(f.priority),timePeriod:f.timePeriod,percent:m.toBoolValue(f.percent),bottom:m.toBoolValue(f.bottom),rank:m.toIntValue(f.rank),aboveAverage:m.toBoolValue(f.aboveAverage)}}onParserClose(d,f){switch(d){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,f.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(f.model)}}}T.exports=h},{"../../../../doc/range":10,"../../base-xform":32,"../../composite-xform":48,"./color-scale-xform":85,"./databar-xform":88,"./ext-lst-ref-xform":89,"./formula-xform":90,"./icon-set-xform":91}],84:[function(s,T,S){const m=s("../../base-xform");T.exports=class extends m{get tag(){return"cfvo"}render(o,a){o.leafNode(this.tag,{type:a.type,val:a.value})}parseOpen(o){this.model={type:o.attributes.type,value:m.toFloatValue(o.attributes.val)}}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],85:[function(s,T,S){const m=s("../../composite-xform"),o=s("../../style/color-xform"),a=s("./cfvo-xform");T.exports=class extends m{constructor(){super(),this.map={cfvo:this.cfvoXform=new a,color:this.colorXform=new o}}get tag(){return"colorScale"}render(r,t){r.openNode(this.tag),t.cfvo.forEach(e=>{this.cfvoXform.render(r,e)}),t.color.forEach(e=>{this.colorXform.render(r,e)}),r.closeNode()}createNewModel(r){return{cfvo:[],color:[]}}onParserClose(r,t){this.model[r].push(t.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(s,T,S){const m=s("../../composite-xform"),o=s("./cf-rule-xform");T.exports=class extends m{constructor(){super(),this.map={cfRule:new o}}get tag(){return"conditionalFormatting"}render(a,r){r.rules.some(o.isPrimitive)&&(a.openNode(this.tag,{sqref:r.ref}),r.rules.forEach(t=>{o.isPrimitive(t)&&(t.ref=r.ref,this.map.cfRule.render(a,t))}),a.closeNode())}createNewModel(a){let{attributes:r}=a;return{ref:r.sqref,rules:[]}}onParserClose(a,r){this.model.rules.push(r.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(s,T,S){const m=s("../../base-xform"),o=s("./conditional-formatting-xform");T.exports=class extends m{constructor(){super(),this.cfXform=new o}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(a,r){let t=a.reduce((e,l)=>Math.max(e,...l.rules.map(n=>n.priority||0)),1);a.forEach(e=>{e.rules.forEach(l=>{l.priority||(l.priority=t++),l.style&&(l.dxfId=r.styles.addDxfStyle(l.style))})})}render(a,r){r.forEach(t=>{this.cfXform.render(a,t)})}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case"conditionalFormatting":return this.parser=this.cfXform,this.parser.parseOpen(a),!0;default:return!1}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){return!!this.parser&&(!!this.parser.parseClose(a)||(this.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(a,r){a.forEach(t=>{t.rules.forEach(e=>{e.dxfId!==void 0&&(e.style=r.styles.getDxfStyle(e.dxfId),delete e.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(s,T,S){const m=s("../../composite-xform"),o=s("../../style/color-xform"),a=s("./cfvo-xform");T.exports=class extends m{constructor(){super(),this.map={cfvo:this.cfvoXform=new a,color:this.colorXform=new o}}get tag(){return"dataBar"}render(r,t){r.openNode(this.tag),t.cfvo.forEach(e=>{this.cfvoXform.render(r,e)}),this.colorXform.render(r,t.color),r.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(r,t){switch(r){case"cfvo":this.model.cfvo.push(t.model);break;case"color":this.model.color=t.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(s,T,S){const m=s("../../base-xform"),o=s("../../composite-xform");class a extends m{get tag(){return"x14:id"}render(e,l){e.leafNode(this.tag,null,l)}parseOpen(){this.model=""}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}}class r extends o{constructor(){super(),this.map={"x14:id":this.idXform=new a}}get tag(){return"ext"}render(e,l){e.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(e,l.x14Id),e.closeNode()}createNewModel(){return{}}onParserClose(e,l){this.model.x14Id=l.model}}T.exports=class extends o{constructor(){super(),this.map={ext:new r}}get tag(){return"extLst"}render(t,e){t.openNode(this.tag),this.map.ext.render(t,e),t.closeNode()}createNewModel(){return{}}onParserClose(t,e){Object.assign(this.model,e.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(s,T,S){const m=s("../../base-xform");T.exports=class extends m{get tag(){return"formula"}render(o,a){o.leafNode(this.tag,null,a)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],91:[function(s,T,S){const m=s("../../base-xform"),o=s("../../composite-xform"),a=s("./cfvo-xform");T.exports=class extends o{constructor(){super(),this.map={cfvo:this.cfvoXform=new a}}get tag(){return"iconSet"}render(r,t){r.openNode(this.tag,{iconSet:m.toStringAttribute(t.iconSet,"3TrafficLights"),reverse:m.toBoolAttribute(t.reverse,!1),showValue:m.toBoolAttribute(t.showValue,!0)}),t.cfvo.forEach(e=>{this.cfvoXform.render(r,e)}),r.closeNode()}createNewModel(r){let{attributes:t}=r;return{iconSet:m.toStringValue(t.iconSet,"3TrafficLights"),reverse:m.toBoolValue(t.reverse),showValue:m.toBoolValue(t.showValue),cfvo:[]}}onParserClose(r,t){this.model[r].push(t.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(s,T,S){const m=s("../../../utils/utils"),o=s("../base-xform");T.exports=class extends o{get tag(){return"col"}prepare(a,r){const t=r.styles.addStyleModel(a.style||{});t&&(a.styleId=t)}render(a,r){a.openNode("col"),a.addAttribute("min",r.min),a.addAttribute("max",r.max),r.width&&a.addAttribute("width",r.width),r.styleId&&a.addAttribute("style",r.styleId),r.hidden&&a.addAttribute("hidden","1"),r.bestFit&&a.addAttribute("bestFit","1"),r.outlineLevel&&a.addAttribute("outlineLevel",r.outlineLevel),r.collapsed&&a.addAttribute("collapsed","1"),a.addAttribute("customWidth","1"),a.closeNode()}parseOpen(a){if(a.name==="col"){const r=this.model={min:parseInt(a.attributes.min||"0",10),max:parseInt(a.attributes.max||"0",10),width:a.attributes.width===void 0?void 0:parseFloat(a.attributes.width||"0")};return a.attributes.style&&(r.styleId=parseInt(a.attributes.style,10)),m.parseBoolean(a.attributes.hidden)&&(r.hidden=!0),m.parseBoolean(a.attributes.bestFit)&&(r.bestFit=!0),a.attributes.outlineLevel&&(r.outlineLevel=parseInt(a.attributes.outlineLevel,10)),m.parseBoolean(a.attributes.collapsed)&&(r.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(a,r){a.styleId&&(a.style=r.styles.getStyleModel(a.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(s,T,S){const m=s("../../../utils/under-dash"),o=s("../../../utils/utils"),a=s("../../../utils/col-cache"),r=s("../base-xform"),t=s("../../../doc/range");function e(n,i,c,h){const u=i[c];u!==void 0?n[c]=u:h!==void 0&&(n[c]=h)}function l(n,i,c,h){const u=i[c];u!==void 0?n[c]=o.parseBoolean(u):h!==void 0&&(n[c]=h)}T.exports=class extends r{get tag(){return"dataValidations"}render(n,i){const c=function(h){const u=m.map(h,(w,_)=>({address:_,dataValidation:w,marked:!1})).sort((w,_)=>m.strcmp(w.address,_.address)),d=m.keyBy(u,"address"),f=(w,_,A)=>{for(let N=0;N<_;N++){const L=a.encodeAddress(w.row+N,A);if(!h[L]||!m.isEqual(h[w.address],h[L]))return!1}return!0};return u.map(w=>{if(!w.marked){const _=a.decodeEx(w.address);if(_.dimensions)return d[_.dimensions].marked=!0,{...w.dataValidation,sqref:w.address};let A=1,N=a.encodeAddress(_.row+A,_.col);for(;h[N]&&m.isEqual(w.dataValidation,h[N]);)A++,N=a.encodeAddress(_.row+A,_.col);let L=1;for(;f(_,A,_.col+L);)L++;for(let j=0;j1||L>1){const j=_.row+(A-1),P=_.col+(L-1);return{...w.dataValidation,sqref:`${w.address}:${a.encodeAddress(j,P)}`}}return{...w.dataValidation,sqref:w.address}}return null}).filter(Boolean)}(i);c.length&&(n.openNode("dataValidations",{count:c.length}),c.forEach(h=>{n.openNode("dataValidation"),h.type!=="any"&&(n.addAttribute("type",h.type),h.operator&&h.type!=="list"&&h.operator!=="between"&&n.addAttribute("operator",h.operator),h.allowBlank&&n.addAttribute("allowBlank","1")),h.showInputMessage&&n.addAttribute("showInputMessage","1"),h.promptTitle&&n.addAttribute("promptTitle",h.promptTitle),h.prompt&&n.addAttribute("prompt",h.prompt),h.showErrorMessage&&n.addAttribute("showErrorMessage","1"),h.errorStyle&&n.addAttribute("errorStyle",h.errorStyle),h.errorTitle&&n.addAttribute("errorTitle",h.errorTitle),h.error&&n.addAttribute("error",h.error),n.addAttribute("sqref",h.sqref),(h.formulae||[]).forEach((u,d)=>{n.openNode("formula"+(d+1)),h.type==="date"?n.writeText(o.dateToExcel(new Date(u))):n.writeText(u),n.closeNode()}),n.closeNode()}),n.closeNode())}parseOpen(n){switch(n.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=n.attributes.sqref;const i={type:n.attributes.type||"any",formulae:[]};switch(n.attributes.type&&l(i,n.attributes,"allowBlank"),l(i,n.attributes,"showInputMessage"),l(i,n.attributes,"showErrorMessage"),i.type){case"any":case"list":case"custom":break;default:e(i,n.attributes,"operator","between")}return e(i,n.attributes,"promptTitle"),e(i,n.attributes,"prompt"),e(i,n.attributes,"errorStyle"),e(i,n.attributes,"errorTitle"),e(i,n.attributes,"error"),this._dataValidation=i,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}parseText(n){this._formula&&this._formula.push(n)}parseClose(n){switch(n){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach(i=>{i.includes(":")?new t(i).forEachAddress(c=>{this.model[c]=this._dataValidation}):this.model[i]=this._dataValidation}),!0;case"formula1":case"formula2":{let i=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":i=parseInt(i,10);break;case"decimal":i=parseFloat(i);break;case"date":i=o.excelToDate(parseFloat(i))}return this._dataValidation.formulae.push(i),this._formula=void 0,!0}default:return!0}}}},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"dimension"}render(o,a){a&&o.leafNode("dimension",{ref:a})}parseOpen(o){return o.name==="dimension"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"drawing"}render(o,a){a&&o.leafNode(this.tag,{"r:id":a.rId})}parseOpen(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],96:[function(s,T,S){const m=s("../composite-xform"),o=s("./cf-ext/conditional-formattings-ext-xform");class a extends m{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new o}}get tag(){return"ext"}hasContent(t){return this.conditionalFormattings.hasContent(t.conditionalFormattings)}prepare(t,e){this.conditionalFormattings.prepare(t.conditionalFormattings,e)}render(t,e){t.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(t,e.conditionalFormattings),t.closeNode()}createNewModel(){return{}}onParserClose(t,e){this.model[t]=e.model}}T.exports=class extends m{constructor(){super(),this.map={ext:this.ext=new a}}get tag(){return"extLst"}prepare(r,t){this.ext.prepare(r,t)}hasContent(r){return this.ext.hasContent(r)}render(r,t){this.hasContent(t)&&(r.openNode("extLst"),this.ext.render(r,t),r.closeNode())}createNewModel(){return{}}onParserClose(r,t){Object.assign(this.model,t.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"headerFooter"}render(o,a){if(a){o.addRollback();let r=!1;o.openNode("headerFooter"),a.differentFirst&&(o.addAttribute("differentFirst","1"),r=!0),a.differentOddEven&&(o.addAttribute("differentOddEven","1"),r=!0),a.oddHeader&&typeof a.oddHeader=="string"&&(o.leafNode("oddHeader",null,a.oddHeader),r=!0),a.oddFooter&&typeof a.oddFooter=="string"&&(o.leafNode("oddFooter",null,a.oddFooter),r=!0),a.evenHeader&&typeof a.evenHeader=="string"&&(o.leafNode("evenHeader",null,a.evenHeader),r=!0),a.evenFooter&&typeof a.evenFooter=="string"&&(o.leafNode("evenFooter",null,a.evenFooter),r=!0),a.firstHeader&&typeof a.firstHeader=="string"&&(o.leafNode("firstHeader",null,a.firstHeader),r=!0),a.firstFooter&&typeof a.firstFooter=="string"&&(o.leafNode("firstFooter",null,a.firstFooter),r=!0),r?(o.closeNode(),o.commit()):o.rollback()}}parseOpen(o){switch(o.name){case"headerFooter":return this.model={},o.attributes.differentFirst&&(this.model.differentFirst=parseInt(o.attributes.differentFirst,0)===1),o.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(o.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}parseText(o){switch(this.currentNode){case"oddHeader":this.model.oddHeader=o;break;case"oddFooter":this.model.oddFooter=o;break;case"evenHeader":this.model.evenHeader=o;break;case"evenFooter":this.model.evenFooter=o;break;case"firstHeader":this.model.firstHeader=o;break;case"firstFooter":this.model.firstFooter=o}}parseClose(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}}},{"../base-xform":32}],98:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"hyperlink"}render(o,a){this.isInternalLink(a)?o.leafNode("hyperlink",{ref:a.address,"r:id":a.rId,tooltip:a.tooltip,location:a.target}):o.leafNode("hyperlink",{ref:a.address,"r:id":a.rId,tooltip:a.tooltip})}parseOpen(o){return o.name==="hyperlink"&&(this.model={address:o.attributes.ref,rId:o.attributes["r:id"],tooltip:o.attributes.tooltip},o.attributes.location&&(this.model.target=o.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(o){return o.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(o.target)}}},{"../base-xform":32}],99:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"mergeCell"}render(o,a){o.leafNode("mergeCell",{ref:a})}parseOpen(o){return o.name==="mergeCell"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(s,T,S){const m=s("../../../utils/under-dash"),o=s("../../../doc/range"),a=s("../../../utils/col-cache"),r=s("../../../doc/enums");T.exports=class{constructor(){this.merges={}}add(t){if(this.merges[t.master])this.merges[t.master].expandToAddress(t.address);else{const e=`${t.master}:${t.address}`;this.merges[t.master]=new o(e)}}get mergeCells(){return m.map(this.merges,t=>t.range)}reconcile(t,e){m.each(t,l=>{const n=a.decode(l);for(let i=n.top;i<=n.bottom;i++){const c=e[i-1];for(let h=n.left;h<=n.right;h++){const u=c.cells[h-1];u?u.type===r.ValueType.Merge&&(u.master=n.tl):c.cells[h]={type:r.ValueType.Null,address:a.encodeAddress(i,h)}}}})}getMasterAddress(t){const e=this.hash[t];return e&&e.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(s,T,S){const m=s("../base-xform"),o=a=>a!==void 0;T.exports=class extends m{get tag(){return"outlinePr"}render(a,r){return!(!r||!o(r.summaryBelow)&&!o(r.summaryRight))&&(a.leafNode(this.tag,{summaryBelow:o(r.summaryBelow)?Number(r.summaryBelow):void 0,summaryRight:o(r.summaryRight)?Number(r.summaryRight):void 0}),!0)}parseOpen(a){return a.name===this.tag&&(this.model={summaryBelow:o(a.attributes.summaryBelow)?!!Number(a.attributes.summaryBelow):void 0,summaryRight:o(a.attributes.summaryRight)?!!Number(a.attributes.summaryRight):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"brk"}render(o,a){o.leafNode("brk",a)}parseOpen(o){return o.name==="brk"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(s,T,S){const m=s("../../../utils/under-dash"),o=s("../base-xform");T.exports=class extends o{get tag(){return"pageMargins"}render(a,r){if(r){const t={left:r.left,right:r.right,top:r.top,bottom:r.bottom,header:r.header,footer:r.footer};m.some(t,e=>e!==void 0)&&a.leafNode(this.tag,t)}}parseOpen(a){switch(a.name){case this.tag:return this.model={left:parseFloat(a.attributes.left||.7),right:parseFloat(a.attributes.right||.7),top:parseFloat(a.attributes.top||.75),bottom:parseFloat(a.attributes.bottom||.75),header:parseFloat(a.attributes.header||.3),footer:parseFloat(a.attributes.footer||.3)},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"pageSetUpPr"}render(o,a){return!(!a||!a.fitToPage)&&(o.leafNode(this.tag,{fitToPage:a.fitToPage?"1":void 0}),!0)}parseOpen(o){return o.name===this.tag&&(this.model={fitToPage:o.attributes.fitToPage==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],105:[function(s,T,S){const m=s("../../../utils/under-dash"),o=s("../base-xform");function a(l){return l?"1":void 0}function r(l){switch(l){case"overThenDown":return l;default:return}}function t(l){switch(l){case"atEnd":case"asDisplyed":return l;default:return}}function e(l){switch(l){case"dash":case"blank":case"NA":return l;default:return}}T.exports=class extends o{get tag(){return"pageSetup"}render(l,n){if(n){const i={paperSize:n.paperSize,orientation:n.orientation,horizontalDpi:n.horizontalDpi,verticalDpi:n.verticalDpi,pageOrder:r(n.pageOrder),blackAndWhite:a(n.blackAndWhite),draft:a(n.draft),cellComments:t(n.cellComments),errors:e(n.errors),scale:n.scale,fitToWidth:n.fitToWidth,fitToHeight:n.fitToHeight,firstPageNumber:n.firstPageNumber,useFirstPageNumber:a(n.firstPageNumber),usePrinterDefaults:a(n.usePrinterDefaults),copies:n.copies};m.some(i,c=>c!==void 0)&&l.leafNode(this.tag,i)}}parseOpen(l){switch(l.name){case this.tag:return this.model={paperSize:(n=l.attributes.paperSize,n!==void 0?parseInt(n,10):void 0),orientation:l.attributes.orientation||"portrait",horizontalDpi:parseInt(l.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(l.attributes.verticalDpi||"4294967295",10),pageOrder:l.attributes.pageOrder||"downThenOver",blackAndWhite:l.attributes.blackAndWhite==="1",draft:l.attributes.draft==="1",cellComments:l.attributes.cellComments||"None",errors:l.attributes.errors||"displayed",scale:parseInt(l.attributes.scale||"100",10),fitToWidth:parseInt(l.attributes.fitToWidth||"1",10),fitToHeight:parseInt(l.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(l.attributes.firstPageNumber||"1",10),useFirstPageNumber:l.attributes.useFirstPageNumber==="1",usePrinterDefaults:l.attributes.usePrinterDefaults==="1",copies:parseInt(l.attributes.copies||"1",10)},!0;default:return!1}var n}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"picture"}render(o,a){a&&o.leafNode(this.tag,{"r:id":a.rId})}parseOpen(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],107:[function(s,T,S){const m=s("../../../utils/under-dash"),o=s("../base-xform");function a(r){return r?"1":void 0}T.exports=class extends o{get tag(){return"printOptions"}render(r,t){if(t){const e={headings:a(t.showRowColHeaders),gridLines:a(t.showGridLines),horizontalCentered:a(t.horizontalCentered),verticalCentered:a(t.verticalCentered)};m.some(e,l=>l!==void 0)&&r.leafNode(this.tag,e)}}parseOpen(r){switch(r.name){case this.tag:return this.model={showRowColHeaders:r.attributes.headings==="1",showGridLines:r.attributes.gridLines==="1",horizontalCentered:r.attributes.horizontalCentered==="1",verticalCentered:r.attributes.verticalCentered==="1"},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(s,T,S){const m=s("./page-breaks-xform"),o=s("../list-xform");T.exports=class extends o{constructor(){super({tag:"rowBreaks",count:!0,childXform:new m})}render(a,r){if(r&&r.length){a.openNode(this.tag,this.$),this.count&&(a.addAttribute(this.$count,r.length),a.addAttribute("manualBreakCount",r.length));const{childXform:t}=this;r.forEach(e=>{t.render(a,e)}),a.closeNode()}else this.empty&&a.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(s,T,S){const m=s("../base-xform"),o=s("../../../utils/utils"),a=s("./cell-xform");T.exports=class extends m{constructor(r){super(),this.maxItems=r&&r.maxItems,this.map={c:new a}}get tag(){return"row"}prepare(r,t){const e=t.styles.addStyleModel(r.style);e&&(r.styleId=e);const l=this.map.c;r.cells.forEach(n=>{l.prepare(n,t)})}render(r,t,e){r.openNode("row"),r.addAttribute("r",t.number),t.height&&(r.addAttribute("ht",t.height),r.addAttribute("customHeight","1")),t.hidden&&r.addAttribute("hidden","1"),t.min>0&&t.max>0&&t.min<=t.max&&r.addAttribute("spans",`${t.min}:${t.max}`),t.styleId&&(r.addAttribute("s",t.styleId),r.addAttribute("customFormat","1")),r.addAttribute("x14ac:dyDescent","0.25"),t.outlineLevel&&r.addAttribute("outlineLevel",t.outlineLevel),t.collapsed&&r.addAttribute("collapsed","1");const l=this.map.c;t.cells.forEach(n=>{l.render(r,n,e)}),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;if(r.name==="row"){this.numRowsSeen+=1;const t=r.attributes.spans?r.attributes.spans.split(":").map(l=>parseInt(l,10)):[void 0,void 0],e=this.model={number:parseInt(r.attributes.r,10),min:t[0],max:t[1],cells:[]};return r.attributes.s&&(e.styleId=parseInt(r.attributes.s,10)),o.parseBoolean(r.attributes.hidden)&&(e.hidden=!0),o.parseBoolean(r.attributes.bestFit)&&(e.bestFit=!0),r.attributes.ht&&(e.height=parseFloat(r.attributes.ht)),r.attributes.outlineLevel&&(e.outlineLevel=parseInt(r.attributes.outlineLevel,10)),o.parseBoolean(r.attributes.collapsed)&&(e.collapsed=!0),!0}return this.parser=this.map[r.name],!!this.parser&&(this.parser.parseOpen(r),!0)}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser){if(!this.parser.parseClose(r)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error(`Max column count (${this.maxItems}) exceeded`);this.parser=void 0}return!0}return!1}reconcile(r,t){r.style=r.styleId?t.styles.getStyleModel(r.styleId):{},r.styleId!==void 0&&(r.styleId=void 0);const e=this.map.c;r.cells.forEach(l=>{e.reconcile(l,t)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(s,T,S){const m=s("../../../utils/under-dash"),o=s("../base-xform");T.exports=class extends o{get tag(){return"sheetFormatPr"}render(a,r){if(r){const t={defaultRowHeight:r.defaultRowHeight,outlineLevelRow:r.outlineLevelRow,outlineLevelCol:r.outlineLevelCol,"x14ac:dyDescent":r.dyDescent};r.defaultColWidth&&(t.defaultColWidth=r.defaultColWidth),r.defaultRowHeight&&r.defaultRowHeight===15||(t.customHeight="1"),m.some(t,e=>e!==void 0)&&a.leafNode("sheetFormatPr",t)}}parseOpen(a){return a.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(a.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(a.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(a.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(a.attributes.outlineLevelCol||"0",10)},a.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(a.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(s,T,S){const m=s("../base-xform"),o=s("../style/color-xform"),a=s("./page-setup-properties-xform"),r=s("./outline-properties-xform");T.exports=class extends m{constructor(){super(),this.map={tabColor:new o("tabColor"),pageSetUpPr:new a,outlinePr:new r}}get tag(){return"sheetPr"}render(t,e){if(e){t.addRollback(),t.openNode("sheetPr");let l=!1;l=this.map.tabColor.render(t,e.tabColor)||l,l=this.map.pageSetUpPr.render(t,e.pageSetup)||l,l=this.map.outlinePr.render(t,e.outlineProperties)||l,l?(t.closeNode(),t.commit()):t.rollback()}}parseOpen(t){return this.parser?(this.parser.parseOpen(t),!0):t.name===this.tag?(this.reset(),!0):!!this.map[t.name]&&(this.parser=this.map[t.name],this.parser.parseOpen(t),!0)}parseText(t){return!!this.parser&&(this.parser.parseText(t),!0)}parseClose(t){return this.parser?(this.parser.parseClose(t)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}},{"../base-xform":32,"../style/color-xform":128,"./outline-properties-xform":101,"./page-setup-properties-xform":104}],112:[function(s,T,S){const m=s("../../../utils/under-dash"),o=s("../base-xform");function a(t,e){return t?e:void 0}function r(t,e){return t===e||void 0}T.exports=class extends o{get tag(){return"sheetProtection"}render(t,e){if(e){const l={sheet:a(e.sheet,"1"),selectLockedCells:e.selectLockedCells===!1?"1":void 0,selectUnlockedCells:e.selectUnlockedCells===!1?"1":void 0,formatCells:a(e.formatCells,"0"),formatColumns:a(e.formatColumns,"0"),formatRows:a(e.formatRows,"0"),insertColumns:a(e.insertColumns,"0"),insertRows:a(e.insertRows,"0"),insertHyperlinks:a(e.insertHyperlinks,"0"),deleteColumns:a(e.deleteColumns,"0"),deleteRows:a(e.deleteRows,"0"),sort:a(e.sort,"0"),autoFilter:a(e.autoFilter,"0"),pivotTables:a(e.pivotTables,"0")};e.sheet&&(l.algorithmName=e.algorithmName,l.hashValue=e.hashValue,l.saltValue=e.saltValue,l.spinCount=e.spinCount,l.objects=a(e.objects===!1,"1"),l.scenarios=a(e.scenarios===!1,"1")),m.some(l,n=>n!==void 0)&&t.leafNode(this.tag,l)}}parseOpen(t){switch(t.name){case this.tag:return this.model={sheet:r(t.attributes.sheet,"1"),objects:t.attributes.objects!=="1"&&void 0,scenarios:t.attributes.scenarios!=="1"&&void 0,selectLockedCells:t.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:t.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:r(t.attributes.formatCells,"0"),formatColumns:r(t.attributes.formatColumns,"0"),formatRows:r(t.attributes.formatRows,"0"),insertColumns:r(t.attributes.insertColumns,"0"),insertRows:r(t.attributes.insertRows,"0"),insertHyperlinks:r(t.attributes.insertHyperlinks,"0"),deleteColumns:r(t.attributes.deleteColumns,"0"),deleteRows:r(t.attributes.deleteRows,"0"),sort:r(t.attributes.sort,"0"),autoFilter:r(t.attributes.autoFilter,"0"),pivotTables:r(t.attributes.pivotTables,"0")},t.attributes.algorithmName&&(this.model.algorithmName=t.attributes.algorithmName,this.model.hashValue=t.attributes.hashValue,this.model.saltValue=t.attributes.saltValue,this.model.spinCount=parseInt(t.attributes.spinCount,10)),!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(s,T,S){const m=s("../../../utils/col-cache"),o=s("../base-xform"),a={frozen:"frozen",frozenSplit:"frozen",split:"split"};T.exports=class extends o{get tag(){return"sheetView"}prepare(r){switch(r.state){case"frozen":case"split":break;default:r.state="normal"}}render(r,t){r.openNode("sheetView",{workbookViewId:t.workbookViewId||0});const e=function(h,u,d){d&&r.addAttribute(h,u)};let l,n,i,c;switch(e("rightToLeft","1",t.rightToLeft===!0),e("tabSelected","1",t.tabSelected),e("showRuler","0",t.showRuler===!1),e("showRowColHeaders","0",t.showRowColHeaders===!1),e("showGridLines","0",t.showGridLines===!1),e("zoomScale",t.zoomScale,t.zoomScale),e("zoomScaleNormal",t.zoomScaleNormal,t.zoomScaleNormal),e("view",t.style,t.style),t.state){case"frozen":n=t.xSplit||0,i=t.ySplit||0,l=t.topLeftCell||m.getAddress(i+1,n+1).address,c=(t.xSplit&&t.ySplit?"bottomRight":t.xSplit&&"topRight")||"bottomLeft",r.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:l,activePane:c,state:"frozen"}),r.leafNode("selection",{pane:c,activeCell:t.activeCell,sqref:t.activeCell});break;case"split":t.activePane==="topLeft"&&(t.activePane=void 0),r.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:t.topLeftCell,activePane:t.activePane}),r.leafNode("selection",{pane:t.activePane,activeCell:t.activeCell,sqref:t.activeCell});break;case"normal":t.activeCell&&r.leafNode("selection",{activeCell:t.activeCell,sqref:t.activeCell})}r.closeNode()}parseOpen(r){switch(r.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(r.attributes.workbookViewId,10),rightToLeft:r.attributes.rightToLeft==="1",tabSelected:r.attributes.tabSelected==="1",showRuler:r.attributes.showRuler!=="0",showRowColHeaders:r.attributes.showRowColHeaders!=="0",showGridLines:r.attributes.showGridLines!=="0",zoomScale:parseInt(r.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(r.attributes.zoomScaleNormal||"100",10),style:r.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(r.attributes.xSplit||"0",10),ySplit:parseInt(r.attributes.ySplit||"0",10),topLeftCell:r.attributes.topLeftCell,activePane:r.attributes.activePane||"topLeft",state:r.attributes.state},!0;case"selection":{const t=r.attributes.pane||"topLeft";return this.selections[t]={pane:t,activeCell:r.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(r){let t,e;switch(r){case"sheetView":return this.sheetView&&this.pane?(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:a[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(t.activePane=this.pane.activePane),e=this.selections[this.pane.activePane],e&&e.activeCell&&(t.activeCell=e.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)):(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},e=this.selections.topLeft,e&&e.activeCell&&(t.activeCell=e.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)),!1;default:return!0}}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"tablePart"}render(o,a){a&&o.leafNode(this.tag,{"r:id":a.rId})}parseOpen(o){switch(o.name){case this.tag:return this.model={rId:o.attributes["r:id"]},!0;default:return!1}}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],115:[function(s,T,S){const m=s("../../../utils/under-dash"),o=s("../../../utils/col-cache"),a=s("../../../utils/xml-stream"),r=s("../../rel-type"),t=s("./merges"),e=s("../base-xform"),l=s("../list-xform"),n=s("./row-xform"),i=s("./col-xform"),c=s("./dimension-xform"),h=s("./hyperlink-xform"),u=s("./merge-cell-xform"),d=s("./data-validations-xform"),f=s("./sheet-properties-xform"),w=s("./sheet-format-properties-xform"),_=s("./sheet-view-xform"),A=s("./sheet-protection-xform"),N=s("./page-margins-xform"),L=s("./page-setup-xform"),j=s("./print-options-xform"),P=s("./auto-filter-xform"),D=s("./picture-xform"),$=s("./drawing-xform"),B=s("./table-part-xform"),x=s("./row-breaks-xform"),M=s("./header-footer-xform"),v=s("./cf/conditional-formattings-xform"),p=s("./ext-lst-xform"),b=(y,k)=>{if(!k||!k.length)return y;if(!y||!y.length)return k;const R={},I={};return y.forEach(z=>{R[z.ref]=z,z.rules.forEach(U=>{const{x14Id:q}=U;q&&(I[q]=U)})}),k.forEach(z=>{z.rules.forEach(U=>{const q=I[U.x14Id];q?((O,H)=>{Object.keys(H).forEach(E=>{const C=O[E],F=H[E];C===void 0&&F!==void 0&&(O[E]=F)})})(q,U):R[z.ref]?R[z.ref].rules.push(U):y.push({ref:z.ref,rules:[U]})})}),y};class g extends e{constructor(k){super();const{maxRows:R,maxCols:I,ignoreNodes:z}=k||{};this.ignoreNodes=z||[],this.map={sheetPr:new f,dimension:new c,sheetViews:new l({tag:"sheetViews",count:!1,childXform:new _}),sheetFormatPr:new w,cols:new l({tag:"cols",count:!1,childXform:new i}),sheetData:new l({tag:"sheetData",count:!1,empty:!0,childXform:new n({maxItems:I}),maxItems:R}),autoFilter:new P,mergeCells:new l({tag:"mergeCells",count:!0,childXform:new u}),rowBreaks:new x,hyperlinks:new l({tag:"hyperlinks",count:!1,childXform:new h}),pageMargins:new N,dataValidations:new d,pageSetup:new L,headerFooter:new M,printOptions:new j,picture:new D,drawing:new $,sheetProtection:new A,tableParts:new l({tag:"tableParts",count:!0,childXform:new B}),conditionalFormatting:new v,extLst:new p}}prepare(k,R){R.merges=new t,k.hyperlinks=R.hyperlinks=[],k.comments=R.comments=[],R.formulae={},R.siFormulae=0,this.map.cols.prepare(k.cols,R),this.map.sheetData.prepare(k.rows,R),this.map.conditionalFormatting.prepare(k.conditionalFormattings,R),k.mergeCells=R.merges.mergeCells;const I=k.rels=[];function z(O){return"rId"+(O.length+1)}if(k.hyperlinks.forEach(O=>{const H=z(I);O.rId=H,I.push({Id:H,Type:r.Hyperlink,Target:O.target,TargetMode:"External"})}),k.comments.length>0){const O={Id:z(I),Type:r.Comments,Target:`../comments${k.id}.xml`};I.push(O);const H={Id:z(I),Type:r.VmlDrawing,Target:`../drawings/vmlDrawing${k.id}.vml`};I.push(H),k.comments.forEach(E=>{E.refAddress=o.decodeAddress(E.ref)}),R.commentRefs.push({commentName:"comments"+k.id,vmlDrawing:"vmlDrawing"+k.id})}const U=[];let q;k.media.forEach(O=>{if(O.type==="background"){const H=z(I);q=R.media[O.imageId],I.push({Id:H,Type:r.Image,Target:`../media/${q.name}.${q.extension}`}),k.background={rId:H},k.image=R.media[O.imageId]}else if(O.type==="image"){let{drawing:H}=k;q=R.media[O.imageId],H||(H=k.drawing={rId:z(I),name:"drawing"+ ++R.drawingsCount,anchors:[],rels:[]},R.drawings.push(H),I.push({Id:H.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${H.name}.xml`}));let E=this.preImageId===O.imageId?U[O.imageId]:U[H.rels.length];E||(E=z(H.rels),U[H.rels.length]=E,H.rels.push({Id:E,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${q.name}.${q.extension}`}));const C={picture:{rId:E},range:O.range};if(O.hyperlinks&&O.hyperlinks.hyperlink){const F=z(H.rels);U[H.rels.length]=F,C.picture.hyperlinks={tooltip:O.hyperlinks.tooltip,rId:F},H.rels.push({Id:F,Type:r.Hyperlink,Target:O.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=O.imageId,H.anchors.push(C)}}),k.tables.forEach(O=>{const H=z(I);O.rId=H,I.push({Id:H,Type:r.Table,Target:"../tables/"+O.target}),O.columns.forEach(E=>{const{style:C}=E;C&&(E.dxfId=R.styles.addDxfStyle(C))})}),this.map.extLst.prepare(k,R)}render(k,R){k.openXml(a.StdDocAttributes),k.openNode("worksheet",g.WORKSHEET_ATTRIBUTES);const I=R.properties?{defaultRowHeight:R.properties.defaultRowHeight,dyDescent:R.properties.dyDescent,outlineLevelCol:R.properties.outlineLevelCol,outlineLevelRow:R.properties.outlineLevelRow}:void 0;R.properties&&R.properties.defaultColWidth&&(I.defaultColWidth=R.properties.defaultColWidth);const z={outlineProperties:R.properties&&R.properties.outlineProperties,tabColor:R.properties&&R.properties.tabColor,pageSetup:R.pageSetup&&R.pageSetup.fitToPage?{fitToPage:R.pageSetup.fitToPage}:void 0},U=R.pageSetup&&R.pageSetup.margins,q={showRowColHeaders:R.pageSetup&&R.pageSetup.showRowColHeaders,showGridLines:R.pageSetup&&R.pageSetup.showGridLines,horizontalCentered:R.pageSetup&&R.pageSetup.horizontalCentered,verticalCentered:R.pageSetup&&R.pageSetup.verticalCentered},O=R.sheetProtection;this.map.sheetPr.render(k,z),this.map.dimension.render(k,R.dimensions),this.map.sheetViews.render(k,R.views),this.map.sheetFormatPr.render(k,I),this.map.cols.render(k,R.cols),this.map.sheetData.render(k,R.rows),this.map.sheetProtection.render(k,O),this.map.autoFilter.render(k,R.autoFilter),this.map.mergeCells.render(k,R.mergeCells),this.map.conditionalFormatting.render(k,R.conditionalFormattings),this.map.dataValidations.render(k,R.dataValidations),this.map.hyperlinks.render(k,R.hyperlinks),this.map.printOptions.render(k,q),this.map.pageMargins.render(k,U),this.map.pageSetup.render(k,R.pageSetup),this.map.headerFooter.render(k,R.headerFooter),this.map.rowBreaks.render(k,R.rowBreaks),this.map.drawing.render(k,R.drawing),this.map.picture.render(k,R.background),this.map.tableParts.render(k,R.tables),this.map.extLst.render(k,R),R.rels&&R.rels.forEach(H=>{H.Type===r.VmlDrawing&&k.leafNode("legacyDrawing",{"r:id":H.Id})}),k.closeNode()}parseOpen(k){return this.parser?(this.parser.parseOpen(k),!0):k.name==="worksheet"?(m.each(this.map,R=>{R.reset()}),!0):(this.map[k.name]&&!this.ignoreNodes.includes(k.name)&&(this.parser=this.map[k.name],this.parser.parseOpen(k)),!0)}parseText(k){this.parser&&this.parser.parseText(k)}parseClose(k){if(this.parser)return this.parser.parseClose(k)||(this.parser=void 0),!0;switch(k){case"worksheet":{const R=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(R.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(R.outlineProperties=this.map.sheetPr.model.outlineProperties);const I={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},z=Object.assign(I,this.map.pageSetup.model,this.map.printOptions.model),U=b(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:R,views:this.map.sheetViews.model,pageSetup:z,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:U},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}default:return!0}}reconcile(k,R){const I=(k.relationships||[]).reduce((U,q)=>{if(U[q.Id]=q,q.Type===r.Comments&&(k.comments=R.comments[q.Target].comments),q.Type===r.VmlDrawing&&k.comments&&k.comments.length){const O=R.vmlDrawings[q.Target].comments;k.comments.forEach((H,E)=>{H.note=Object.assign({},H.note,O[E])})}return U},{});if(R.commentsMap=(k.comments||[]).reduce((U,q)=>(q.ref&&(U[q.ref]=q),U),{}),R.hyperlinkMap=(k.hyperlinks||[]).reduce((U,q)=>(q.rId&&(U[q.address]=I[q.rId].Target),U),{}),R.formulae={},k.rows=k.rows&&k.rows.filter(Boolean)||[],k.rows.forEach(U=>{U.cells=U.cells&&U.cells.filter(Boolean)||[]}),this.map.cols.reconcile(k.cols,R),this.map.sheetData.reconcile(k.rows,R),this.map.conditionalFormatting.reconcile(k.conditionalFormattings,R),k.media=[],k.drawing){const U=I[k.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(U){const q=U[1];R.drawings[q].anchors.forEach(O=>{if(O.medium){const H={type:"image",imageId:O.medium.index,range:O.range,hyperlinks:O.picture.hyperlinks};k.media.push(H)}})}}const z=k.background&&I[k.background.rId];if(z){const U=z.Target.split("/media/")[1],q=R.mediaIndex&&R.mediaIndex[U];q!==void 0&&k.media.push({type:"background",imageId:q})}k.tables=(k.tables||[]).map(U=>{const q=I[U.rId];return R.tables[q.Target]}),delete k.relationships,delete k.hyperlinks,delete k.comments}}g.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},T.exports=g},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../../rel-type":31,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":72,"./cf/conditional-formattings-xform":87,"./col-xform":92,"./data-validations-xform":93,"./dimension-xform":94,"./drawing-xform":95,"./ext-lst-xform":96,"./header-footer-xform":97,"./hyperlink-xform":98,"./merge-cell-xform":99,"./merges":100,"./page-margins-xform":103,"./page-setup-xform":105,"./picture-xform":106,"./print-options-xform":107,"./row-breaks-xform":108,"./row-xform":109,"./sheet-format-properties-xform":110,"./sheet-properties-xform":111,"./sheet-protection-xform":112,"./sheet-view-xform":113,"./table-part-xform":114}],116:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{constructor(o){super(),this.tag=o.tag,this.attr=o.attr}render(o,a){a&&(o.openNode(this.tag),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],117:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs,this._format=o.format||function(a){try{return Number.isNaN(a.getTime())?"":a.toISOString()}catch{return""}},this._parse=o.parse||function(a){return new Date(a)}}render(o,a){a&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,this._format(a)):o.writeText(this._format(a)),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.attr?this.model=this._parse(o.attributes[this.attr]):this.text=[])}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}},{"../base-xform":32}],118:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs,this.zero=o.zero}render(o,a){(a||this.zero)&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,a):o.writeText(a),o.closeNode())}parseOpen(o){return o.name===this.tag&&(this.attr?this.model=parseInt(o.attributes[this.attr],10):this.text=[],!0)}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}},{"../base-xform":32}],119:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs}render(o,a){a!==void 0&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,a):o.writeText(a),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.attr?this.model=o.attributes[this.attr]:this.text=[])}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}}},{"../base-xform":32}],120:[function(s,T,S){const m=s("./base-xform"),o=s("../../utils/xml-stream");T.exports=class extends m{constructor(a){super(),this._model=a}render(a){if(!this._xml){const r=new o;(function t(e,l){e.openNode(l.tag,l.$),l.c&&l.c.forEach(n=>{t(e,n)}),l.t&&e.writeText(l.t),e.closeNode()})(r,this._model),this._xml=r.xml}a.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(a){switch(a){case this._model.tag:return!1;default:return!0}}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(s,T,S){const m=s("./text-xform"),o=s("./rich-text-xform"),a=s("../base-xform");T.exports=class extends a{constructor(){super(),this.map={r:new o,t:new m}}get tag(){return"rPh"}render(r,t){if(r.openNode(this.tag,{sb:t.sb||0,eb:t.eb||0}),t&&t.hasOwnProperty("richText")&&t.richText){const{r:e}=this.map;t.richText.forEach(l=>{e.render(r,l)})}else t&&this.map.t.render(r,t.text);r.closeNode()}parseOpen(r){const{name:t}=r;return this.parser?(this.parser.parseOpen(r),!0):t===this.tag?(this.model={sb:parseInt(r.attributes.sb,10),eb:parseInt(r.attributes.eb,10)},!0):(this.parser=this.map[t],!!this.parser&&(this.parser.parseOpen(r),!0))}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser){if(!this.parser.parseClose(r)){switch(r){case"r":{let t=this.model.richText;t||(t=this.model.richText=[]),t.push(this.parser.model);break}case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}switch(r){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(s,T,S){const m=s("./text-xform"),o=s("../style/font-xform"),a=s("../base-xform");class r extends a{constructor(e){super(),this.model=e}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new m)}get fontXform(){return this._fontXform||(this._fontXform=new o(r.FONT_OPTIONS))}render(e,l){l=l||this.model,e.openNode("r"),l.font&&this.fontXform.render(e,l.font),this.textXform.render(e,l.text),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(e),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){switch(e){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(e),!0}}}r.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},T.exports=r},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(s,T,S){const m=s("./text-xform"),o=s("./rich-text-xform"),a=s("./phonetic-text-xform"),r=s("../base-xform");T.exports=class extends r{constructor(t){super(),this.model=t,this.map={r:new o,t:new m,rPh:new a}}get tag(){return"si"}render(t,e){t.openNode(this.tag),e&&e.hasOwnProperty("richText")&&e.richText?e.richText.length?e.richText.forEach(l=>{this.map.r.render(t,l)}):this.map.t.render(t,""):e!=null&&this.map.t.render(t,e),t.closeNode()}parseOpen(t){const{name:e}=t;return this.parser?(this.parser.parseOpen(t),!0):e===this.tag?(this.model={},!0):(this.parser=this.map[e],!!this.parser&&(this.parser.parseOpen(t),!0))}parseText(t){this.parser&&this.parser.parseText(t)}parseClose(t){if(this.parser){if(!this.parser.parseClose(t)){switch(t){case"r":{let e=this.model.richText;e||(e=this.model.richText=[]),e.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}switch(t){case this.tag:return!1;default:return!0}}}},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(s,T,S){const m=s("../../../utils/xml-stream"),o=s("../base-xform"),a=s("./shared-string-xform");T.exports=class extends o{constructor(r){super(),this.model=r||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new a)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(r){return this.model.values[r]}add(r){return r.richText?this.addRichText(r):this.addText(r)}addText(r){let t=this.hash[r];return t===void 0&&(t=this.hash[r]=this.model.values.length,this.model.values.push(r)),this.model.count++,t}addRichText(r){const t=this.sharedStringXform.toXml(r);let e=this.rich[t];return e===void 0&&(e=this.rich[t]=this.model.values.length,this.model.values.push(r)),this.model.count++,e}render(r,t){t=t||this._values,r.openXml(m.StdDocAttributes),r.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:t.count,uniqueCount:t.values.length});const e=this.sharedStringXform;t.values.forEach(l=>{e.render(r,l)}),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(r),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(r))}}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser)return this.parser.parseClose(r)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;switch(r){case"sst":return!1;default:throw new Error("Unexpected xml node in parseClose: "+r)}}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"t"}render(o,a){o.openNode("t"),/^\s|\n|\s$/.test(a)&&o.addAttribute("xml:space","preserve"),o.writeText(a),o.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(o,a)=>String.fromCharCode(parseInt(a,16)))}parseOpen(o){switch(o.name){case"t":return this._text=[],!0;default:return!1}}parseText(o){this._text.push(o)}parseClose(){return!1}}},{"../base-xform":32}],126:[function(s,T,S){const m=s("../../../doc/enums"),o=s("../../../utils/utils"),a=s("../base-xform"),r={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((e,l)=>(e[l]=!0,e),{}),horizontal(e){return this.horizontalValues[e]?e:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((e,l)=>(e[l]=!0,e),{}),vertical(e){return e==="middle"?"center":this.verticalValues[e]?e:void 0},wrapText:e=>!!e||void 0,shrinkToFit:e=>!!e||void 0,textRotation(e){switch(e){case"vertical":return e;default:return(e=o.validInt(e))>=-90&&e<=90?e:void 0}},indent:e=>(e=o.validInt(e),Math.max(0,e)),readingOrder(e){switch(e){case"ltr":return m.ReadingOrder.LeftToRight;case"rtl":return m.ReadingOrder.RightToLeft;default:return}}},t={toXml(e){if(e=r.textRotation(e)){if(e==="vertical")return 255;const l=Math.round(e);if(l>=0&&l<=90)return l;if(l<0&&l>=-90)return 90-l}},toModel(e){const l=o.validInt(e);if(l!==void 0){if(l===255)return"vertical";if(l>=0&&l<=90)return l;if(l>90&&l<=180)return 90-l}}};T.exports=class extends a{get tag(){return"alignment"}render(e,l){e.addRollback(),e.openNode("alignment");let n=!1;function i(c,h){h&&(e.addAttribute(c,h),n=!0)}i("horizontal",r.horizontal(l.horizontal)),i("vertical",r.vertical(l.vertical)),i("wrapText",!!r.wrapText(l.wrapText)&&"1"),i("shrinkToFit",!!r.shrinkToFit(l.shrinkToFit)&&"1"),i("indent",r.indent(l.indent)),i("textRotation",t.toXml(l.textRotation)),i("readingOrder",r.readingOrder(l.readingOrder)),e.closeNode(),n?e.commit():e.rollback()}parseOpen(e){const l={};let n=!1;function i(c,h,u){c&&(l[h]=u,n=!0)}i(e.attributes.horizontal,"horizontal",e.attributes.horizontal),i(e.attributes.vertical,"vertical",e.attributes.vertical==="center"?"middle":e.attributes.vertical),i(e.attributes.wrapText,"wrapText",o.parseBoolean(e.attributes.wrapText)),i(e.attributes.shrinkToFit,"shrinkToFit",o.parseBoolean(e.attributes.shrinkToFit)),i(e.attributes.indent,"indent",parseInt(e.attributes.indent,10)),i(e.attributes.textRotation,"textRotation",t.toModel(e.attributes.textRotation)),i(e.attributes.readingOrder,"readingOrder",e.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=n?l:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(s,T,S){const m=s("../base-xform"),o=s("../../../utils/utils"),a=s("./color-xform");class r extends m{constructor(e){super(),this.name=e,this.map={color:new a}}get tag(){return this.name}render(e,l,n){const i=l&&l.color||n||this.defaultColor;e.openNode(this.name),l&&l.style&&(e.addAttribute("style",l.style),i&&this.map.color.render(e,i)),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.name:{const{style:l}=e.attributes;return this.model=l?{style:l}:void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):(e===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(e){return r.validStyleValues[e]}}r.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((t,e)=>(t[e]=!0,t),{}),T.exports=class extends m{constructor(){super(),this.map={top:new r("top"),left:new r("left"),bottom:new r("bottom"),right:new r("right"),diagonal:new r("diagonal")}}render(t,e){const{color:l}=e;function n(i,c){i&&!i.color&&e.color&&(i={...i,color:e.color}),c.render(t,i,l)}t.openNode("border"),e.diagonal&&e.diagonal.style&&(e.diagonal.up&&t.addAttribute("diagonalUp","1"),e.diagonal.down&&t.addAttribute("diagonalDown","1")),n(e.left,this.map.left),n(e.right,this.map.right),n(e.top,this.map.top),n(e.bottom,this.map.bottom),n(e.diagonal,this.map.diagonal),t.closeNode()}parseOpen(t){if(this.parser)return this.parser.parseOpen(t),!0;switch(t.name){case"border":return this.reset(),this.diagonalUp=o.parseBoolean(t.attributes.diagonalUp),this.diagonalDown=o.parseBoolean(t.attributes.diagonalDown),!0;default:return this.parser=this.map[t.name],!!this.parser&&(this.parser.parseOpen(t),!0)}}parseText(t){this.parser&&this.parser.parseText(t)}parseClose(t){if(this.parser)return this.parser.parseClose(t)||(this.parser=void 0),!0;if(t==="border"){const e=this.model={},l=function(n,i,c){i&&(c&&Object.assign(i,c),e[n]=i)};l("left",this.map.left.model),l("right",this.map.right.model),l("top",this.map.top.model),l("bottom",this.map.bottom.model),l("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{constructor(o){super(),this.name=o||"color"}get tag(){return this.name}render(o,a){return!!a&&(o.openNode(this.name),a.argb?o.addAttribute("rgb",a.argb):a.theme!==void 0?(o.addAttribute("theme",a.theme),a.tint!==void 0&&o.addAttribute("tint",a.tint)):a.indexed!==void 0?o.addAttribute("indexed",a.indexed):o.addAttribute("auto","1"),o.closeNode(),!0)}parseOpen(o){return o.name===this.name&&(o.attributes.rgb?this.model={argb:o.attributes.rgb}:o.attributes.theme?(this.model={theme:parseInt(o.attributes.theme,10)},o.attributes.tint&&(this.model.tint=parseFloat(o.attributes.tint))):o.attributes.indexed?this.model={indexed:parseInt(o.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],129:[function(s,T,S){const m=s("../base-xform"),o=s("./alignment-xform"),a=s("./border-xform"),r=s("./fill-xform"),t=s("./font-xform"),e=s("./numfmt-xform"),l=s("./protection-xform");T.exports=class extends m{constructor(){super(),this.map={alignment:new o,border:new a,fill:new r,font:new t,numFmt:new e,protection:new l}}get tag(){return"dxf"}render(n,i){if(n.openNode(this.tag),i.font&&this.map.font.render(n,i.font),i.numFmt&&i.numFmtId){const c={id:i.numFmtId,formatCode:i.numFmt};this.map.numFmt.render(n,c)}i.fill&&this.map.fill.render(n,i.fill),i.alignment&&this.map.alignment.render(n,i.alignment),i.border&&this.map.border.render(n,i.border),i.protection&&this.map.protection.render(n,i.protection),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case this.tag:return this.reset(),!0;default:return this.parser=this.map[n.name],this.parser&&this.parser.parseOpen(n),!0}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){return this.parser?(this.parser.parseClose(n)||(this.parser=void 0),!0):n!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}}},{"../base-xform":32,"./alignment-xform":126,"./border-xform":127,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./protection-xform":133}],130:[function(s,T,S){const m=s("../base-xform"),o=s("./color-xform");class a extends m{constructor(){super(),this.map={color:new o}}get tag(){return"stop"}render(n,i){n.openNode("stop"),n.addAttribute("position",i.position),this.map.color.render(n,i.color),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"stop":return this.model={position:parseFloat(n.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(n),!0;default:return!1}}parseText(){}parseClose(n){return!!this.parser&&(this.parser.parseClose(n)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class r extends m{constructor(){super(),this.map={fgColor:new o("fgColor"),bgColor:new o("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(n,i){n.openNode("patternFill"),n.addAttribute("patternType",i.pattern),i.fgColor&&this.map.fgColor.render(n,i.fgColor),i.bgColor&&this.map.bgColor.render(n,i.bgColor),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"patternFill":return this.model={type:"pattern",pattern:n.attributes.patternType},!0;default:return this.parser=this.map[n.name],!!this.parser&&(this.parser.parseOpen(n),!0)}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){return!!this.parser&&(this.parser.parseClose(n)||(this.parser.model&&(this.model[n]=this.parser.model),this.parser=void 0),!0)}}class t extends m{constructor(){super(),this.map={stop:new a}}get name(){return"gradient"}get tag(){return"gradientFill"}render(n,i){switch(n.openNode("gradientFill"),i.gradient){case"angle":n.addAttribute("degree",i.degree);break;case"path":n.addAttribute("type","path"),i.center.left&&(n.addAttribute("left",i.center.left),i.center.right===void 0&&n.addAttribute("right",i.center.left)),i.center.right&&n.addAttribute("right",i.center.right),i.center.top&&(n.addAttribute("top",i.center.top),i.center.bottom===void 0&&n.addAttribute("bottom",i.center.top)),i.center.bottom&&n.addAttribute("bottom",i.center.bottom)}const c=this.map.stop;i.stops.forEach(h=>{c.render(n,h)}),n.closeNode()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"gradientFill":{const i=this.model={stops:[]};return n.attributes.degree?(i.gradient="angle",i.degree=parseInt(n.attributes.degree,10)):n.attributes.type==="path"&&(i.gradient="path",i.center={left:n.attributes.left?parseFloat(n.attributes.left):0,top:n.attributes.top?parseFloat(n.attributes.top):0},n.attributes.right!==n.attributes.left&&(i.center.right=n.attributes.right?parseFloat(n.attributes.right):0),n.attributes.bottom!==n.attributes.top&&(i.center.bottom=n.attributes.bottom?parseFloat(n.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(n),!0;default:return!1}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){return!!this.parser&&(this.parser.parseClose(n)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class e extends m{constructor(){super(),this.map={patternFill:new r,gradientFill:new t}}get tag(){return"fill"}render(n,i){switch(n.addRollback(),n.openNode("fill"),i.type){case"pattern":this.map.patternFill.render(n,i);break;case"gradient":this.map.gradientFill.render(n,i);break;default:return void n.rollback()}n.closeNode(),n.commit()}parseOpen(n){if(this.parser)return this.parser.parseOpen(n),!0;switch(n.name){case"fill":return this.model={},!0;default:return this.parser=this.map[n.name],!!this.parser&&(this.parser.parseOpen(n),!0)}}parseText(n){this.parser&&this.parser.parseText(n)}parseClose(n){return!!this.parser&&(this.parser.parseClose(n)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(n){return e.validPatternValues[n]}}e.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((l,n)=>(l[n]=!0,l),{}),e.StopXform=a,e.PatternFillXform=r,e.GradientFillXform=t,T.exports=e},{"../base-xform":32,"./color-xform":128}],131:[function(s,T,S){const m=s("./color-xform"),o=s("../simple/boolean-xform"),a=s("../simple/integer-xform"),r=s("../simple/string-xform"),t=s("./underline-xform"),e=s("../../../utils/under-dash"),l=s("../base-xform");class n extends l{constructor(c){super(),this.options=c||n.OPTIONS,this.map={b:{prop:"bold",xform:new o({tag:"b",attr:"val"})},i:{prop:"italic",xform:new o({tag:"i",attr:"val"})},u:{prop:"underline",xform:new t},charset:{prop:"charset",xform:new a({tag:"charset",attr:"val"})},color:{prop:"color",xform:new m},condense:{prop:"condense",xform:new o({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new o({tag:"extend",attr:"val"})},family:{prop:"family",xform:new a({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new o({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new r({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new r({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new o({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new o({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new a({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new r({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(c,h){const{map:u}=this;c.openNode(this.options.tagName),e.each(this.map,(d,f)=>{u[f].xform.render(c,h[d.prop])}),c.closeNode()}parseOpen(c){if(this.parser)return this.parser.parseOpen(c),!0;if(this.map[c.name])return this.parser=this.map[c.name].xform,this.parser.parseOpen(c);switch(c.name){case this.options.tagName:return this.model={},!0;default:return!1}}parseText(c){this.parser&&this.parser.parseText(c)}parseClose(c){if(this.parser&&!this.parser.parseClose(c)){const h=this.map[c];return this.parser.model&&(this.model[h.prop]=this.parser.model),this.parser=void 0,!0}switch(c){case this.options.tagName:return!1;default:return!0}}}n.OPTIONS={tagName:"font",fontNameTag:"name"},T.exports=n},{"../../../utils/under-dash":26,"../base-xform":32,"../simple/boolean-xform":116,"../simple/integer-xform":118,"../simple/string-xform":119,"./color-xform":128,"./underline-xform":136}],132:[function(s,T,S){const m=s("../../../utils/under-dash"),o=s("../../defaultnumformats"),a=s("../base-xform"),r=function(){const e={};return m.each(o,(l,n)=>{l.f&&(e[l.f]=parseInt(n,10))}),e}();class t extends a{constructor(l,n){super(),this.id=l,this.formatCode=n}get tag(){return"numFmt"}render(l,n){l.leafNode("numFmt",{numFmtId:n.id,formatCode:n.formatCode})}parseOpen(l){switch(l.name){case"numFmt":return this.model={id:parseInt(l.attributes.numFmtId,10),formatCode:l.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0;default:return!1}}parseText(){}parseClose(){return!1}}t.getDefaultFmtId=function(e){return r[e]},t.getDefaultFmtCode=function(e){return o[e]&&o[e].f},T.exports=t},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(s,T,S){const m=s("../base-xform"),o={boolean:(a,r)=>a===void 0?r:a};T.exports=class extends m{get tag(){return"protection"}render(a,r){a.addRollback(),a.openNode("protection");let t=!1;function e(l,n){n!==void 0&&(a.addAttribute(l,n),t=!0)}e("locked",o.boolean(r.locked,!0)?void 0:"0"),e("hidden",o.boolean(r.hidden,!1)?"1":void 0),a.closeNode(),t?a.commit():a.rollback()}parseOpen(a){const r={locked:a.attributes.locked!=="0",hidden:a.attributes.hidden==="1"},t=!r.locked||r.hidden;this.model=t?r:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(s,T,S){const m=s("../base-xform"),o=s("./alignment-xform"),a=s("./protection-xform");T.exports=class extends m{constructor(r){super(),this.xfId=!(!r||!r.xfId),this.map={alignment:new o,protection:new a}}get tag(){return"xf"}render(r,t){r.openNode("xf",{numFmtId:t.numFmtId||0,fontId:t.fontId||0,fillId:t.fillId||0,borderId:t.borderId||0}),this.xfId&&r.addAttribute("xfId",t.xfId||0),t.numFmtId&&r.addAttribute("applyNumberFormat","1"),t.fontId&&r.addAttribute("applyFont","1"),t.fillId&&r.addAttribute("applyFill","1"),t.borderId&&r.addAttribute("applyBorder","1"),t.alignment&&r.addAttribute("applyAlignment","1"),t.protection&&r.addAttribute("applyProtection","1"),t.alignment&&this.map.alignment.render(r,t.alignment),t.protection&&this.map.protection.render(r,t.protection),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case"xf":return this.model={numFmtId:parseInt(r.attributes.numFmtId,10),fontId:parseInt(r.attributes.fontId,10),fillId:parseInt(r.attributes.fillId,10),borderId:parseInt(r.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(r.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(r),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(r),!0;default:return!1}}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){return this.parser?(this.parser.parseClose(r)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):r!=="xf"}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(s,T,S){const m=s("../../../doc/enums"),o=s("../../../utils/xml-stream"),a=s("../base-xform"),r=s("../static-xform"),t=s("../list-xform"),e=s("./font-xform"),l=s("./fill-xform"),n=s("./border-xform"),i=s("./numfmt-xform"),c=s("./style-xform"),h=s("./dxf-xform");class u extends a{constructor(f){super(),this.map={numFmts:new t({tag:"numFmts",count:!0,childXform:new i}),fonts:new t({tag:"fonts",count:!0,childXform:new e,$:{"x14ac:knownFonts":1}}),fills:new t({tag:"fills",count:!0,childXform:new l}),borders:new t({tag:"borders",count:!0,childXform:new n}),cellStyleXfs:new t({tag:"cellStyleXfs",count:!0,childXform:new c}),cellXfs:new t({tag:"cellXfs",count:!0,childXform:new c({xfId:!0})}),dxfs:new t({tag:"dxfs",always:!0,count:!0,childXform:new h}),numFmt:new i,font:new e,fill:new l,border:new n,style:new c({xfId:!0}),cellStyles:u.STATIC_XFORMS.cellStyles,tableStyles:u.STATIC_XFORMS.tableStyles,extLst:u.STATIC_XFORMS.extLst},f&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}render(f,w){w=w||this.model,f.openXml(o.StdDocAttributes),f.openNode("styleSheet",u.STYLESHEET_ATTRIBUTES),this.index?(w.numFmts&&w.numFmts.length&&(f.openNode("numFmts",{count:w.numFmts.length}),w.numFmts.forEach(_=>{f.writeXml(_)}),f.closeNode()),w.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),f.openNode("fonts",{count:w.fonts.length,"x14ac:knownFonts":1}),w.fonts.forEach(_=>{f.writeXml(_)}),f.closeNode(),f.openNode("fills",{count:w.fills.length}),w.fills.forEach(_=>{f.writeXml(_)}),f.closeNode(),f.openNode("borders",{count:w.borders.length}),w.borders.forEach(_=>{f.writeXml(_)}),f.closeNode(),this.map.cellStyleXfs.render(f,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),f.openNode("cellXfs",{count:w.styles.length}),w.styles.forEach(_=>{f.writeXml(_)}),f.closeNode()):(this.map.numFmts.render(f,w.numFmts),this.map.fonts.render(f,w.fonts),this.map.fills.render(f,w.fills),this.map.borders.render(f,w.borders),this.map.cellStyleXfs.render(f,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(f,w.styles)),u.STATIC_XFORMS.cellStyles.render(f),this.map.dxfs.render(f,w.dxfs),u.STATIC_XFORMS.tableStyles.render(f),u.STATIC_XFORMS.extLst.render(f),f.closeNode()}parseOpen(f){if(this.parser)return this.parser.parseOpen(f),!0;switch(f.name){case"styleSheet":return this.initIndex(),!0;default:return this.parser=this.map[f.name],this.parser&&this.parser.parseOpen(f),!0}}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){if(this.parser)return this.parser.parseClose(f)||(this.parser=void 0),!0;switch(f){case"styleSheet":{this.model={};const w=(_,A)=>{A.model&&A.model.length&&(this.model[_]=A.model)};if(w("numFmts",this.map.numFmts),w("fonts",this.map.fonts),w("fills",this.map.fills),w("borders",this.map.borders),w("styles",this.map.cellXfs),w("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){const _=this.index.numFmt;this.model.numFmts.forEach(A=>{_[A.id]=A.formatCode})}return!1}default:return!0}}addStyleModel(f,w){if(!f)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(f))return this.weakMap.get(f);const _={};if(w=w||m.ValueType.Number,f.numFmt)_.numFmtId=this._addNumFmtStr(f.numFmt);else switch(w){case m.ValueType.Number:_.numFmtId=this._addNumFmtStr("General");break;case m.ValueType.Date:_.numFmtId=this._addNumFmtStr("mm-dd-yy")}f.font&&(_.fontId=this._addFont(f.font)),f.border&&(_.borderId=this._addBorder(f.border)),f.fill&&(_.fillId=this._addFill(f.fill)),f.alignment&&(_.alignment=f.alignment),f.protection&&(_.protection=f.protection);const A=this._addStyle(_);return this.weakMap&&this.weakMap.set(f,A),A}getStyleModel(f){const w=this.model.styles[f];if(!w)return null;let _=this.index.model[f];if(_)return _;if(_=this.index.model[f]={},w.numFmtId){const N=this.index.numFmt[w.numFmtId]||i.getDefaultFmtCode(w.numFmtId);N&&(_.numFmt=N)}function A(N,L,j){if(j||j===0){const P=L[j];P&&(_[N]=P)}}return A("font",this.model.fonts,w.fontId),A("border",this.model.borders,w.borderId),A("fill",this.model.fills,w.fillId),w.alignment&&(_.alignment=w.alignment),w.protection&&(_.protection=w.protection),_}addDxfStyle(f){return f.numFmt&&(f.numFmtId=this._addNumFmtStr(f.numFmt)),this.model.dxfs.push(f),this.model.dxfs.length-1}getDxfStyle(f){return this.model.dxfs[f]}_addStyle(f){const w=this.map.style.toXml(f);let _=this.index.style[w];return _===void 0&&(_=this.index.style[w]=this.model.styles.length,this.model.styles.push(w)),_}_addNumFmtStr(f){let w=i.getDefaultFmtId(f);if(w!==void 0||(w=this.index.numFmt[f],w!==void 0))return w;w=this.index.numFmt[f]=164+this.model.numFmts.length;const _=this.map.numFmt.toXml({id:w,formatCode:f});return this.model.numFmts.push(_),w}_addFont(f){const w=this.map.font.toXml(f);let _=this.index.font[w];return _===void 0&&(_=this.index.font[w]=this.model.fonts.length,this.model.fonts.push(w)),_}_addBorder(f){const w=this.map.border.toXml(f);let _=this.index.border[w];return _===void 0&&(_=this.index.border[w]=this.model.borders.length,this.model.borders.push(w)),_}_addFill(f){const w=this.map.fill.toXml(f);let _=this.index.fill[w];return _===void 0&&(_=this.index.fill[w]=this.model.fills.length,this.model.fills.push(w)),_}}u.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},u.STATIC_XFORMS={cellStyles:new r({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new r({tag:"dxfs",$:{count:0}}),tableStyles:new r({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new r({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})},u.Mock=class extends u{constructor(){super(),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]}}parseStream(d){return d.autodrain(),Promise.resolve()}addStyleModel(d,f){switch(f){case m.ValueType.Date:return this.dateStyleId;default:return 0}}get dateStyleId(){if(!this._dateStyleId){const d={numFmtId:i.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(d)}return this._dateStyleId}getStyleModel(){return{}}},T.exports=u},{"../../../doc/enums":7,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./border-xform":127,"./dxf-xform":129,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./style-xform":134}],136:[function(s,T,S){const m=s("../base-xform");class o extends m{constructor(r){super(),this.model=r}get tag(){return"u"}render(r,t){if((t=t||this.model)===!0)r.leafNode("u");else{const e=o.Attributes[t];e&&r.leafNode("u",e)}}parseOpen(r){r.name==="u"&&(this.model=r.attributes.val||!0)}parseText(){}parseClose(){return!1}}o.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},T.exports=o},{"../base-xform":32}],137:[function(s,T,S){const m=s("../base-xform"),o=s("./filter-column-xform");T.exports=class extends m{constructor(){super(),this.map={filterColumn:new o}}get tag(){return"autoFilter"}prepare(a){a.columns.forEach((r,t)=>{this.map.filterColumn.prepare(r,{index:t})})}render(a,r){return a.openNode(this.tag,{ref:r.autoFilterRef}),r.columns.forEach(t=>{this.map.filterColumn.render(a,t)}),a.closeNode(),!0}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:return this.model={autoFilterRef:a.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[a.name],this.parser)return this.parseOpen(a),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(a))}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;switch(a){case this.tag:return!1;default:throw new Error("Unexpected xml node in parseClose: "+a)}}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"customFilter"}render(o,a){o.leafNode(this.tag,{val:a.val,operator:a.operator})}parseOpen(o){return o.name===this.tag&&(this.model={val:o.attributes.val,operator:o.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],139:[function(s,T,S){const m=s("../base-xform"),o=s("../list-xform"),a=s("./custom-filter-xform"),r=s("./filter-xform");T.exports=class extends m{constructor(){super(),this.map={customFilters:new o({tag:"customFilters",count:!1,empty:!0,childXform:new a}),filters:new o({tag:"filters",count:!1,empty:!0,childXform:new r})}}get tag(){return"filterColumn"}prepare(t,e){t.colId=e.index.toString()}render(t,e){return e.customFilters?(t.openNode(this.tag,{colId:e.colId,hiddenButton:e.filterButton?"0":"1"}),this.map.customFilters.render(t,e.customFilters),t.closeNode(),!0):(t.leafNode(this.tag,{colId:e.colId,hiddenButton:e.filterButton?"0":"1"}),!0)}parseOpen(t){if(this.parser)return this.parser.parseOpen(t),!0;const{attributes:e}=t;switch(t.name){case this.tag:return this.model={filterButton:e.hiddenButton==="0"},!0;default:if(this.parser=this.map[t.name],this.parser)return this.parseOpen(t),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(t))}}parseText(){}parseClose(t){if(this.parser)return this.parser.parseClose(t)||(this.parser=void 0),!0;switch(t){case this.tag:return this.model.customFilters=this.map.customFilters.model,!1;default:return!0}}}},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"filter"}render(o,a){o.leafNode(this.tag,{val:a.val})}parseOpen(o){return o.name===this.tag&&(this.model={val:o.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],141:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"tableColumn"}prepare(o,a){o.id=a.index+1}render(o,a){return o.leafNode(this.tag,{id:a.id.toString(),name:a.name,totalsRowLabel:a.totalsRowLabel,totalsRowFunction:a.totalsRowFunction,dxfId:a.dxfId}),!0}parseOpen(o){if(o.name===this.tag){const{attributes:a}=o;return this.model={name:a.name,totalsRowLabel:a.totalsRowLabel,totalsRowFunction:a.totalsRowFunction,dxfId:a.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(s,T,S){const m=s("../base-xform");T.exports=class extends m{get tag(){return"tableStyleInfo"}render(o,a){return o.leafNode(this.tag,{name:a.theme?a.theme:void 0,showFirstColumn:a.showFirstColumn?"1":"0",showLastColumn:a.showLastColumn?"1":"0",showRowStripes:a.showRowStripes?"1":"0",showColumnStripes:a.showColumnStripes?"1":"0"}),!0}parseOpen(o){if(o.name===this.tag){const{attributes:a}=o;return this.model={theme:a.name?a.name:null,showFirstColumn:a.showFirstColumn==="1",showLastColumn:a.showLastColumn==="1",showRowStripes:a.showRowStripes==="1",showColumnStripes:a.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(s,T,S){const m=s("../../../utils/xml-stream"),o=s("../base-xform"),a=s("../list-xform"),r=s("./auto-filter-xform"),t=s("./table-column-xform"),e=s("./table-style-info-xform");class l extends o{constructor(){super(),this.map={autoFilter:new r,tableColumns:new a({tag:"tableColumns",count:!0,empty:!0,childXform:new t}),tableStyleInfo:new e}}prepare(i,c){this.map.autoFilter.prepare(i),this.map.tableColumns.prepare(i.columns,c)}get tag(){return"table"}render(i,c){i.openXml(m.StdDocAttributes),i.openNode(this.tag,{...l.TABLE_ATTRIBUTES,id:c.id,name:c.name,displayName:c.displayName||c.name,ref:c.tableRef,totalsRowCount:c.totalsRow?"1":void 0,totalsRowShown:c.totalsRow?void 0:"1",headerRowCount:c.headerRow?"1":"0"}),this.map.autoFilter.render(i,c),this.map.tableColumns.render(i,c.columns),this.map.tableStyleInfo.render(i,c.style),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;const{name:c,attributes:h}=i;switch(c){case this.tag:this.reset(),this.model={name:h.name,displayName:h.displayName||h.name,tableRef:h.ref,totalsRow:h.totalsRowCount==="1",headerRow:h.headerRowCount==="1"};break;default:this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i)}return!0}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.parser=void 0),!0;switch(i){case this.tag:return this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((c,h)=>{this.model.columns[h].filterButton=c.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1;default:return!0}}reconcile(i,c){i.columns.forEach(h=>{h.dxfId!==void 0&&(h.style=c.styles.getDxfStyle(h.dxfId))})}}l.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},T.exports=l},{"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":137,"./table-column-xform":141,"./table-style-info-xform":142}],144:[function(s,T,S){(function(m,o){(function(){const a=s("fs"),r=s("jszip"),{PassThrough:t}=s("readable-stream"),e=s("../utils/zip-stream"),l=s("../utils/stream-buf"),n=s("../utils/utils"),i=s("../utils/xml-stream"),{bufferToString:c}=s("../utils/browser-buffer-decode"),h=s("./xform/style/styles-xform"),u=s("./xform/core/core-xform"),d=s("./xform/strings/shared-strings-xform"),f=s("./xform/core/relationships-xform"),w=s("./xform/core/content-types-xform"),_=s("./xform/core/app-xform"),A=s("./xform/book/workbook-xform"),N=s("./xform/sheet/worksheet-xform"),L=s("./xform/drawing/drawing-xform"),j=s("./xform/table/table-xform"),P=s("./xform/comment/comments-xform"),D=s("./xform/comment/vml-notes-xform"),$=s("./xml/theme1");class B{constructor(M){this.workbook=M}async readFile(M,v){if(!await n.fs.exists(M))throw new Error("File not found: "+M);const p=a.createReadStream(M);try{const b=await this.read(p,v);return p.close(),b}catch(b){throw p.close(),b}}parseRels(M){return new f().parseStream(M)}parseWorkbook(M){return new A().parseStream(M)}parseSharedStrings(M){return new d().parseStream(M)}reconcile(M,v){const p=new A,b=new N(v),g=new L,y=new j;p.reconcile(M);const k={media:M.media,mediaIndex:M.mediaIndex};Object.keys(M.drawings).forEach(z=>{const U=M.drawings[z],q=M.drawingRels[z];q&&(k.rels=q.reduce((O,H)=>(O[H.Id]=H,O),{}),(U.anchors||[]).forEach(O=>{const H=O.picture&&O.picture.hyperlinks;H&&k.rels[H.rId]&&(H.hyperlink=k.rels[H.rId].Target,delete H.rId)}),g.reconcile(U,k))});const R={styles:M.styles};Object.values(M.tables).forEach(z=>{y.reconcile(z,R)});const I={styles:M.styles,sharedStrings:M.sharedStrings,media:M.media,mediaIndex:M.mediaIndex,date1904:M.properties&&M.properties.date1904,drawings:M.drawings,comments:M.comments,tables:M.tables,vmlDrawings:M.vmlDrawings};M.worksheets.forEach(z=>{z.relationships=M.worksheetRels[z.sheetNo],b.reconcile(z,I)}),delete M.worksheetHash,delete M.worksheetRels,delete M.globalRels,delete M.sharedStrings,delete M.workbookRels,delete M.sheetDefs,delete M.styles,delete M.mediaIndex,delete M.drawings,delete M.drawingRels,delete M.vmlDrawings}async _processWorksheetEntry(M,v,p,b,g){const y=new N(b),k=await y.parseStream(M);k.sheetNo=p,v.worksheetHash[g]=k,v.worksheets.push(k)}async _processCommentEntry(M,v,p){const b=new P,g=await b.parseStream(M);v.comments[`../${p}.xml`]=g}async _processTableEntry(M,v,p){const b=new j,g=await b.parseStream(M);v.tables[`../tables/${p}.xml`]=g}async _processWorksheetRelsEntry(M,v,p){const b=new f,g=await b.parseStream(M);v.worksheetRels[p]=g}async _processMediaEntry(M,v,p){const b=p.lastIndexOf(".");if(b>=1){const g=p.substr(b+1),y=p.substr(0,b);await new Promise((k,R)=>{const I=new l;I.on("finish",()=>{v.mediaIndex[p]=v.media.length,v.mediaIndex[y]=v.media.length;const z={type:"image",name:y,extension:g,buffer:I.toBuffer()};v.media.push(z),k()}),M.on("error",z=>{R(z)}),M.pipe(I)})}}async _processDrawingEntry(M,v,p){const b=new L,g=await b.parseStream(M);v.drawings[p]=g}async _processDrawingRelsEntry(M,v,p){const b=new f,g=await b.parseStream(M);v.drawingRels[p]=g}async _processVmlDrawingEntry(M,v,p){const b=new D,g=await b.parseStream(M);v.vmlDrawings[`../drawings/${p}.vml`]=g}async _processThemeEntry(M,v,p){await new Promise((b,g)=>{const y=new l;M.on("error",g),y.on("error",g),y.on("finish",()=>{v.themes[p]=y.read().toString(),b()}),M.pipe(y)})}createInputStream(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}async read(M,v){!M[Symbol.asyncIterator]&&M.pipe&&(M=M.pipe(new t));const p=[];for await(const b of M)p.push(b);return this.load(o.concat(p),v)}async load(M,v){let p;p=v&&v.base64?o.from(M.toString(),"base64"):M;const b={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},g=await r.loadAsync(p);for(const y of Object.values(g.files))if(!y.dir){let k,R=y.name;if(R[0]==="/"&&(R=R.substr(1)),R.match(/xl\/media\//)||R.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))k=new t,k.write(await y.async("nodebuffer"));else{let I;k=new t({writableObjectMode:!0,readableObjectMode:!0}),I=m.browser?c(await y.async("nodebuffer")):await y.async("string");const z=16384;for(let U=0;U{if(p.type==="image"){const b=`xl/media/${p.name}.${p.extension}`;if(p.filename){const g=await function(y,k){return new Promise((R,I)=>{a.readFile(y,k,(z,U)=>{z?I(z):R(U)})})}(p.filename);return M.append(g,{name:b})}if(p.buffer)return M.append(p.buffer,{name:b});if(p.base64){const g=p.base64,y=g.substring(g.indexOf(",")+1);return M.append(y,{name:b,base64:!0})}}throw new Error("Unsupported media")}))}addDrawings(M,v){const p=new L,b=new f;v.worksheets.forEach(g=>{const{drawing:y}=g;if(y){p.prepare(y,{});let k=p.toXml(y);M.append(k,{name:`xl/drawings/${y.name}.xml`}),k=b.toXml(y.rels),M.append(k,{name:`xl/drawings/_rels/${y.name}.xml.rels`})}})}addTables(M,v){const p=new j;v.worksheets.forEach(b=>{const{tables:g}=b;g.forEach(y=>{p.prepare(y,{});const k=p.toXml(y);M.append(k,{name:"xl/tables/"+y.target})})})}async addContentTypes(M,v){const p=new w().toXml(v);M.append(p,{name:"[Content_Types].xml"})}async addApp(M,v){const p=new _().toXml(v);M.append(p,{name:"docProps/app.xml"})}async addCore(M,v){const p=new u;M.append(p.toXml(v),{name:"docProps/core.xml"})}async addThemes(M,v){const p=v.themes||{theme1:$};Object.keys(p).forEach(b=>{const g=p[b],y=`xl/theme/${b}.xml`;M.append(g,{name:y})})}async addOfficeRels(M){const v=new f().toXml([{Id:"rId1",Type:B.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:B.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:B.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);M.append(v,{name:"_rels/.rels"})}async addWorkbookRels(M,v){let p=1;const b=[{Id:"rId"+p++,Type:B.RelType.Styles,Target:"styles.xml"},{Id:"rId"+p++,Type:B.RelType.Theme,Target:"theme/theme1.xml"}];v.sharedStrings.count&&b.push({Id:"rId"+p++,Type:B.RelType.SharedStrings,Target:"sharedStrings.xml"}),v.worksheets.forEach(y=>{y.rId="rId"+p++,b.push({Id:y.rId,Type:B.RelType.Worksheet,Target:`worksheets/sheet${y.id}.xml`})});const g=new f().toXml(b);M.append(g,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(M,v){v.sharedStrings&&v.sharedStrings.count&&M.append(v.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(M,v){const{xml:p}=v.styles;p&&M.append(p,{name:"xl/styles.xml"})}async addWorkbook(M,v){const p=new A;M.append(p.toXml(v),{name:"xl/workbook.xml"})}async addWorksheets(M,v){const p=new N,b=new f,g=new P,y=new D;v.worksheets.forEach(k=>{let R=new i;p.render(R,k),M.append(R.xml,{name:`xl/worksheets/sheet${k.id}.xml`}),k.rels&&k.rels.length&&(R=new i,b.render(R,k.rels),M.append(R.xml,{name:`xl/worksheets/_rels/sheet${k.id}.xml.rels`})),k.comments.length>0&&(R=new i,g.render(R,k),M.append(R.xml,{name:`xl/comments${k.id}.xml`}),R=new i,y.render(R,k),M.append(R.xml,{name:`xl/drawings/vmlDrawing${k.id}.vml`}))})}_finalize(M){return new Promise((v,p)=>{M.on("finish",()=>{v(this)}),M.on("error",p),M.finalize()})}prepareModel(M,v){M.creator=M.creator||"ExcelJS",M.lastModifiedBy=M.lastModifiedBy||"ExcelJS",M.created=M.created||new Date,M.modified=M.modified||new Date,M.useSharedStrings=v.useSharedStrings===void 0||v.useSharedStrings,M.useStyles=v.useStyles===void 0||v.useStyles,M.sharedStrings=new d,M.styles=M.useStyles?new h(!0):new h.Mock;const p=new A,b=new N;p.prepare(M);const g={sharedStrings:M.sharedStrings,styles:M.styles,date1904:M.properties.date1904,drawingsCount:0,media:M.media};g.drawings=M.drawings=[],g.commentRefs=M.commentRefs=[];let y=0;M.tables=[],M.worksheets.forEach(k=>{k.tables.forEach(R=>{y++,R.target=`table${y}.xml`,R.id=y,M.tables.push(R)}),b.prepare(k,g)})}async write(M,v){v=v||{};const{model:p}=this.workbook,b=new e.ZipWriter(v.zip);return b.pipe(M),this.prepareModel(p,v),await this.addContentTypes(b,p),await this.addOfficeRels(b,p),await this.addWorkbookRels(b,p),await this.addWorksheets(b,p),await this.addSharedStrings(b,p),await this.addDrawings(b,p),await this.addTables(b,p),await Promise.all([this.addThemes(b,p),this.addStyles(b,p)]),await this.addMedia(b,p),await Promise.all([this.addApp(b,p),this.addCore(b,p)]),await this.addWorkbook(b,p),this._finalize(b)}writeFile(M,v){const p=a.createWriteStream(M);return new Promise((b,g)=>{p.on("finish",()=>{b()}),p.on("error",y=>{g(y)}),this.write(p,v).then(()=>{p.end()}).catch(y=>{g(y)})})}async writeBuffer(M){const v=new l;return await this.write(v,M),v.read()}}B.RelType=s("./rel-type"),T.exports=B}).call(this)}).call(this,s("_process"),s("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":24,"../utils/utils":27,"../utils/xml-stream":28,"../utils/zip-stream":29,"./rel-type":31,"./xform/book/workbook-xform":38,"./xform/comment/comments-xform":40,"./xform/comment/vml-notes-xform":45,"./xform/core/app-xform":51,"./xform/core/content-types-xform":52,"./xform/core/core-xform":53,"./xform/core/relationships-xform":55,"./xform/drawing/drawing-xform":62,"./xform/sheet/worksheet-xform":115,"./xform/strings/shared-strings-xform":124,"./xform/style/styles-xform":135,"./xform/table/table-xform":143,"./xml/theme1":145,_process:467,buffer:220,fs:216,jszip:441,"readable-stream":491}],145:[function(s,T,S){T.exports=` `},{}],146:[function(s,T,S){(function(m){(function(){Object.defineProperty(S,"__esModule",{value:!0}),S.CsvFormatterStream=void 0;const o=s("stream"),a=s("./formatter");class r extends o.Transform{constructor(e){super({writableObjectMode:e.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=e,this.rowFormatter=new a.RowFormatter(e),this.hasWrittenBOM=!e.writeBOM}transform(e){return this.rowFormatter.rowTransform=e,this}_transform(e,l,n){let i=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(e,(c,h)=>c?(i=!0,n(c)):(h&&h.forEach(u=>{this.push(m.from(u,"utf8"))}),i=!0,n()))}catch(c){if(i)throw c;n(c)}}_flush(e){this.rowFormatter.finish((l,n)=>l?e(l):(n&&n.forEach(i=>{this.push(m.from(i,"utf8"))}),e()))}}S.CsvFormatterStream=r}).call(this)}).call(this,s("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(s,T,S){Object.defineProperty(S,"__esModule",{value:!0}),S.FormatterOptions=void 0,S.FormatterOptions=class{constructor(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var o;this.objectMode=!0,this.delimiter=",",this.rowDelimiter=` `,this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\uFEFF",this.alwaysWriteHeaders=!1,Object.assign(this,m||{}),(m==null?void 0:m.quoteHeaders)===void 0&&(this.quoteHeaders=this.quoteColumns),(m==null?void 0:m.quote)===!0?this.quote='"':(m==null?void 0:m.quote)===!1&&(this.quote=""),typeof(m==null?void 0:m.escape)!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((o=m.writeHeaders)===null||o===void 0||o),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(s,T,S){var m=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(S,"__esModule",{value:!0}),S.FieldFormatter=void 0;const o=m(s("lodash.isboolean")),a=m(s("lodash.isnil")),r=m(s("lodash.escaperegexp"));S.FieldFormatter=class{constructor(t){this._headers=null,this.formatterOptions=t,t.headers!==null&&(this.headers=t.headers),this.REPLACE_REGEXP=new RegExp(t.quote,"g");const e=`[${t.delimiter}${r.default(t.rowDelimiter)}|\r| diff --git a/admin-views/dist/assets/exceljs.min-Boo_2_59.js.gz b/admin-views/dist/assets/exceljs.min-BhWLMZIL.js.gz similarity index 99% rename from admin-views/dist/assets/exceljs.min-Boo_2_59.js.gz rename to admin-views/dist/assets/exceljs.min-BhWLMZIL.js.gz index c411c2dc..2d199749 100644 Binary files a/admin-views/dist/assets/exceljs.min-Boo_2_59.js.gz and b/admin-views/dist/assets/exceljs.min-BhWLMZIL.js.gz differ diff --git a/admin-views/dist/assets/fa-brands-400-B0G11Utd.woff2 b/admin-views/dist/assets/fa-brands-400-B0G11Utd.woff2 deleted file mode 100644 index 8a480d9b..00000000 Binary files a/admin-views/dist/assets/fa-brands-400-B0G11Utd.woff2 and /dev/null differ diff --git a/admin-views/dist/assets/fa-brands-400-C99Yv4gD.woff2 b/admin-views/dist/assets/fa-brands-400-C99Yv4gD.woff2 new file mode 100644 index 00000000..36fbda7d Binary files /dev/null and b/admin-views/dist/assets/fa-brands-400-C99Yv4gD.woff2 differ diff --git a/admin-views/dist/assets/fa-brands-400-Dh9Nz-AR.ttf b/admin-views/dist/assets/fa-brands-400-Dh9Nz-AR.ttf deleted file mode 100644 index 30f55b74..00000000 Binary files a/admin-views/dist/assets/fa-brands-400-Dh9Nz-AR.ttf and /dev/null differ diff --git a/admin-views/dist/assets/fa-brands-400-DtZKBM2a.ttf b/admin-views/dist/assets/fa-brands-400-DtZKBM2a.ttf new file mode 100644 index 00000000..5efb1d4f Binary files /dev/null and b/admin-views/dist/assets/fa-brands-400-DtZKBM2a.ttf differ diff --git a/admin-views/dist/assets/fa-regular-400-B0w-yroU.woff2 b/admin-views/dist/assets/fa-regular-400-B0w-yroU.woff2 deleted file mode 100644 index 059a94e2..00000000 Binary files a/admin-views/dist/assets/fa-regular-400-B0w-yroU.woff2 and /dev/null differ diff --git a/admin-views/dist/assets/fa-regular-400-BHXLjBeH.ttf b/admin-views/dist/assets/fa-regular-400-BHXLjBeH.ttf deleted file mode 100644 index c79589d8..00000000 Binary files a/admin-views/dist/assets/fa-regular-400-BHXLjBeH.ttf and /dev/null differ diff --git a/admin-views/dist/assets/fa-regular-400-BMFokQJ2.ttf b/admin-views/dist/assets/fa-regular-400-BMFokQJ2.ttf new file mode 100644 index 00000000..838b4e2c Binary files /dev/null and b/admin-views/dist/assets/fa-regular-400-BMFokQJ2.ttf differ diff --git a/admin-views/dist/assets/fa-regular-400-OOsPf1xj.woff2 b/admin-views/dist/assets/fa-regular-400-OOsPf1xj.woff2 new file mode 100644 index 00000000..b6cabbac Binary files /dev/null and b/admin-views/dist/assets/fa-regular-400-OOsPf1xj.woff2 differ diff --git a/admin-views/dist/assets/fa-solid-900-BLLQy4Ml.ttf b/admin-views/dist/assets/fa-solid-900-BLLQy4Ml.ttf deleted file mode 100644 index e479fb29..00000000 Binary files a/admin-views/dist/assets/fa-solid-900-BLLQy4Ml.ttf and /dev/null differ diff --git a/admin-views/dist/assets/fa-solid-900-DAI24fNt.woff2 b/admin-views/dist/assets/fa-solid-900-DAI24fNt.woff2 new file mode 100644 index 00000000..824d518e Binary files /dev/null and b/admin-views/dist/assets/fa-solid-900-DAI24fNt.woff2 differ diff --git a/admin-views/dist/assets/fa-solid-900-DM0teJdg.ttf b/admin-views/dist/assets/fa-solid-900-DM0teJdg.ttf new file mode 100644 index 00000000..ec24749d Binary files /dev/null and b/admin-views/dist/assets/fa-solid-900-DM0teJdg.ttf differ diff --git a/admin-views/dist/assets/fa-solid-900-DPO7AZHW.woff2 b/admin-views/dist/assets/fa-solid-900-DPO7AZHW.woff2 deleted file mode 100644 index 88b0367a..00000000 Binary files a/admin-views/dist/assets/fa-solid-900-DPO7AZHW.woff2 and /dev/null differ diff --git a/admin-views/dist/assets/fa-v4compatibility-CzA-yRXe.ttf b/admin-views/dist/assets/fa-v4compatibility-CzA-yRXe.ttf deleted file mode 100644 index ba6cb258..00000000 Binary files a/admin-views/dist/assets/fa-v4compatibility-CzA-yRXe.ttf and /dev/null differ diff --git a/admin-views/dist/assets/fa-v4compatibility-F0dlVTLQ.ttf b/admin-views/dist/assets/fa-v4compatibility-F0dlVTLQ.ttf new file mode 100644 index 00000000..b175aa8e Binary files /dev/null and b/admin-views/dist/assets/fa-v4compatibility-F0dlVTLQ.ttf differ diff --git a/admin-views/dist/assets/fa-v4compatibility-QamTF9-e.woff2 b/admin-views/dist/assets/fa-v4compatibility-QamTF9-e.woff2 deleted file mode 100644 index 23b1c47b..00000000 Binary files a/admin-views/dist/assets/fa-v4compatibility-QamTF9-e.woff2 and /dev/null differ diff --git a/admin-views/dist/assets/fa-v4compatibility-aR9vOKaP.woff2 b/admin-views/dist/assets/fa-v4compatibility-aR9vOKaP.woff2 new file mode 100644 index 00000000..e09b5a55 Binary files /dev/null and b/admin-views/dist/assets/fa-v4compatibility-aR9vOKaP.woff2 differ diff --git a/admin-views/dist/assets/handlebars-5MWJYwBX.js.gz b/admin-views/dist/assets/handlebars-5MWJYwBX.js.gz deleted file mode 100644 index 839feaa3..00000000 Binary files a/admin-views/dist/assets/handlebars-5MWJYwBX.js.gz and /dev/null differ diff --git a/admin-views/dist/assets/handlebars-5MWJYwBX.js b/admin-views/dist/assets/handlebars-C1nVRnNW.js similarity index 97% rename from admin-views/dist/assets/handlebars-5MWJYwBX.js rename to admin-views/dist/assets/handlebars-C1nVRnNW.js index 5be1756c..a9c2ac5b 100644 --- a/admin-views/dist/assets/handlebars-5MWJYwBX.js +++ b/admin-views/dist/assets/handlebars-C1nVRnNW.js @@ -1 +1 @@ -import{l as e}from"./editor.main-x561mIg5.js";import"./index-B4ouchdD.js";var t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+t.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+t.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},m={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{r as conf,m as language}; +import{l as e}from"./editor.main-CrWz42xi.js";import"./index-5zY5TMAp.js";var t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+t.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+t.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},m={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{r as conf,m as language}; diff --git a/admin-views/dist/assets/handlebars-C1nVRnNW.js.gz b/admin-views/dist/assets/handlebars-C1nVRnNW.js.gz new file mode 100644 index 00000000..ad66d2b4 Binary files /dev/null and b/admin-views/dist/assets/handlebars-C1nVRnNW.js.gz differ diff --git a/admin-views/dist/assets/hls-DuCOHYXm.js b/admin-views/dist/assets/hls-D7ZGhwIJ.js similarity index 99% rename from admin-views/dist/assets/hls-DuCOHYXm.js rename to admin-views/dist/assets/hls-D7ZGhwIJ.js index dbbcdb0e..8f08938d 100644 --- a/admin-views/dist/assets/hls-DuCOHYXm.js +++ b/admin-views/dist/assets/hls-D7ZGhwIJ.js @@ -1,4 +1,4 @@ -import{p as wt,q as Wt}from"./index-B4ouchdD.js";function Gt(Lt,Ot){for(var W=0;WM[y]})}}}return Object.freeze(Object.defineProperty(Lt,Symbol.toStringTag,{value:"Module"}))}var Mt={exports:{}};(function(Lt,Ot){typeof window<"u"&&function(M,y){Lt.exports=y()}(Wt,function(){return function(W){var M={};function y(C){if(M[C])return M[C].exports;var D=M[C]={i:C,l:!1,exports:{}};return W[C].call(D.exports,D,D.exports,y),D.l=!0,D.exports}return y.m=W,y.c=M,y.d=function(C,D,A){y.o(C,D)||Object.defineProperty(C,D,{enumerable:!0,get:A})},y.r=function(C){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(C,"__esModule",{value:!0})},y.t=function(C,D){if(D&1&&(C=y(C)),D&8||D&4&&typeof C=="object"&&C&&C.__esModule)return C;var A=Object.create(null);if(y.r(A),Object.defineProperty(A,"default",{enumerable:!0,value:C}),D&2&&typeof C!="string")for(var b in C)y.d(A,b,(function(I){return C[I]}).bind(null,b));return A},y.n=function(C){var D=C&&C.__esModule?function(){return C.default}:function(){return C};return y.d(D,"a",D),D},y.o=function(C,D){return Object.prototype.hasOwnProperty.call(C,D)},y.p="/dist/",y(y.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(W,M,y){var C=Object.prototype.hasOwnProperty,D="~";function A(){}Object.create&&(A.prototype=Object.create(null),new A().__proto__||(D=!1));function b(m,S,p){this.fn=m,this.context=S,this.once=p||!1}function I(m,S,p,T,E){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new b(p,T||m,E),n=D?D+S:S;return m._events[n]?m._events[n].fn?m._events[n]=[m._events[n],v]:m._events[n].push(v):(m._events[n]=v,m._eventsCount++),m}function O(m,S){--m._eventsCount===0?m._events=new A:delete m._events[S]}function L(){this._events=new A,this._eventsCount=0}L.prototype.eventNames=function(){var S=[],p,T;if(this._eventsCount===0)return S;for(T in p=this._events)C.call(p,T)&&S.push(D?T.slice(1):T);return Object.getOwnPropertySymbols?S.concat(Object.getOwnPropertySymbols(p)):S},L.prototype.listeners=function(S){var p=D?D+S:S,T=this._events[p];if(!T)return[];if(T.fn)return[T.fn];for(var E=0,v=T.length,n=new Array(v);E0},!1)}function m(S,p){for(var T={main:[p]},E={main:[]},v={main:{}};L(T);)for(var n=Object.keys(T),t=0;tM[y]})}}}return Object.freeze(Object.defineProperty(Lt,Symbol.toStringTag,{value:"Module"}))}var Mt={exports:{}};(function(Lt,Ot){typeof window<"u"&&function(M,y){Lt.exports=y()}(Wt,function(){return function(W){var M={};function y(C){if(M[C])return M[C].exports;var D=M[C]={i:C,l:!1,exports:{}};return W[C].call(D.exports,D,D.exports,y),D.l=!0,D.exports}return y.m=W,y.c=M,y.d=function(C,D,A){y.o(C,D)||Object.defineProperty(C,D,{enumerable:!0,get:A})},y.r=function(C){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(C,"__esModule",{value:!0})},y.t=function(C,D){if(D&1&&(C=y(C)),D&8||D&4&&typeof C=="object"&&C&&C.__esModule)return C;var A=Object.create(null);if(y.r(A),Object.defineProperty(A,"default",{enumerable:!0,value:C}),D&2&&typeof C!="string")for(var b in C)y.d(A,b,(function(I){return C[I]}).bind(null,b));return A},y.n=function(C){var D=C&&C.__esModule?function(){return C.default}:function(){return C};return y.d(D,"a",D),D},y.o=function(C,D){return Object.prototype.hasOwnProperty.call(C,D)},y.p="/dist/",y(y.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(W,M,y){var C=Object.prototype.hasOwnProperty,D="~";function A(){}Object.create&&(A.prototype=Object.create(null),new A().__proto__||(D=!1));function b(m,S,p){this.fn=m,this.context=S,this.once=p||!1}function I(m,S,p,T,E){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new b(p,T||m,E),n=D?D+S:S;return m._events[n]?m._events[n].fn?m._events[n]=[m._events[n],v]:m._events[n].push(v):(m._events[n]=v,m._eventsCount++),m}function O(m,S){--m._eventsCount===0?m._events=new A:delete m._events[S]}function L(){this._events=new A,this._eventsCount=0}L.prototype.eventNames=function(){var S=[],p,T;if(this._eventsCount===0)return S;for(T in p=this._events)C.call(p,T)&&S.push(D?T.slice(1):T);return Object.getOwnPropertySymbols?S.concat(Object.getOwnPropertySymbols(p)):S},L.prototype.listeners=function(S){var p=D?D+S:S,T=this._events[p];if(!T)return[];if(T.fn)return[T.fn];for(var E=0,v=T.length,n=new Array(v);E0},!1)}function m(S,p){for(var T={main:[p]},E={main:[]},v={main:{}};L(T);)for(var n=Object.keys(T),t=0;t=2*o/h||x<=P)){var _=Number.POSITIVE_INFINITY,F;for(F=n.level-1;F>a;F--){var B=u[F].maxBitrate;if(_=o*B/(8*.8*g),_=x)){var U=this.bwEstimator.getEstimate();L.logger.warn("Fragment "+n.sn+(t?" part "+t.index:"")+" of level "+n.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+F+` Current BW estimate: `+(Object(C.isFiniteNumber)(U)?(U/1024).toFixed(3):"Unknown")+` Kb/s Estimated load time for current fragment: `+x.toFixed(3)+` s diff --git a/admin-views/dist/assets/hls-D7ZGhwIJ.js.gz b/admin-views/dist/assets/hls-D7ZGhwIJ.js.gz new file mode 100644 index 00000000..fbcb3424 Binary files /dev/null and b/admin-views/dist/assets/hls-D7ZGhwIJ.js.gz differ diff --git a/admin-views/dist/assets/hls-DuCOHYXm.js.gz b/admin-views/dist/assets/hls-DuCOHYXm.js.gz deleted file mode 100644 index 265b0451..00000000 Binary files a/admin-views/dist/assets/hls-DuCOHYXm.js.gz and /dev/null differ diff --git a/admin-views/dist/assets/html-xJfJX0-n.js b/admin-views/dist/assets/html-D-6iRZaq.js similarity index 97% rename from admin-views/dist/assets/html-xJfJX0-n.js rename to admin-views/dist/assets/html-D-6iRZaq.js index 8657ae9c..c73ae7a6 100644 --- a/admin-views/dist/assets/html-xJfJX0-n.js +++ b/admin-views/dist/assets/html-D-6iRZaq.js @@ -1 +1 @@ -import{l as e}from"./editor.main-x561mIg5.js";import"./index-B4ouchdD.js";var t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+t.join("|")+"))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+t.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},o={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{r as conf,o as language}; +import{l as e}from"./editor.main-CrWz42xi.js";import"./index-5zY5TMAp.js";var t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+t.join("|")+"))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+t.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},o={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{r as conf,o as language}; diff --git a/admin-views/dist/assets/html-D-6iRZaq.js.gz b/admin-views/dist/assets/html-D-6iRZaq.js.gz new file mode 100644 index 00000000..cd4791d4 Binary files /dev/null and b/admin-views/dist/assets/html-D-6iRZaq.js.gz differ diff --git a/admin-views/dist/assets/html-xJfJX0-n.js.gz b/admin-views/dist/assets/html-xJfJX0-n.js.gz deleted file mode 100644 index c2590734..00000000 Binary files a/admin-views/dist/assets/html-xJfJX0-n.js.gz and /dev/null differ diff --git a/admin-views/dist/assets/htmlMode-DoczOHPa.js.gz b/admin-views/dist/assets/htmlMode-DoczOHPa.js.gz deleted file mode 100644 index 71c1aaea..00000000 Binary files a/admin-views/dist/assets/htmlMode-DoczOHPa.js.gz and /dev/null differ diff --git a/admin-views/dist/assets/htmlMode-DoczOHPa.js b/admin-views/dist/assets/htmlMode-xuNzmemc.js similarity index 99% rename from admin-views/dist/assets/htmlMode-DoczOHPa.js rename to admin-views/dist/assets/htmlMode-xuNzmemc.js index fcdadaeb..7e94a53a 100644 --- a/admin-views/dist/assets/htmlMode-DoczOHPa.js +++ b/admin-views/dist/assets/htmlMode-xuNzmemc.js @@ -1,4 +1,4 @@ -import{e as Oe,R as Pe,l as f,U as Xe}from"./editor.main-x561mIg5.js";import"./index-B4ouchdD.js";var $e=2*60*1e3,Fe=function(){function n(r){var i=this;this._defaults=r,this._worker=null,this._idleCheckInterval=window.setInterval(function(){return i._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return i._stopWorker()})}return n.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},n.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},n.prototype._checkIfIdle=function(){if(this._worker){var r=Date.now()-this._lastUsedTime;r>$e&&this._stopWorker()}},n.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=Oe.createWebWorker({moduleId:"vs/language/html/htmlWorker",createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client},n.prototype.getLanguageServiceWorker=function(){for(var r=this,i=[],t=0;t0&&(s.arguments=a),s}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.title)&&o.string(e.command)}n.is=i})(P||(P={}));var x;(function(n){function r(a,u){return{range:a,newText:u}}n.replace=r;function i(a,u){return{range:{start:a,end:a},newText:u}}n.insert=i;function t(a){return{range:a,newText:""}}n.del=t;function e(a){var u=a;return o.objectLiteral(u)&&o.string(u.newText)&&m.is(u.range)}n.is=e})(x||(x={}));var C;(function(n){function r(t,e,a){var u={label:t};return e!==void 0&&(u.needsConfirmation=e),a!==void 0&&(u.description=a),u}n.create=r;function i(t){var e=t;return e!==void 0&&o.objectLiteral(e)&&o.string(e.label)&&(o.boolean(e.needsConfirmation)||e.needsConfirmation===void 0)&&(o.string(e.description)||e.description===void 0)}n.is=i})(C||(C={}));var w;(function(n){function r(i){var t=i;return typeof t=="string"}n.is=r})(w||(w={}));var E;(function(n){function r(a,u,s){return{range:a,newText:u,annotationId:s}}n.replace=r;function i(a,u,s){return{range:{start:a,end:a},newText:u,annotationId:s}}n.insert=i;function t(a,u){return{range:a,newText:"",annotationId:u}}n.del=t;function e(a){var u=a;return x.is(u)&&(C.is(u.annotationId)||w.is(u.annotationId))}n.is=e})(E||(E={}));var N;(function(n){function r(t,e){return{textDocument:t,edits:e}}n.create=r;function i(t){var e=t;return o.defined(e)&&U.is(e.textDocument)&&Array.isArray(e.edits)}n.is=i})(N||(N={}));var F;(function(n){function r(t,e,a){var u={kind:"create",uri:t};return e!==void 0&&(e.overwrite!==void 0||e.ignoreIfExists!==void 0)&&(u.options=e),a!==void 0&&(u.annotationId=a),u}n.create=r;function i(t){var e=t;return e&&e.kind==="create"&&o.string(e.uri)&&(e.options===void 0||(e.options.overwrite===void 0||o.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||o.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||w.is(e.annotationId))}n.is=i})(F||(F={}));var T;(function(n){function r(t,e,a,u){var s={kind:"rename",oldUri:t,newUri:e};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(s.options=a),u!==void 0&&(s.annotationId=u),s}n.create=r;function i(t){var e=t;return e&&e.kind==="rename"&&o.string(e.oldUri)&&o.string(e.newUri)&&(e.options===void 0||(e.options.overwrite===void 0||o.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||o.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||w.is(e.annotationId))}n.is=i})(T||(T={}));var D;(function(n){function r(t,e,a){var u={kind:"delete",uri:t};return e!==void 0&&(e.recursive!==void 0||e.ignoreIfNotExists!==void 0)&&(u.options=e),a!==void 0&&(u.annotationId=a),u}n.create=r;function i(t){var e=t;return e&&e.kind==="delete"&&o.string(e.uri)&&(e.options===void 0||(e.options.recursive===void 0||o.boolean(e.options.recursive))&&(e.options.ignoreIfNotExists===void 0||o.boolean(e.options.ignoreIfNotExists)))&&(e.annotationId===void 0||w.is(e.annotationId))}n.is=i})(D||(D={}));var X;(function(n){function r(i){var t=i;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(function(e){return o.string(e.kind)?F.is(e)||T.is(e)||D.is(e):N.is(e)}))}n.is=r})(X||(X={}));var M=function(){function n(r,i){this.edits=r,this.changeAnnotations=i}return n.prototype.insert=function(r,i,t){var e,a;if(t===void 0?e=x.insert(r,i):w.is(t)?(a=t,e=E.insert(r,i,t)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(t),e=E.insert(r,i,a)),this.edits.push(e),a!==void 0)return a},n.prototype.replace=function(r,i,t){var e,a;if(t===void 0?e=x.replace(r,i):w.is(t)?(a=t,e=E.replace(r,i,t)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(t),e=E.replace(r,i,a)),this.edits.push(e),a!==void 0)return a},n.prototype.delete=function(r,i){var t,e;if(i===void 0?t=x.del(r):w.is(i)?(e=i,t=E.del(r,i)):(this.assertChangeAnnotations(this.changeAnnotations),e=this.changeAnnotations.manage(i),t=E.del(r,e)),this.edits.push(t),e!==void 0)return e},n.prototype.add=function(r){this.edits.push(r)},n.prototype.all=function(){return this.edits},n.prototype.clear=function(){this.edits.splice(0,this.edits.length)},n.prototype.assertChangeAnnotations=function(r){if(r===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},n}(),re=function(){function n(r){this._annotations=r===void 0?Object.create(null):r,this._counter=0,this._size=0}return n.prototype.all=function(){return this._annotations},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),n.prototype.manage=function(r,i){var t;if(w.is(r)?t=r:(t=this.nextId(),i=r),this._annotations[t]!==void 0)throw new Error("Id "+t+" is already in use.");if(i===void 0)throw new Error("No annotation provided for id "+t);return this._annotations[t]=i,this._size++,t},n.prototype.nextId=function(){return this._counter++,this._counter.toString()},n}();(function(){function n(r){var i=this;this._textEditChanges=Object.create(null),r!==void 0?(this._workspaceEdit=r,r.documentChanges?(this._changeAnnotations=new re(r.changeAnnotations),r.changeAnnotations=this._changeAnnotations.all(),r.documentChanges.forEach(function(t){if(N.is(t)){var e=new M(t.edits,i._changeAnnotations);i._textEditChanges[t.textDocument.uri]=e}})):r.changes&&Object.keys(r.changes).forEach(function(t){var e=new M(r.changes[t]);i._textEditChanges[t]=e})):this._workspaceEdit={}}return Object.defineProperty(n.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),n.prototype.getTextEditChange=function(r){if(U.is(r)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:r.uri,version:r.version},t=this._textEditChanges[i.uri];if(!t){var e=[],a={textDocument:i,edits:e};this._workspaceEdit.documentChanges.push(a),t=new M(e,this._changeAnnotations),this._textEditChanges[i.uri]=t}return t}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var t=this._textEditChanges[r];if(!t){var e=[];this._workspaceEdit.changes[r]=e,t=new M(e),this._textEditChanges[r]=t}return t}},n.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new re,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},n.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},n.prototype.createFile=function(r,i,t){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;C.is(i)||w.is(i)?e=i:t=i;var a,u;if(e===void 0?a=F.create(r,t):(u=w.is(e)?e:this._changeAnnotations.manage(e),a=F.create(r,t,u)),this._workspaceEdit.documentChanges.push(a),u!==void 0)return u},n.prototype.renameFile=function(r,i,t,e){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;C.is(t)||w.is(t)?a=t:e=t;var u,s;if(a===void 0?u=T.create(r,i,e):(s=w.is(a)?a:this._changeAnnotations.manage(a),u=T.create(r,i,e,s)),this._workspaceEdit.documentChanges.push(u),s!==void 0)return s},n.prototype.deleteFile=function(r,i,t){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;C.is(i)||w.is(i)?e=i:t=i;var a,u;if(e===void 0?a=D.create(r,t):(u=w.is(e)?e:this._changeAnnotations.manage(e),a=D.create(r,t,u)),this._workspaceEdit.documentChanges.push(a),u!==void 0)return u},n})();var ie;(function(n){function r(t){return{uri:t}}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.uri)}n.is=i})(ie||(ie={}));var ae;(function(n){function r(t,e){return{uri:t,version:e}}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.uri)&&o.integer(e.version)}n.is=i})(ae||(ae={}));var U;(function(n){function r(t,e){return{uri:t,version:e}}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.uri)&&(e.version===null||o.integer(e.version))}n.is=i})(U||(U={}));var ue;(function(n){function r(t,e,a,u){return{uri:t,languageId:e,version:a,text:u}}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.uri)&&o.string(e.languageId)&&o.integer(e.version)&&o.string(e.text)}n.is=i})(ue||(ue={}));var S;(function(n){n.PlainText="plaintext",n.Markdown="markdown"})(S||(S={}));(function(n){function r(i){var t=i;return t===n.PlainText||t===n.Markdown}n.is=r})(S||(S={}));var $;(function(n){function r(i){var t=i;return o.objectLiteral(i)&&S.is(t.kind)&&o.string(t.value)}n.is=r})($||($={}));var h;(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(h||(h={}));var B;(function(n){n.PlainText=1,n.Snippet=2})(B||(B={}));var oe;(function(n){n.Deprecated=1})(oe||(oe={}));var se;(function(n){function r(t,e,a){return{newText:t,insert:e,replace:a}}n.create=r;function i(t){var e=t;return e&&o.string(e.newText)&&m.is(e.insert)&&m.is(e.replace)}n.is=i})(se||(se={}));var ce;(function(n){n.asIs=1,n.adjustIndentation=2})(ce||(ce={}));var de;(function(n){function r(i){return{label:i}}n.create=r})(de||(de={}));var fe;(function(n){function r(i,t){return{items:i||[],isIncomplete:!!t}}n.create=r})(fe||(fe={}));var H;(function(n){function r(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=r;function i(t){var e=t;return o.string(e)||o.objectLiteral(e)&&o.string(e.language)&&o.string(e.value)}n.is=i})(H||(H={}));var ge;(function(n){function r(i){var t=i;return!!t&&o.objectLiteral(t)&&($.is(t.contents)||H.is(t.contents)||o.typedArray(t.contents,H.is))&&(i.range===void 0||m.is(i.range))}n.is=r})(ge||(ge={}));var le;(function(n){function r(i,t){return t?{label:i,documentation:t}:{label:i}}n.create=r})(le||(le={}));var he;(function(n){function r(i,t){for(var e=[],a=2;a=0;d--){var p=g[d],b=a.offsetAt(p.range.start),c=a.offsetAt(p.range.end);if(c<=l)s=s.substring(0,b)+p.newText+s.substring(c,s.length);else throw new Error("Overlapping edit");l=b}return s}n.applyEdits=t;function e(a,u){if(a.length<=1)return a;var s=a.length/2|0,g=a.slice(0,s),l=a.slice(s);e(g,u),e(l,u);for(var d=0,p=0,b=0;d$e&&this._stopWorker()}},n.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=Oe.createWebWorker({moduleId:"vs/language/html/htmlWorker",createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client},n.prototype.getLanguageServiceWorker=function(){for(var r=this,i=[],t=0;t0&&(s.arguments=a),s}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.title)&&o.string(e.command)}n.is=i})(P||(P={}));var x;(function(n){function r(a,u){return{range:a,newText:u}}n.replace=r;function i(a,u){return{range:{start:a,end:a},newText:u}}n.insert=i;function t(a){return{range:a,newText:""}}n.del=t;function e(a){var u=a;return o.objectLiteral(u)&&o.string(u.newText)&&m.is(u.range)}n.is=e})(x||(x={}));var C;(function(n){function r(t,e,a){var u={label:t};return e!==void 0&&(u.needsConfirmation=e),a!==void 0&&(u.description=a),u}n.create=r;function i(t){var e=t;return e!==void 0&&o.objectLiteral(e)&&o.string(e.label)&&(o.boolean(e.needsConfirmation)||e.needsConfirmation===void 0)&&(o.string(e.description)||e.description===void 0)}n.is=i})(C||(C={}));var w;(function(n){function r(i){var t=i;return typeof t=="string"}n.is=r})(w||(w={}));var E;(function(n){function r(a,u,s){return{range:a,newText:u,annotationId:s}}n.replace=r;function i(a,u,s){return{range:{start:a,end:a},newText:u,annotationId:s}}n.insert=i;function t(a,u){return{range:a,newText:"",annotationId:u}}n.del=t;function e(a){var u=a;return x.is(u)&&(C.is(u.annotationId)||w.is(u.annotationId))}n.is=e})(E||(E={}));var N;(function(n){function r(t,e){return{textDocument:t,edits:e}}n.create=r;function i(t){var e=t;return o.defined(e)&&U.is(e.textDocument)&&Array.isArray(e.edits)}n.is=i})(N||(N={}));var F;(function(n){function r(t,e,a){var u={kind:"create",uri:t};return e!==void 0&&(e.overwrite!==void 0||e.ignoreIfExists!==void 0)&&(u.options=e),a!==void 0&&(u.annotationId=a),u}n.create=r;function i(t){var e=t;return e&&e.kind==="create"&&o.string(e.uri)&&(e.options===void 0||(e.options.overwrite===void 0||o.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||o.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||w.is(e.annotationId))}n.is=i})(F||(F={}));var T;(function(n){function r(t,e,a,u){var s={kind:"rename",oldUri:t,newUri:e};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(s.options=a),u!==void 0&&(s.annotationId=u),s}n.create=r;function i(t){var e=t;return e&&e.kind==="rename"&&o.string(e.oldUri)&&o.string(e.newUri)&&(e.options===void 0||(e.options.overwrite===void 0||o.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||o.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||w.is(e.annotationId))}n.is=i})(T||(T={}));var D;(function(n){function r(t,e,a){var u={kind:"delete",uri:t};return e!==void 0&&(e.recursive!==void 0||e.ignoreIfNotExists!==void 0)&&(u.options=e),a!==void 0&&(u.annotationId=a),u}n.create=r;function i(t){var e=t;return e&&e.kind==="delete"&&o.string(e.uri)&&(e.options===void 0||(e.options.recursive===void 0||o.boolean(e.options.recursive))&&(e.options.ignoreIfNotExists===void 0||o.boolean(e.options.ignoreIfNotExists)))&&(e.annotationId===void 0||w.is(e.annotationId))}n.is=i})(D||(D={}));var X;(function(n){function r(i){var t=i;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(function(e){return o.string(e.kind)?F.is(e)||T.is(e)||D.is(e):N.is(e)}))}n.is=r})(X||(X={}));var M=function(){function n(r,i){this.edits=r,this.changeAnnotations=i}return n.prototype.insert=function(r,i,t){var e,a;if(t===void 0?e=x.insert(r,i):w.is(t)?(a=t,e=E.insert(r,i,t)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(t),e=E.insert(r,i,a)),this.edits.push(e),a!==void 0)return a},n.prototype.replace=function(r,i,t){var e,a;if(t===void 0?e=x.replace(r,i):w.is(t)?(a=t,e=E.replace(r,i,t)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(t),e=E.replace(r,i,a)),this.edits.push(e),a!==void 0)return a},n.prototype.delete=function(r,i){var t,e;if(i===void 0?t=x.del(r):w.is(i)?(e=i,t=E.del(r,i)):(this.assertChangeAnnotations(this.changeAnnotations),e=this.changeAnnotations.manage(i),t=E.del(r,e)),this.edits.push(t),e!==void 0)return e},n.prototype.add=function(r){this.edits.push(r)},n.prototype.all=function(){return this.edits},n.prototype.clear=function(){this.edits.splice(0,this.edits.length)},n.prototype.assertChangeAnnotations=function(r){if(r===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},n}(),re=function(){function n(r){this._annotations=r===void 0?Object.create(null):r,this._counter=0,this._size=0}return n.prototype.all=function(){return this._annotations},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),n.prototype.manage=function(r,i){var t;if(w.is(r)?t=r:(t=this.nextId(),i=r),this._annotations[t]!==void 0)throw new Error("Id "+t+" is already in use.");if(i===void 0)throw new Error("No annotation provided for id "+t);return this._annotations[t]=i,this._size++,t},n.prototype.nextId=function(){return this._counter++,this._counter.toString()},n}();(function(){function n(r){var i=this;this._textEditChanges=Object.create(null),r!==void 0?(this._workspaceEdit=r,r.documentChanges?(this._changeAnnotations=new re(r.changeAnnotations),r.changeAnnotations=this._changeAnnotations.all(),r.documentChanges.forEach(function(t){if(N.is(t)){var e=new M(t.edits,i._changeAnnotations);i._textEditChanges[t.textDocument.uri]=e}})):r.changes&&Object.keys(r.changes).forEach(function(t){var e=new M(r.changes[t]);i._textEditChanges[t]=e})):this._workspaceEdit={}}return Object.defineProperty(n.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),n.prototype.getTextEditChange=function(r){if(U.is(r)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:r.uri,version:r.version},t=this._textEditChanges[i.uri];if(!t){var e=[],a={textDocument:i,edits:e};this._workspaceEdit.documentChanges.push(a),t=new M(e,this._changeAnnotations),this._textEditChanges[i.uri]=t}return t}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var t=this._textEditChanges[r];if(!t){var e=[];this._workspaceEdit.changes[r]=e,t=new M(e),this._textEditChanges[r]=t}return t}},n.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new re,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},n.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},n.prototype.createFile=function(r,i,t){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;C.is(i)||w.is(i)?e=i:t=i;var a,u;if(e===void 0?a=F.create(r,t):(u=w.is(e)?e:this._changeAnnotations.manage(e),a=F.create(r,t,u)),this._workspaceEdit.documentChanges.push(a),u!==void 0)return u},n.prototype.renameFile=function(r,i,t,e){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;C.is(t)||w.is(t)?a=t:e=t;var u,s;if(a===void 0?u=T.create(r,i,e):(s=w.is(a)?a:this._changeAnnotations.manage(a),u=T.create(r,i,e,s)),this._workspaceEdit.documentChanges.push(u),s!==void 0)return s},n.prototype.deleteFile=function(r,i,t){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;C.is(i)||w.is(i)?e=i:t=i;var a,u;if(e===void 0?a=D.create(r,t):(u=w.is(e)?e:this._changeAnnotations.manage(e),a=D.create(r,t,u)),this._workspaceEdit.documentChanges.push(a),u!==void 0)return u},n})();var ie;(function(n){function r(t){return{uri:t}}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.uri)}n.is=i})(ie||(ie={}));var ae;(function(n){function r(t,e){return{uri:t,version:e}}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.uri)&&o.integer(e.version)}n.is=i})(ae||(ae={}));var U;(function(n){function r(t,e){return{uri:t,version:e}}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.uri)&&(e.version===null||o.integer(e.version))}n.is=i})(U||(U={}));var ue;(function(n){function r(t,e,a,u){return{uri:t,languageId:e,version:a,text:u}}n.create=r;function i(t){var e=t;return o.defined(e)&&o.string(e.uri)&&o.string(e.languageId)&&o.integer(e.version)&&o.string(e.text)}n.is=i})(ue||(ue={}));var S;(function(n){n.PlainText="plaintext",n.Markdown="markdown"})(S||(S={}));(function(n){function r(i){var t=i;return t===n.PlainText||t===n.Markdown}n.is=r})(S||(S={}));var $;(function(n){function r(i){var t=i;return o.objectLiteral(i)&&S.is(t.kind)&&o.string(t.value)}n.is=r})($||($={}));var h;(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(h||(h={}));var B;(function(n){n.PlainText=1,n.Snippet=2})(B||(B={}));var oe;(function(n){n.Deprecated=1})(oe||(oe={}));var se;(function(n){function r(t,e,a){return{newText:t,insert:e,replace:a}}n.create=r;function i(t){var e=t;return e&&o.string(e.newText)&&m.is(e.insert)&&m.is(e.replace)}n.is=i})(se||(se={}));var ce;(function(n){n.asIs=1,n.adjustIndentation=2})(ce||(ce={}));var de;(function(n){function r(i){return{label:i}}n.create=r})(de||(de={}));var fe;(function(n){function r(i,t){return{items:i||[],isIncomplete:!!t}}n.create=r})(fe||(fe={}));var H;(function(n){function r(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=r;function i(t){var e=t;return o.string(e)||o.objectLiteral(e)&&o.string(e.language)&&o.string(e.value)}n.is=i})(H||(H={}));var ge;(function(n){function r(i){var t=i;return!!t&&o.objectLiteral(t)&&($.is(t.contents)||H.is(t.contents)||o.typedArray(t.contents,H.is))&&(i.range===void 0||m.is(i.range))}n.is=r})(ge||(ge={}));var le;(function(n){function r(i,t){return t?{label:i,documentation:t}:{label:i}}n.create=r})(le||(le={}));var he;(function(n){function r(i,t){for(var e=[],a=2;a=0;d--){var p=g[d],b=a.offsetAt(p.range.start),c=a.offsetAt(p.range.end);if(c<=l)s=s.substring(0,b)+p.newText+s.substring(c,s.length);else throw new Error("Overlapping edit");l=b}return s}n.applyEdits=t;function e(a,u){if(a.length<=1)return a;var s=a.length/2|0,g=a.slice(0,s),l=a.slice(s);e(g,u),e(l,u);for(var d=0,p=0,b=0;d0&&r.push(i.length),this._lineOffsets=r}return this._lineOffsets},n.prototype.positionAt=function(r){r=Math.max(Math.min(r,this._content.length),0);var i=this.getLineOffsets(),t=0,e=i.length;if(e===0)return k.create(0,r);for(;tr?e=a:t=a+1}var u=t-1;return k.create(u,r-i[u])},n.prototype.offsetAt=function(r){var i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;var t=i[r.line],e=r.line+1"u"}n.undefined=t;function e(c){return c===!0||c===!1}n.boolean=e;function a(c){return r.call(c)==="[object String]"}n.string=a;function u(c){return r.call(c)==="[object Number]"}n.number=u;function s(c,y,L){return r.call(c)==="[object Number]"&&y<=c&&c<=L}n.numberRange=s;function g(c){return r.call(c)==="[object Number]"&&-2147483648<=c&&c<=2147483647}n.integer=g;function l(c){return r.call(c)==="[object Number]"&&0<=c&&c<=2147483647}n.uinteger=l;function d(c){return r.call(c)==="[object Function]"}n.func=d;function p(c){return c!==null&&typeof c=="object"}n.objectLiteral=p;function b(c,y){return Array.isArray(c)&&c.every(y)}n.typedArray=b})(o||(o={}));function A(n){if(n)return{character:n.column-1,line:n.lineNumber-1}}function qe(n){if(n)return{start:A(n.getStartPosition()),end:A(n.getEndPosition())}}function _(n){if(n)return new Pe(n.start.line+1,n.start.character+1,n.end.line+1,n.end.character+1)}function Qe(n){return typeof n.insert<"u"&&typeof n.replace<"u"}function Ge(n){var r=f.CompletionItemKind;switch(n){case h.Text:return r.Text;case h.Method:return r.Method;case h.Function:return r.Function;case h.Constructor:return r.Constructor;case h.Field:return r.Field;case h.Variable:return r.Variable;case h.Class:return r.Class;case h.Interface:return r.Interface;case h.Module:return r.Module;case h.Property:return r.Property;case h.Unit:return r.Unit;case h.Value:return r.Value;case h.Enum:return r.Enum;case h.Keyword:return r.Keyword;case h.Snippet:return r.Snippet;case h.Color:return r.Color;case h.File:return r.File;case h.Reference:return r.Reference}return r.Property}function q(n){if(n)return{range:_(n.range),text:n.newText}}function Je(n){return n&&n.command==="editor.action.triggerSuggest"?{id:n.command,title:n.title,arguments:n.arguments}:void 0}var Te=function(){function n(r){this._worker=r}return Object.defineProperty(n.prototype,"triggerCharacters",{get:function(){return[".",":","<",'"',"=","/"]},enumerable:!1,configurable:!0}),n.prototype.provideCompletionItems=function(r,i,t,e){var a=r.uri;return this._worker(a).then(function(u){return u.doComplete(a.toString(),A(i))}).then(function(u){if(u){var s=r.getWordUntilPosition(i),g=new Pe(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),l=u.items.map(function(d){var p={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,command:Je(d.command),detail:d.detail,range:g,kind:Ge(d.kind)};return d.textEdit&&(Qe(d.textEdit)?p.range={insert:_(d.textEdit.insert),replace:_(d.textEdit.replace)}:p.range=_(d.textEdit.range),p.insertText=d.textEdit.newText),d.additionalTextEdits&&(p.additionalTextEdits=d.additionalTextEdits.map(q)),d.insertTextFormat===B.Snippet&&(p.insertTextRules=f.CompletionItemInsertTextRule.InsertAsSnippet),p});return{isIncomplete:u.isIncomplete,suggestions:l}}})},n}();function Ye(n){return n&&typeof n=="object"&&typeof n.kind=="string"}function Re(n){return typeof n=="string"?{value:n}:Ye(n)?n.kind==="plaintext"?{value:n.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:n.value}:{value:"```"+n.language+` `+n.value+"\n```\n"}}function Ze(n){if(n)return Array.isArray(n)?n.map(Re):[Re(n)]}var De=function(){function n(r){this._worker=r}return n.prototype.provideHover=function(r,i,t){var e=r.uri;return this._worker(e).then(function(a){return a.doHover(e.toString(),A(i))}).then(function(a){if(a)return{range:_(a.range),contents:Ze(a.contents)}})},n}();function Ke(n){var r=f.DocumentHighlightKind;switch(n){case I.Read:return r.Read;case I.Write:return r.Write;case I.Text:return r.Text}return r.Text}var Se=function(){function n(r){this._worker=r}return n.prototype.provideDocumentHighlights=function(r,i,t){var e=r.uri;return this._worker(e).then(function(a){return a.findDocumentHighlights(e.toString(),A(i))}).then(function(a){if(a)return a.map(function(u){return{range:_(u.range),kind:Ke(u.kind)}})})},n}();function en(n){var r=f.SymbolKind;switch(n){case v.File:return r.Array;case v.Module:return r.Module;case v.Namespace:return r.Namespace;case v.Package:return r.Package;case v.Class:return r.Class;case v.Method:return r.Method;case v.Property:return r.Property;case v.Field:return r.Field;case v.Constructor:return r.Constructor;case v.Enum:return r.Enum;case v.Interface:return r.Interface;case v.Function:return r.Function;case v.Variable:return r.Variable;case v.Constant:return r.Constant;case v.String:return r.String;case v.Number:return r.Number;case v.Boolean:return r.Boolean;case v.Array:return r.Array}return r.Function}var Le=function(){function n(r){this._worker=r}return n.prototype.provideDocumentSymbols=function(r,i){var t=r.uri;return this._worker(t).then(function(e){return e.findDocumentSymbols(t.toString())}).then(function(e){if(e)return e.map(function(a){return{name:a.name,detail:"",containerName:a.containerName,kind:en(a.kind),tags:[],range:_(a.location.range),selectionRange:_(a.location.range)}})})},n}(),Me=function(){function n(r){this._worker=r}return n.prototype.provideLinks=function(r,i){var t=r.uri;return this._worker(t).then(function(e){return e.findDocumentLinks(t.toString())}).then(function(e){if(e)return{links:e.map(function(a){return{range:_(a.range),url:a.target}})}})},n}();function je(n){return{tabSize:n.tabSize,insertSpaces:n.insertSpaces}}var We=function(){function n(r){this._worker=r}return n.prototype.provideDocumentFormattingEdits=function(r,i,t){var e=r.uri;return this._worker(e).then(function(a){return a.format(e.toString(),null,je(i)).then(function(u){if(!(!u||u.length===0))return u.map(q)})})},n}(),Ne=function(){function n(r){this._worker=r}return n.prototype.provideDocumentRangeFormattingEdits=function(r,i,t,e){var a=r.uri;return this._worker(a).then(function(u){return u.format(a.toString(),qe(i),je(t)).then(function(s){if(!(!s||s.length===0))return s.map(q)})})},n}(),Ue=function(){function n(r){this._worker=r}return n.prototype.provideRenameEdits=function(r,i,t,e){var a=r.uri;return this._worker(a).then(function(u){return u.doRename(a.toString(),A(i),t)}).then(function(u){return nn(u)})},n}();function nn(n){if(!(!n||!n.changes)){var r=[];for(var i in n.changes)for(var t=Xe.parse(i),e=0,a=n.changes[i];ev[q]})}}}return Object.freeze(Object.defineProperty(H,Symbol.toStringTag,{value:"Module"}))}var ke={exports:{}},oe={exports:{}},ie;function we(){return ie||(ie=1,function(H,X){(function(u){u(Z)})(function(u){var v={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},q={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};u.defineMode("xml",function(O,D){var F=O.indentUnit,b={},$=D.htmlMode?v:q;for(var C in $)b[C]=$[C];for(var C in D)b[C]=D[C];var p,l;function m(t,i){function o(U){return i.tokenize=U,U(t,i)}var s=t.next();if(s=="<")return t.eat("!")?t.eat("[")?t.match("CDATA[")?o(P("atom","]]>")):null:t.match("--")?o(P("comment","-->")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),o(K(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),i.tokenize=P("meta","?>"),"meta"):(p=t.eat("/")?"closeTag":"openTag",i.tokenize=k,"tag bracket");if(s=="&"){var S;return t.eat("#")?t.eat("x")?S=t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):S=t.eatWhile(/[\d]/)&&t.eat(";"):S=t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),S?"atom":"error"}else return t.eatWhile(/[^&<]/),null}m.isInText=!0;function k(t,i){var o=t.next();if(o==">"||o=="/"&&t.eat(">"))return i.tokenize=m,p=o==">"?"endTag":"selfcloseTag","tag bracket";if(o=="=")return p="equals",null;if(o=="<"){i.tokenize=m,i.state=A,i.tagName=i.tagStart=null;var s=i.tokenize(t,i);return s?s+" tag error":"tag error"}else return/[\'\"]/.test(o)?(i.tokenize=z(o),i.stringStartCol=t.column(),i.tokenize(t,i)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function z(t){var i=function(o,s){for(;!o.eol();)if(o.next()==t){s.tokenize=k;break}return"string"};return i.isInAttribute=!0,i}function P(t,i){return function(o,s){for(;!o.eol();){if(o.match(i)){s.tokenize=m;break}o.next()}return t}}function K(t){return function(i,o){for(var s;(s=i.next())!=null;){if(s=="<")return o.tokenize=K(t+1),o.tokenize(i,o);if(s==">")if(t==1){o.tokenize=m;break}else return o.tokenize=K(t-1),o.tokenize(i,o)}return"meta"}}function j(t){return t&&t.toLowerCase()}function f(t,i,o){this.prev=t.context,this.tagName=i||"",this.indent=t.indented,this.startOfLine=o,(b.doNotIndent.hasOwnProperty(i)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function _(t,i){for(var o;;){if(!t.context||(o=t.context.tagName,!b.contextGrabbers.hasOwnProperty(j(o))||!b.contextGrabbers[j(o)].hasOwnProperty(j(i))))return;h(t)}}function A(t,i,o){return t=="openTag"?(o.tagStart=i.column(),I):t=="closeTag"?L:A}function I(t,i,o){return t=="word"?(o.tagName=i.current(),l="tag",a):b.allowMissingTagName&&t=="endTag"?(l="tag bracket",a(t,i,o)):(l="error",I)}function L(t,i,o){if(t=="word"){var s=i.current();return o.context&&o.context.tagName!=s&&b.implicitlyClosed.hasOwnProperty(j(o.context.tagName))&&h(o),o.context&&o.context.tagName==s||b.matchClosing===!1?(l="tag",T):(l="tag error",c)}else return b.allowMissingTagName&&t=="endTag"?(l="tag bracket",T(t,i,o)):(l="error",c)}function T(t,i,o){return t!="endTag"?(l="error",T):(h(o),A)}function c(t,i,o){return l="error",T(t,i,o)}function a(t,i,o){if(t=="word")return l="attribute",M;if(t=="endTag"||t=="selfcloseTag"){var s=o.tagName,S=o.tagStart;return o.tagName=o.tagStart=null,t=="selfcloseTag"||b.autoSelfClosers.hasOwnProperty(j(s))?_(o,s):(_(o,s),o.context=new f(o,s,S==o.indented)),A}return l="error",a}function M(t,i,o){return t=="equals"?N:(b.allowMissing||(l="error"),a(t,i,o))}function N(t,i,o){return t=="string"?B:t=="word"&&b.allowUnquoted?(l="string",a):(l="error",a(t,i,o))}function B(t,i,o){return t=="string"?B:a(t,i,o)}return{startState:function(t){var i={tokenize:m,state:A,indented:t||0,tagName:null,tagStart:null,context:null};return t!=null&&(i.baseIndent=t),i},token:function(t,i){if(!i.tagName&&t.sol()&&(i.indented=t.indentation()),t.eatSpace())return null;p=null;var o=i.tokenize(t,i);return(o||p)&&o!="comment"&&(l=null,i.state=i.state(p||o,t,i),l&&(o=l=="error"?o+" error":l)),o},indent:function(t,i,o){var s=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+F;if(s&&s.noIndent)return u.Pass;if(t.tokenize!=k&&t.tokenize!=m)return o?o.match(/^(\s*)/)[0].length:0;if(t.tagName)return b.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+F*(b.multilineTagIndentFactor||1);if(b.alignCDATA&&/$/,blockCommentStart:"",configuration:b.htmlMode?"html":"xml",helperType:b.htmlMode?"html":"xml",skipAttribute:function(t){t.state==N&&(t.state=a)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:t.type=="closeTag"}:null},xmlCurrentContext:function(t){for(var i=[],o=t.context;o;o=o.prev)i.push(o.tagName);return i.reverse()}}}),u.defineMIME("text/xml","xml"),u.defineMIME("application/xml","xml"),u.mimeModes.hasOwnProperty("text/html")||u.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),oe.exports}var ae={exports:{}},le;function ve(){return le||(le=1,function(H,X){(function(u){u(Z)})(function(u){u.defineMode("css",function(c,a){var M=a.inline;a.propertyKeywords||(a=u.resolveMode("text/css"));var N=c.indentUnit,B=a.tokenHooks,t=a.documentTypes||{},i=a.mediaTypes||{},o=a.mediaFeatures||{},s=a.mediaValueKeywords||{},S=a.propertyKeywords||{},U=a.nonStandardPropertyKeywords||{},ce=a.fontProperties||{},ue=a.counterDescriptors||{},J=a.colorKeywords||{},Q=a.valueKeywords||{},R=a.allowNested,de=a.lineComment,pe=a.supportsAtComponent===!0,ee=c.highlightNonStandardPropertyKeywords!==!1,Y,d;function x(e,n){return Y=n,e}function fe(e,n){var r=e.next();if(B[r]){var g=B[r](e,n);if(g!==!1)return g}if(r=="@")return e.eatWhile(/[\w\\\-]/),x("def",e.current());if(r=="="||(r=="~"||r=="|")&&e.eat("="))return x(null,"compare");if(r=='"'||r=="'")return n.tokenize=re(r),n.tokenize(e,n);if(r=="#")return e.eatWhile(/[\w\\\-]/),x("atom","hash");if(r=="!")return e.match(/^\s*\w*/),x("keyword","important");if(/\d/.test(r)||r=="."&&e.eat(/\d/))return e.eatWhile(/[\w.%]/),x("number","unit");if(r==="-"){if(/[\d.]/.test(e.peek()))return e.eatWhile(/[\w.%]/),x("number","unit");if(e.match(/^-[\w\\\-]*/))return e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable");if(e.match(/^\w+-/))return x("meta","meta")}else return/[,+>*\/]/.test(r)?x(null,"select-op"):r=="."&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?x(null,r):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(n.tokenize=me),x("variable callee","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null)}function re(e){return function(n,r){for(var g=!1,E;(E=n.next())!=null;){if(E==e&&!g){e==")"&&n.backUp(1);break}g=!g&&E=="\\"}return(E==e||!g&&e!=")")&&(r.tokenize=null),x("string","string")}}function me(e,n){return e.next(),e.match(/^\s*[\"\')]/,!1)?n.tokenize=null:n.tokenize=re(")"),x(null,"(")}function te(e,n,r){this.type=e,this.indent=n,this.prev=r}function y(e,n,r,g){return e.context=new te(r,n.indentation()+(g===!1?0:N),e.context),r}function W(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function G(e,n,r){return w[r.context.type](e,n,r)}function V(e,n,r,g){for(var E=g||1;E>0;E--)r.context=r.context.prev;return G(e,n,r)}function ne(e){var n=e.current().toLowerCase();Q.hasOwnProperty(n)?d="atom":J.hasOwnProperty(n)?d="keyword":d="variable"}var w={};return w.top=function(e,n,r){if(e=="{")return y(r,n,"block");if(e=="}"&&r.context.prev)return W(r);if(pe&&/@component/i.test(e))return y(r,n,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return y(r,n,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return y(r,n,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&e.charAt(0)=="@")return y(r,n,"at");if(e=="hash")d="builtin";else if(e=="word")d="tag";else{if(e=="variable-definition")return"maybeprop";if(e=="interpolation")return y(r,n,"interpolation");if(e==":")return"pseudo";if(R&&e=="(")return y(r,n,"parens")}return r.context.type},w.block=function(e,n,r){if(e=="word"){var g=n.current().toLowerCase();return S.hasOwnProperty(g)?(d="property","maybeprop"):U.hasOwnProperty(g)?(d=ee?"string-2":"property","maybeprop"):R?(d=n.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(d+=" error","maybeprop")}else return e=="meta"?"block":!R&&(e=="hash"||e=="qualifier")?(d="error","block"):w.top(e,n,r)},w.maybeprop=function(e,n,r){return e==":"?y(r,n,"prop"):G(e,n,r)},w.prop=function(e,n,r){if(e==";")return W(r);if(e=="{"&&R)return y(r,n,"propBlock");if(e=="}"||e=="{")return V(e,n,r);if(e=="(")return y(r,n,"parens");if(e=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(n.current()))d+=" error";else if(e=="word")ne(n);else if(e=="interpolation")return y(r,n,"interpolation");return"prop"},w.propBlock=function(e,n,r){return e=="}"?W(r):e=="word"?(d="property","maybeprop"):r.context.type},w.parens=function(e,n,r){return e=="{"||e=="}"?V(e,n,r):e==")"?W(r):e=="("?y(r,n,"parens"):e=="interpolation"?y(r,n,"interpolation"):(e=="word"&&ne(n),"parens")},w.pseudo=function(e,n,r){return e=="meta"?"pseudo":e=="word"?(d="variable-3",r.context.type):G(e,n,r)},w.documentTypes=function(e,n,r){return e=="word"&&t.hasOwnProperty(n.current())?(d="tag",r.context.type):w.atBlock(e,n,r)},w.atBlock=function(e,n,r){if(e=="(")return y(r,n,"atBlock_parens");if(e=="}"||e==";")return V(e,n,r);if(e=="{")return W(r)&&y(r,n,R?"block":"top");if(e=="interpolation")return y(r,n,"interpolation");if(e=="word"){var g=n.current().toLowerCase();g=="only"||g=="not"||g=="and"||g=="or"?d="keyword":i.hasOwnProperty(g)?d="attribute":o.hasOwnProperty(g)?d="property":s.hasOwnProperty(g)?d="keyword":S.hasOwnProperty(g)?d="property":U.hasOwnProperty(g)?d=ee?"string-2":"property":Q.hasOwnProperty(g)?d="atom":J.hasOwnProperty(g)?d="keyword":d="error"}return r.context.type},w.atComponentBlock=function(e,n,r){return e=="}"?V(e,n,r):e=="{"?W(r)&&y(r,n,R?"block":"top",!1):(e=="word"&&(d="error"),r.context.type)},w.atBlock_parens=function(e,n,r){return e==")"?W(r):e=="{"||e=="}"?V(e,n,r,2):w.atBlock(e,n,r)},w.restricted_atBlock_before=function(e,n,r){return e=="{"?y(r,n,"restricted_atBlock"):e=="word"&&r.stateArg=="@counter-style"?(d="variable","restricted_atBlock_before"):G(e,n,r)},w.restricted_atBlock=function(e,n,r){return e=="}"?(r.stateArg=null,W(r)):e=="word"?(r.stateArg=="@font-face"&&!ce.hasOwnProperty(n.current().toLowerCase())||r.stateArg=="@counter-style"&&!ue.hasOwnProperty(n.current().toLowerCase())?d="error":d="property","maybeprop"):"restricted_atBlock"},w.keyframes=function(e,n,r){return e=="word"?(d="variable","keyframes"):e=="{"?y(r,n,"top"):G(e,n,r)},w.at=function(e,n,r){return e==";"?W(r):e=="{"||e=="}"?V(e,n,r):(e=="word"?d="tag":e=="hash"&&(d="builtin"),"at")},w.interpolation=function(e,n,r){return e=="}"?W(r):e=="{"||e==";"?V(e,n,r):(e=="word"?d="variable":e!="variable"&&e!="("&&e!=")"&&(d="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:M?"block":"top",stateArg:null,context:new te(M?"block":"top",e||0,null)}},token:function(e,n){if(!n.tokenize&&e.eatSpace())return null;var r=(n.tokenize||fe)(e,n);return r&&typeof r=="object"&&(Y=r[1],r=r[0]),d=r,Y!="comment"&&(n.state=w[n.state](Y,e,n)),d},indent:function(e,n){var r=e.context,g=n&&n.charAt(0),E=r.indent;return r.type=="prop"&&(g=="}"||g==")")&&(r=r.prev),r.prev&&(g=="}"&&(r.type=="block"||r.type=="top"||r.type=="interpolation"||r.type=="restricted_atBlock")?(r=r.prev,E=r.indent):(g==")"&&(r.type=="parens"||r.type=="atBlock_parens")||g=="{"&&(r.type=="at"||r.type=="atBlock"))&&(E=Math.max(0,r.indent-N))),E},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:de,fold:"brace"}});function v(c){for(var a={},M=0;M-1?p.backUp(k.length-z):k.match(/<\/?$/)&&(p.backUp(k.length),p.match(l,!1)||p.match(k)),m}var O={};function D(p){var l=O[p];return l||(O[p]=new RegExp("\\s+"+p+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function F(p,l){var m=p.match(D(l));return m?/^\s*(.*?)\s*$/.exec(m[2])[1]:""}function b(p,l){return new RegExp((l?"^":"")+"","i")}function $(p,l){for(var m in p)for(var k=l[m]||(l[m]=[]),z=p[m],P=z.length-1;P>=0;P--)k.unshift(z[P])}function C(p,l){for(var m=0;m=0;K--)k.script.unshift(["type",P[K].matches,P[K].mode]);function j(f,h){var _=m.token(f,h.htmlState),A=/\btag\b/.test(_),I;if(A&&!/[<>\s\/]/.test(f.current())&&(I=h.htmlState.tagName&&h.htmlState.tagName.toLowerCase())&&k.hasOwnProperty(I))h.inTag=I+" ";else if(h.inTag&&A&&/>$/.test(f.current())){var L=/^([\S]+) (.*)/.exec(h.inTag);h.inTag=null;var T=f.current()==">"&&C(k[L[1]],L[2]),c=u.getMode(p,T),a=b(L[1],!0),M=b(L[1],!1);h.token=function(N,B){return N.match(a,!1)?(B.token=j,B.localState=B.localMode=null,null):q(N,M,B.localMode.token(N,B.localState))},h.localMode=c,h.localState=u.startState(c,m.indent(h.htmlState,"",""))}else h.inTag&&(h.inTag+=f.current(),f.eol()&&(h.inTag+=" "));return _}return{startState:function(){var f=u.startState(m);return{token:j,inTag:null,localMode:null,localState:null,htmlState:f}},copyState:function(f){var h;return f.localState&&(h=u.copyState(f.localMode,f.localState)),{token:f.token,inTag:f.inTag,localMode:f.localMode,localState:h,htmlState:u.copyState(m,f.htmlState)}},token:function(f,h){return h.token(f,h)},indent:function(f,h,_){return!f.localMode||/^\s*<\//.test(h)?m.indent(f.htmlState,h,_):f.localMode.indent?f.localMode.indent(f.localState,h,_):u.Pass},innerMode:function(f){return{state:f.localState||f.htmlState,mode:f.localMode||m}}}},"xml","javascript","css"),u.defineMIME("text/html","htmlmixed")})})();var se=ke.exports;const ye=ge(se),Se=be({__proto__:null,default:ye},[se]);export{Se as h}; +import{p as ge}from"./index-5zY5TMAp.js";import{a as Z}from"./codemirror-DJVdi8fy.js";import{a as he}from"./javascript-oVPKpoUA.js";function be(H,X){for(var u=0;uv[q]})}}}return Object.freeze(Object.defineProperty(H,Symbol.toStringTag,{value:"Module"}))}var ke={exports:{}},oe={exports:{}},ie;function we(){return ie||(ie=1,function(H,X){(function(u){u(Z)})(function(u){var v={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},q={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};u.defineMode("xml",function(O,D){var F=O.indentUnit,b={},$=D.htmlMode?v:q;for(var C in $)b[C]=$[C];for(var C in D)b[C]=D[C];var p,l;function m(t,i){function o(U){return i.tokenize=U,U(t,i)}var s=t.next();if(s=="<")return t.eat("!")?t.eat("[")?t.match("CDATA[")?o(P("atom","]]>")):null:t.match("--")?o(P("comment","-->")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),o(K(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),i.tokenize=P("meta","?>"),"meta"):(p=t.eat("/")?"closeTag":"openTag",i.tokenize=k,"tag bracket");if(s=="&"){var S;return t.eat("#")?t.eat("x")?S=t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):S=t.eatWhile(/[\d]/)&&t.eat(";"):S=t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),S?"atom":"error"}else return t.eatWhile(/[^&<]/),null}m.isInText=!0;function k(t,i){var o=t.next();if(o==">"||o=="/"&&t.eat(">"))return i.tokenize=m,p=o==">"?"endTag":"selfcloseTag","tag bracket";if(o=="=")return p="equals",null;if(o=="<"){i.tokenize=m,i.state=A,i.tagName=i.tagStart=null;var s=i.tokenize(t,i);return s?s+" tag error":"tag error"}else return/[\'\"]/.test(o)?(i.tokenize=z(o),i.stringStartCol=t.column(),i.tokenize(t,i)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function z(t){var i=function(o,s){for(;!o.eol();)if(o.next()==t){s.tokenize=k;break}return"string"};return i.isInAttribute=!0,i}function P(t,i){return function(o,s){for(;!o.eol();){if(o.match(i)){s.tokenize=m;break}o.next()}return t}}function K(t){return function(i,o){for(var s;(s=i.next())!=null;){if(s=="<")return o.tokenize=K(t+1),o.tokenize(i,o);if(s==">")if(t==1){o.tokenize=m;break}else return o.tokenize=K(t-1),o.tokenize(i,o)}return"meta"}}function j(t){return t&&t.toLowerCase()}function f(t,i,o){this.prev=t.context,this.tagName=i||"",this.indent=t.indented,this.startOfLine=o,(b.doNotIndent.hasOwnProperty(i)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function h(t){t.context&&(t.context=t.context.prev)}function _(t,i){for(var o;;){if(!t.context||(o=t.context.tagName,!b.contextGrabbers.hasOwnProperty(j(o))||!b.contextGrabbers[j(o)].hasOwnProperty(j(i))))return;h(t)}}function A(t,i,o){return t=="openTag"?(o.tagStart=i.column(),I):t=="closeTag"?L:A}function I(t,i,o){return t=="word"?(o.tagName=i.current(),l="tag",a):b.allowMissingTagName&&t=="endTag"?(l="tag bracket",a(t,i,o)):(l="error",I)}function L(t,i,o){if(t=="word"){var s=i.current();return o.context&&o.context.tagName!=s&&b.implicitlyClosed.hasOwnProperty(j(o.context.tagName))&&h(o),o.context&&o.context.tagName==s||b.matchClosing===!1?(l="tag",T):(l="tag error",c)}else return b.allowMissingTagName&&t=="endTag"?(l="tag bracket",T(t,i,o)):(l="error",c)}function T(t,i,o){return t!="endTag"?(l="error",T):(h(o),A)}function c(t,i,o){return l="error",T(t,i,o)}function a(t,i,o){if(t=="word")return l="attribute",M;if(t=="endTag"||t=="selfcloseTag"){var s=o.tagName,S=o.tagStart;return o.tagName=o.tagStart=null,t=="selfcloseTag"||b.autoSelfClosers.hasOwnProperty(j(s))?_(o,s):(_(o,s),o.context=new f(o,s,S==o.indented)),A}return l="error",a}function M(t,i,o){return t=="equals"?N:(b.allowMissing||(l="error"),a(t,i,o))}function N(t,i,o){return t=="string"?B:t=="word"&&b.allowUnquoted?(l="string",a):(l="error",a(t,i,o))}function B(t,i,o){return t=="string"?B:a(t,i,o)}return{startState:function(t){var i={tokenize:m,state:A,indented:t||0,tagName:null,tagStart:null,context:null};return t!=null&&(i.baseIndent=t),i},token:function(t,i){if(!i.tagName&&t.sol()&&(i.indented=t.indentation()),t.eatSpace())return null;p=null;var o=i.tokenize(t,i);return(o||p)&&o!="comment"&&(l=null,i.state=i.state(p||o,t,i),l&&(o=l=="error"?o+" error":l)),o},indent:function(t,i,o){var s=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+F;if(s&&s.noIndent)return u.Pass;if(t.tokenize!=k&&t.tokenize!=m)return o?o.match(/^(\s*)/)[0].length:0;if(t.tagName)return b.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+F*(b.multilineTagIndentFactor||1);if(b.alignCDATA&&/$/,blockCommentStart:"",configuration:b.htmlMode?"html":"xml",helperType:b.htmlMode?"html":"xml",skipAttribute:function(t){t.state==N&&(t.state=a)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:t.type=="closeTag"}:null},xmlCurrentContext:function(t){for(var i=[],o=t.context;o;o=o.prev)i.push(o.tagName);return i.reverse()}}}),u.defineMIME("text/xml","xml"),u.defineMIME("application/xml","xml"),u.mimeModes.hasOwnProperty("text/html")||u.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),oe.exports}var ae={exports:{}},le;function ve(){return le||(le=1,function(H,X){(function(u){u(Z)})(function(u){u.defineMode("css",function(c,a){var M=a.inline;a.propertyKeywords||(a=u.resolveMode("text/css"));var N=c.indentUnit,B=a.tokenHooks,t=a.documentTypes||{},i=a.mediaTypes||{},o=a.mediaFeatures||{},s=a.mediaValueKeywords||{},S=a.propertyKeywords||{},U=a.nonStandardPropertyKeywords||{},ce=a.fontProperties||{},ue=a.counterDescriptors||{},J=a.colorKeywords||{},Q=a.valueKeywords||{},R=a.allowNested,de=a.lineComment,pe=a.supportsAtComponent===!0,ee=c.highlightNonStandardPropertyKeywords!==!1,Y,d;function x(e,n){return Y=n,e}function fe(e,n){var r=e.next();if(B[r]){var g=B[r](e,n);if(g!==!1)return g}if(r=="@")return e.eatWhile(/[\w\\\-]/),x("def",e.current());if(r=="="||(r=="~"||r=="|")&&e.eat("="))return x(null,"compare");if(r=='"'||r=="'")return n.tokenize=re(r),n.tokenize(e,n);if(r=="#")return e.eatWhile(/[\w\\\-]/),x("atom","hash");if(r=="!")return e.match(/^\s*\w*/),x("keyword","important");if(/\d/.test(r)||r=="."&&e.eat(/\d/))return e.eatWhile(/[\w.%]/),x("number","unit");if(r==="-"){if(/[\d.]/.test(e.peek()))return e.eatWhile(/[\w.%]/),x("number","unit");if(e.match(/^-[\w\\\-]*/))return e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable");if(e.match(/^\w+-/))return x("meta","meta")}else return/[,+>*\/]/.test(r)?x(null,"select-op"):r=="."&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?x(null,r):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(n.tokenize=me),x("variable callee","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null)}function re(e){return function(n,r){for(var g=!1,E;(E=n.next())!=null;){if(E==e&&!g){e==")"&&n.backUp(1);break}g=!g&&E=="\\"}return(E==e||!g&&e!=")")&&(r.tokenize=null),x("string","string")}}function me(e,n){return e.next(),e.match(/^\s*[\"\')]/,!1)?n.tokenize=null:n.tokenize=re(")"),x(null,"(")}function te(e,n,r){this.type=e,this.indent=n,this.prev=r}function y(e,n,r,g){return e.context=new te(r,n.indentation()+(g===!1?0:N),e.context),r}function W(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function G(e,n,r){return w[r.context.type](e,n,r)}function V(e,n,r,g){for(var E=g||1;E>0;E--)r.context=r.context.prev;return G(e,n,r)}function ne(e){var n=e.current().toLowerCase();Q.hasOwnProperty(n)?d="atom":J.hasOwnProperty(n)?d="keyword":d="variable"}var w={};return w.top=function(e,n,r){if(e=="{")return y(r,n,"block");if(e=="}"&&r.context.prev)return W(r);if(pe&&/@component/i.test(e))return y(r,n,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return y(r,n,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return y(r,n,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&e.charAt(0)=="@")return y(r,n,"at");if(e=="hash")d="builtin";else if(e=="word")d="tag";else{if(e=="variable-definition")return"maybeprop";if(e=="interpolation")return y(r,n,"interpolation");if(e==":")return"pseudo";if(R&&e=="(")return y(r,n,"parens")}return r.context.type},w.block=function(e,n,r){if(e=="word"){var g=n.current().toLowerCase();return S.hasOwnProperty(g)?(d="property","maybeprop"):U.hasOwnProperty(g)?(d=ee?"string-2":"property","maybeprop"):R?(d=n.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(d+=" error","maybeprop")}else return e=="meta"?"block":!R&&(e=="hash"||e=="qualifier")?(d="error","block"):w.top(e,n,r)},w.maybeprop=function(e,n,r){return e==":"?y(r,n,"prop"):G(e,n,r)},w.prop=function(e,n,r){if(e==";")return W(r);if(e=="{"&&R)return y(r,n,"propBlock");if(e=="}"||e=="{")return V(e,n,r);if(e=="(")return y(r,n,"parens");if(e=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(n.current()))d+=" error";else if(e=="word")ne(n);else if(e=="interpolation")return y(r,n,"interpolation");return"prop"},w.propBlock=function(e,n,r){return e=="}"?W(r):e=="word"?(d="property","maybeprop"):r.context.type},w.parens=function(e,n,r){return e=="{"||e=="}"?V(e,n,r):e==")"?W(r):e=="("?y(r,n,"parens"):e=="interpolation"?y(r,n,"interpolation"):(e=="word"&&ne(n),"parens")},w.pseudo=function(e,n,r){return e=="meta"?"pseudo":e=="word"?(d="variable-3",r.context.type):G(e,n,r)},w.documentTypes=function(e,n,r){return e=="word"&&t.hasOwnProperty(n.current())?(d="tag",r.context.type):w.atBlock(e,n,r)},w.atBlock=function(e,n,r){if(e=="(")return y(r,n,"atBlock_parens");if(e=="}"||e==";")return V(e,n,r);if(e=="{")return W(r)&&y(r,n,R?"block":"top");if(e=="interpolation")return y(r,n,"interpolation");if(e=="word"){var g=n.current().toLowerCase();g=="only"||g=="not"||g=="and"||g=="or"?d="keyword":i.hasOwnProperty(g)?d="attribute":o.hasOwnProperty(g)?d="property":s.hasOwnProperty(g)?d="keyword":S.hasOwnProperty(g)?d="property":U.hasOwnProperty(g)?d=ee?"string-2":"property":Q.hasOwnProperty(g)?d="atom":J.hasOwnProperty(g)?d="keyword":d="error"}return r.context.type},w.atComponentBlock=function(e,n,r){return e=="}"?V(e,n,r):e=="{"?W(r)&&y(r,n,R?"block":"top",!1):(e=="word"&&(d="error"),r.context.type)},w.atBlock_parens=function(e,n,r){return e==")"?W(r):e=="{"||e=="}"?V(e,n,r,2):w.atBlock(e,n,r)},w.restricted_atBlock_before=function(e,n,r){return e=="{"?y(r,n,"restricted_atBlock"):e=="word"&&r.stateArg=="@counter-style"?(d="variable","restricted_atBlock_before"):G(e,n,r)},w.restricted_atBlock=function(e,n,r){return e=="}"?(r.stateArg=null,W(r)):e=="word"?(r.stateArg=="@font-face"&&!ce.hasOwnProperty(n.current().toLowerCase())||r.stateArg=="@counter-style"&&!ue.hasOwnProperty(n.current().toLowerCase())?d="error":d="property","maybeprop"):"restricted_atBlock"},w.keyframes=function(e,n,r){return e=="word"?(d="variable","keyframes"):e=="{"?y(r,n,"top"):G(e,n,r)},w.at=function(e,n,r){return e==";"?W(r):e=="{"||e=="}"?V(e,n,r):(e=="word"?d="tag":e=="hash"&&(d="builtin"),"at")},w.interpolation=function(e,n,r){return e=="}"?W(r):e=="{"||e==";"?V(e,n,r):(e=="word"?d="variable":e!="variable"&&e!="("&&e!=")"&&(d="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:M?"block":"top",stateArg:null,context:new te(M?"block":"top",e||0,null)}},token:function(e,n){if(!n.tokenize&&e.eatSpace())return null;var r=(n.tokenize||fe)(e,n);return r&&typeof r=="object"&&(Y=r[1],r=r[0]),d=r,Y!="comment"&&(n.state=w[n.state](Y,e,n)),d},indent:function(e,n){var r=e.context,g=n&&n.charAt(0),E=r.indent;return r.type=="prop"&&(g=="}"||g==")")&&(r=r.prev),r.prev&&(g=="}"&&(r.type=="block"||r.type=="top"||r.type=="interpolation"||r.type=="restricted_atBlock")?(r=r.prev,E=r.indent):(g==")"&&(r.type=="parens"||r.type=="atBlock_parens")||g=="{"&&(r.type=="at"||r.type=="atBlock"))&&(E=Math.max(0,r.indent-N))),E},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:de,fold:"brace"}});function v(c){for(var a={},M=0;M-1?p.backUp(k.length-z):k.match(/<\/?$/)&&(p.backUp(k.length),p.match(l,!1)||p.match(k)),m}var O={};function D(p){var l=O[p];return l||(O[p]=new RegExp("\\s+"+p+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function F(p,l){var m=p.match(D(l));return m?/^\s*(.*?)\s*$/.exec(m[2])[1]:""}function b(p,l){return new RegExp((l?"^":"")+"","i")}function $(p,l){for(var m in p)for(var k=l[m]||(l[m]=[]),z=p[m],P=z.length-1;P>=0;P--)k.unshift(z[P])}function C(p,l){for(var m=0;m=0;K--)k.script.unshift(["type",P[K].matches,P[K].mode]);function j(f,h){var _=m.token(f,h.htmlState),A=/\btag\b/.test(_),I;if(A&&!/[<>\s\/]/.test(f.current())&&(I=h.htmlState.tagName&&h.htmlState.tagName.toLowerCase())&&k.hasOwnProperty(I))h.inTag=I+" ";else if(h.inTag&&A&&/>$/.test(f.current())){var L=/^([\S]+) (.*)/.exec(h.inTag);h.inTag=null;var T=f.current()==">"&&C(k[L[1]],L[2]),c=u.getMode(p,T),a=b(L[1],!0),M=b(L[1],!1);h.token=function(N,B){return N.match(a,!1)?(B.token=j,B.localState=B.localMode=null,null):q(N,M,B.localMode.token(N,B.localState))},h.localMode=c,h.localState=u.startState(c,m.indent(h.htmlState,"",""))}else h.inTag&&(h.inTag+=f.current(),f.eol()&&(h.inTag+=" "));return _}return{startState:function(){var f=u.startState(m);return{token:j,inTag:null,localMode:null,localState:null,htmlState:f}},copyState:function(f){var h;return f.localState&&(h=u.copyState(f.localMode,f.localState)),{token:f.token,inTag:f.inTag,localMode:f.localMode,localState:h,htmlState:u.copyState(m,f.htmlState)}},token:function(f,h){return h.token(f,h)},indent:function(f,h,_){return!f.localMode||/^\s*<\//.test(h)?m.indent(f.htmlState,h,_):f.localMode.indent?f.localMode.indent(f.localState,h,_):u.Pass},innerMode:function(f){return{state:f.localState||f.htmlState,mode:f.localMode||m}}}},"xml","javascript","css"),u.defineMIME("text/html","htmlmixed")})})();var se=ke.exports;const ye=ge(se),Se=be({__proto__:null,default:ye},[se]);export{Se as h}; diff --git a/admin-views/dist/assets/htmlmixed-x-SVJ9TS.js.gz b/admin-views/dist/assets/htmlmixed-x-SVJ9TS.js.gz new file mode 100644 index 00000000..fe1c372c Binary files /dev/null and b/admin-views/dist/assets/htmlmixed-x-SVJ9TS.js.gz differ diff --git a/admin-views/dist/assets/index-B4ouchdD.js b/admin-views/dist/assets/index-5zY5TMAp.js similarity index 99% rename from admin-views/dist/assets/index-B4ouchdD.js rename to admin-views/dist/assets/index-5zY5TMAp.js index 921b7099..3aa6196b 100644 --- a/admin-views/dist/assets/index-B4ouchdD.js +++ b/admin-views/dist/assets/index-5zY5TMAp.js @@ -448,7 +448,7 @@ function print() { __p += __j.call(arguments, '') } See https://github.com/jayphelps/core-decorators.js/issues/20`));mapStore||(mapStore=new WeakMap),mapStore.has($P)||mapStore.set($P,new WeakMap);var x_=mapStore.get($P);return x_.has(e0e)||x_.set(e0e,bind$3(e0e,$P)),x_.get(e0e)}function createDefaultSetter($P){return function(x_){return defineProperty$3(this,$P,{configurable:!0,writable:!0,enumerable:!0,value:x_}),x_}}function autobindMethod($P,e0e,x_){var t0e=x_.value,a0e=x_.configurable,n0e=x_.enumerable;if(typeof t0e!="function")throw new SyntaxError("@autobind can only be used on functions, not: ".concat(t0e));var r0e=$P.constructor;return{configurable:a0e,enumerable:n0e,get:function(){if(this===$P||this.constructor!==r0e&&getPrototypeOf$1(this).constructor===r0e)return t0e;if(this.constructor!==r0e&&e0e in this.constructor.prototype)return getBoundSuper(this,t0e);var o0e=bind$3(t0e,this);return defineProperty$3(this,e0e,{configurable:!0,writable:!0,enumerable:!1,value:o0e}),o0e},set:createDefaultSetter(e0e)}}function isPureVariable($P){if(typeof $P=="string")try{var e0e=memoryParse($P);return e0e.body.length===1&&e0e.body[0].type==="script"}catch{return!1}return!1}var resolveVariableAndFilter=function($P,e0e,x_,t0e){if(e0e===void 0&&(e0e={}),x_===void 0&&(x_="| html"),t0e===void 0&&(t0e=function(r0e){return r0e}),!(!$P||typeof $P!="string"))try{var a0e=parse$2($P,{evalMode:!1,allowFilter:!0}),n0e=new Evaluator(e0e,{defaultFilter:x_}).evalute(a0e);return n0e==null&&!~$P.indexOf("default")&&!~$P.indexOf("now")?t0e(n0e):n0e}catch(r0e){console.warn(r0e);return}},baseGetTag$1=_baseGetTag,isObjectLike$4=isObjectLike_1,boolTag$4="[object Boolean]";function isBoolean$1($P){return $P===!0||$P===!1||isObjectLike$4($P)&&baseGetTag$1($P)==boolTag$4}var isBoolean_1=isBoolean$1;const isBoolean$2=getDefaultExportFromCjs(isBoolean_1);function traverseAst$1($P,e0e){!$P||!$P.type||(e0e($P),Object.keys($P).forEach(function(x_){var t0e=$P[x_];Array.isArray(t0e)?t0e.forEach(function(a0e){return traverseAst$1(a0e,e0e)}):traverseAst$1(t0e,e0e)}))}var COLLECT_EXPRESSION_CACHE={};function collectVariables($P,e0e){var x_=[];if(typeof $P=="string"&&COLLECT_EXPRESSION_CACHE[$P])return COLLECT_EXPRESSION_CACHE[$P];var t0e=typeof $P=="string"?memoryParse($P,{evalMode:e0e??!1}):$P;return traverseAst$1(t0e,function(a0e){a0e.type==="variable"&&x_.push(a0e.name)}),typeof $P=="string"&&(COLLECT_EXPRESSION_CACHE[$P]=x_),x_}var FORMULA_EVAL_CACHE={},FormulaExec={tpl:function($P,e0e){var x_=e0e||{};return filter$1($P,x_)},formula:function($P,e0e){if(/^\$\{([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})\}$/.test($P))return $P.substring(2,$P.length-1);var x_=e0e||{},t0e=void 0;try{t0e=resolveVariableAndFilter($P,x_,"| raw")}catch{return console.warn("[formula]表达式执行异常,当前表达式: ",$P,",当前上下文数据: ",e0e),$P}return t0e},evalFormula:function($P,e0e){var x_=e0e||{},t0e=void 0;try{t0e=evaluate($P,x_,{evalMode:!0,allowFilter:!1})}catch{return console.warn("[evalFormula]表达式执行异常,当前表达式: ",$P,",当前上下文数据: ",e0e),$P}return t0e??$P},js:function($P,e0e){var x_=!1,t0e=$P.indexOf("debugger");~t0e&&(x_=!0,$P=$P.replace(/debugger;?/,""));var a0e;$P in FORMULA_EVAL_CACHE?a0e=FORMULA_EVAL_CACHE[$P]:(a0e=new Function("data","utils","with(data) {".concat(x_?"debugger;":"","return (").concat($P,");}")),FORMULA_EVAL_CACHE[$P]=a0e),e0e=e0e||{};var n0e=void 0;try{n0e=a0e.call(e0e,e0e,getFilters())}catch{return console.warn("[formula:js]表达式执行异常,当前表达式: ",$P,",当前上下文数据: ",e0e),$P}return n0e},var:function($P,e0e){var x_=e0e||{},t0e=getVariable(x_,$P);return t0e??$P},collect:function($P){var e0e=[];return isObject$r($P)||isString$7($P)?e0e=collectVariables($P):e0e=[],e0e}};function isExpression($P){return!$P||!isString$7($P)?!1:/(^|[^\\])\$\{[\s\S]+\}/.test($P)}function isNeedFormula($P,e0e,x_){try{var t0e=FormulaExec.collect($P);return t0e.some(function(a0e){return FormulaExec.var(a0e,e0e)!==FormulaExec.var(a0e,x_)})}catch{return console.warn("[isNeedFormula]表达式执行异常,当前表达式: ",$P,",当前上下文数据: ",x_),!1}}function replaceExpression($P){return $P&&isString$7($P)&&/(\\)(\${).+(\})/.test($P)?$P.replace(/\\\$\{/g,"${"):$P}function preventDefault($P){(typeof $P.cancelable!="boolean"||$P.cancelable)&&$P.preventDefault()}function isMobile$1(){var $P,e0e;return(e0e=($P=window).matchMedia)===null||e0e===void 0?void 0:e0e.call($P,"(max-width: 768px)").matches}function range$2($P,e0e,x_){return Math.min(Math.max($P,e0e),x_)}function injectPropsToObject($P,e0e){var x_=Object.create($P.__super||null);Object.keys(e0e).forEach(function(a0e){return x_[a0e]=e0e[a0e]});var t0e=Object.create(x_);return Object.keys($P).forEach(function(a0e){return t0e[a0e]=$P[a0e]}),t0e}function isSuperDataModified($P,e0e,x_){var t0e;return x_&&x_.storeType==="FormStore"?t0e=uniq$1(x_.items.map(function(a0e){return"".concat(a0e.name).replace(/\..*$/,"")}).concat(Object.keys(x_.data))):t0e=Object.keys(x_.data),Array.isArray(t0e)&&t0e.length?t0e.some(function(a0e){return $P[a0e]!==e0e[a0e]}):!1}function syncDataFromSuper($P,e0e,x_,t0e,a0e){var n0e=__assign$5({},$P),r0e=[];return t0e&&t0e.storeType==="FormStore"?r0e=uniq$1(t0e.items.map(function(o0e){return"".concat(o0e.name).replace(/\..*$/,"")}).concat(Object.keys(n0e))):a0e&&(r0e=Object.keys(n0e)),(e0e||x_)&&r0e.forEach(function(o0e){o0e&&(e0e&&typeof e0e[o0e]<"u"||x_&&typeof x_[o0e]<"u")&&(x_&&!e0e||!x_&&e0e||x_[o0e]!==e0e[o0e])&&(n0e[o0e]=e0e[o0e])}),n0e}function guid(){function $P(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)}return $P()+$P()+$P()}function findIndex$3($P,e0e){for(var x_=0,t0e=$P.length;x_0&&a0e.length>n0e)return!0;for(var i0e=r0e.length-1;i0e>=0;i0e--){var s0e=r0e[i0e];if(isObjectShallowModified($P[s0e],e0e[s0e],x_,t0e,a0e))return!0}return!1}function isArrayChildrenModified($P,e0e,x_){if(x_===void 0&&(x_=!0),!Array.isArray($P)||!Array.isArray(e0e))return x_?$P!==e0e:$P!=e0e;if($P.length!==e0e.length)return!0;for(var t0e=$P.length-1;t0e>=0;t0e--)if((x_?$P[t0e]!==e0e[t0e]:$P[t0e]!=e0e[t0e])||isArrayChildrenModified($P[t0e].children,e0e[t0e].children,x_))return!0;return!1}function immutableExtends($P,e0e,x_){if(!isObject$8($P)||!isObject$8(e0e))return $P;var t0e=$P;return Object.keys(e0e).forEach(function(a0e){var n0e=$P[a0e],r0e=e0e[a0e];n0e!==r0e&&(t0e=t0e!==$P?t0e:__assign$5({},$P),t0e[a0e]=r0e)}),t0e}function hasVisibleExpression($P){return!!($P.visibleOn||$P.hiddenOn)}function isVisible($P,e0e){return!($P.hidden||$P.visible===!1||$P.hiddenOn&&evalExpression($P.hiddenOn,e0e)||$P.visibleOn&&!evalExpression($P.visibleOn,e0e))}function isUnfolded($P,e0e){var x_=e0e.foldedField,t0e=e0e.unfoldedField;return t0e||(t0e="unfolded"),x_||(x_="folded"),t0e&&typeof $P[t0e]<"u"?!!$P[t0e]:x_&&typeof $P[x_]<"u"?!$P[x_]:!1}function visibilityFilter($P,e0e){return $P.filter(function(x_){return isVisible(x_,e0e)})}function isDisabled($P,e0e){return $P.disabled||$P.disabledOn&&evalExpression($P.disabledOn,e0e)}function hasAbility($P,e0e,x_,t0e){return t0e===void 0&&(t0e=!0),$P.hasOwnProperty(e0e)?$P[e0e]:$P.hasOwnProperty("".concat(e0e,"On"))?evalExpression($P["".concat(e0e,"On")],x_||$P):t0e}function makeHorizontalDeeper($P,e0e){if(e0e>1&&/\bcol-(xs|sm|md|lg)-(\d+)\b/.test($P.left)){var x_=parseInt(RegExp.$2,10)*e0e;return{leftFixed:$P.leftFixed,left:x_,right:12-x_,offset:x_}}else if(e0e>1&&typeof $P.left=="number"){var x_=$P.left*e0e;return{leftFixed:$P.leftFixed,left:x_,right:12-x_,offset:x_}}return $P}function promisify($P){if($P._promisified)return $P;var e0e=function(){try{var x_=$P.apply(null,arguments);return x_&&x_.then?x_:typeof x_=="function"?new Promise(function(t0e,a0e){return x_(function(n0e,r0e){return n0e?a0e(n0e):t0e(r0e)})}):Promise.resolve(x_)}catch(t0e){return Promise.reject(t0e)}};return e0e.raw=$P,e0e._promisified=!0,e0e}function getScrollParent($P,e0e){if(e0e===void 0&&(e0e=function(){return!0}),$P==null)return null;var x_=getComputedStyle($P);if(!x_)return null;var t0e=x_.getPropertyValue("overflow")+x_.getPropertyValue("overflow-x")+x_.getPropertyValue("overflow-y");return $P.nodeName==="BODY"||/auto|scroll/.test(t0e)&&e0e($P)?$P:getScrollParent($P.parentNode,e0e)}function difference$2($P,e0e,x_){function t0e(a0e,n0e){if(isObject$8(a0e)&&isObject$8(n0e)){var r0e=uniq$1(Object.keys(a0e).concat(Object.keys(n0e))),o0e={};return r0e.forEach(function(i0e){var s0e=a0e[i0e],l0e=n0e[i0e];x_&&~x_.indexOf(i0e)&&(o0e[i0e]=s0e),!isEqual$2(s0e,l0e)&&(a0e.hasOwnProperty(i0e)?Array.isArray(s0e)&&Array.isArray(l0e)?o0e[i0e]=s0e:o0e[i0e]=t0e(s0e,l0e):o0e[i0e]=void 0)}),o0e}return a0e}return t0e($P,e0e)}var padArr=function($P,e0e,x_){e0e===void 0&&(e0e=4),x_===void 0&&(x_=!1);for(var t0e=[[]],a0e=$P.concat(),n0e=0;a0e.length||x_&&t0e[t0e.length-1].length=e0e){n0e+=1;continue}r0e.push(a0e.shift())}return t0e};function isBreakpoint($P){if(typeof $P!="string")return!!$P;var e0e=$P.split(/\s*,\s*|\s+/);if(window.matchMedia)return e0e.some(function(t0e){return t0e==="*"||t0e==="xs"&&matchMedia("screen and (max-width: 767px)").matches||t0e==="sm"&&matchMedia("screen and (min-width: 768px) and (max-width: 991px)").matches||t0e==="md"&&matchMedia("screen and (min-width: 992px) and (max-width: 1199px)").matches||t0e==="lg"&&matchMedia("screen and (min-width: 1200px)").matches});var x_=window.innerWidth;return e0e.some(function(t0e){return t0e==="*"||t0e==="xs"&&x_<768||t0e==="sm"&&x_>=768&&x_<992||t0e==="md"&&x_>=992&&x_<1200||t0e==="lg"&&x_>=1200})}function until($P,e0e,x_,t0e){var a0e=this;t0e===void 0&&(t0e=5e3);var n0e,r0e=!1;return new Promise(function(o0e,i0e){var s0e=function(){clearTimeout(n0e),r0e=!0},l0e=function(){return __awaiter(a0e,void 0,void 0,function(){var c0e,d0e;return __generator(this,function(u0e){switch(u0e.label){case 0:return u0e.trys.push([0,2,,3]),[4,$P()];case 1:return c0e=u0e.sent(),r0e?[2]:(e0e(c0e)?(r0e=!0,o0e(c0e)):n0e=setTimeout(l0e,t0e),[3,3]);case 2:return d0e=u0e.sent(),i0e(d0e),[3,3];case 3:return[2]}})})};l0e(),x_&&x_(s0e)})}function isEmpty$1($P){return!(isObject$8($P)&&Object.keys($P).length)}var uuid$1=function(){return(+new Date).toString(36)},createStr=function(){return("00000000000000000"+(Math.random()*18446744073709552e3).toString(16)).slice(-16)},uuidv4=function(){var $P=createStr(),e0e=createStr();return $P.slice(0,8)+"-"+$P.slice(8,12)+"-4"+$P.slice(13)+"-a"+e0e.slice(1,4)+"-"+e0e.slice(4)};function mapTree($P,e0e,x_,t0e,a0e,n0e){return x_===void 0&&(x_=1),t0e===void 0&&(t0e=!1),a0e===void 0&&(a0e=[]),n0e===void 0&&(n0e=[]),$P.map(function(r0e,o0e){if(t0e){var i0e=r0e.children?mapTree(r0e.children,e0e,x_+1,t0e,a0e.concat(r0e),n0e.concat(o0e)):void 0;return i0e&&(r0e=__assign$5(__assign$5({},r0e),{children:i0e})),r0e=e0e(r0e,o0e,x_,a0e,n0e.concat(o0e))||__assign$5({},r0e),r0e}return r0e=e0e(r0e,o0e,x_,a0e,n0e.concat(o0e))||__assign$5({},r0e),r0e.children&&r0e.children.splice&&(r0e.children=mapTree(r0e.children,e0e,x_+1,t0e,a0e.concat(r0e),n0e.concat(o0e))),r0e})}function eachTree($P,e0e,x_,t0e){var a0e;x_===void 0&&(x_=1),t0e===void 0&&(t0e=[]);for(var n0e=$P.length,r0e=0;r0e0;s0e--){var l0e=i0e[s0e-1],c0e=i0e[s0e];t0e.unshift(l0e.children.indexOf(c0e))}};return findTree($P,function(n0e,r0e,o0e,i0e){return e0e(n0e,r0e,o0e,i0e)?(a0e(n0e,r0e,o0e,i0e),!0):!1},x_?__assign$5(__assign$5({},x_),{foundEffect:a0e}):void 0),t0e.length?t0e:void 0}function getTree($P,e0e){for(var x_=Array.isArray(e0e)?e0e.concat():[e0e],t0e=x_.pop(),a0e=$P,n0e=0,r0e=x_.length;n0e0;){var o0e=r0e.pop(),i0e=o0e.item,s0e=o0e.index,l0e=o0e.level,c0e=o0e.paths,d0e=o0e.indexes;if(s0e>=0){var u0e=e0e(i0e,s0e,l0e,c0e,d0e);if(u0e&&(!((n0e=i0e.children)===null||n0e===void 0)&&n0e.splice))for(var f0e=i0e.children,p0e=f0e.length-1;p0e>=0;p0e--)r0e.push({item:f0e[p0e],index:p0e,level:l0e+1,paths:c0e.concat(i0e),indexes:d0e.concat(s0e)});else if(!u0e)return!1}else{if(!Array.isArray($P)&&!isObservableArray$1($P))return!1;for(var p0e=$P.length-1;p0e>=0;p0e--)r0e.push({item:$P[p0e],index:p0e,level:1,paths:[],indexes:[]})}}return!0}function someTree($P,e0e){var x_=!1;return everyTree($P,function(t0e,a0e,n0e,r0e){return e0e(t0e,a0e,n0e,r0e)?(x_=!0,!1):!0}),x_}function flattenTree($P,e0e){var x_=[];return eachTree($P,function(t0e,a0e,n0e,r0e){return x_.push(e0e?e0e(t0e,a0e,n0e,r0e):t0e)}),x_}function flattenTreeWithLeafNodes($P,e0e){var x_=[];return eachTree($P,function(t0e,a0e){t0e.hasOwnProperty("children")||x_.push(e0e?e0e(t0e,a0e):t0e)}),x_}function spliceTree($P,e0e,x_){x_===void 0&&(x_=0);for(var t0e=[],a0e=3;a0e]+(>|$)/g,""):$P}function normalizeNodePath($P,e0e,x_,t0e,a0e,n0e){var r0e;x_===void 0&&(x_="label"),t0e===void 0&&(t0e="value"),a0e===void 0&&(a0e="/"),n0e===void 0&&(n0e=",");var o0e=[],i0e=[],s0e=function(l0e){return last$6(l0e?l0e.toString().split(a0e):[])};return typeof $P>"u"||!e0e?{nodeValueArray:o0e,nodePathArray:i0e}:(Array.isArray($P)?$P.forEach(function(l0e){var c0e;l0e&&l0e.hasOwnProperty(t0e)?(o0e.push(__assign$5(__assign$5({},l0e),(c0e={},c0e[x_]=s0e(l0e[x_]),c0e[t0e]=s0e(l0e[t0e]),c0e))),i0e.push(l0e[t0e])):(o0e.push(s0e(l0e)),i0e.push(l0e))}):typeof $P=="string"?$P.toString().split(n0e).forEach(function(l0e){o0e.push(s0e(l0e)),i0e.push(l0e)}):(o0e.push(__assign$5(__assign$5({},$P),(r0e={},r0e[x_]=s0e($P[x_]),r0e[t0e||"value"]=s0e($P[t0e]),r0e))),i0e.push($P[t0e])),{nodeValueArray:o0e,nodePathArray:i0e})}function isClickOnInput($P){var e0e=$P.target,x_;return!!(!$P.currentTarget.contains(e0e)||~["INPUT","TEXTAREA"].indexOf(e0e.tagName)||(x_=e0e.closest('button, a, [data-role="form-item"], label[data-role="checkbox"], label[data-role="switch"]'))&&$P.currentTarget.contains(x_))}function hashCode($P){return $P.split("").reduce(function(e0e,x_){return e0e=(e0e<<5)-e0e+x_.charCodeAt(0),e0e&e0e},0)}function JSONTraverse($P,e0e,x_){x_===void 0&&(x_=Number.MAX_VALUE),!(x_<=0)&&Object.keys($P).forEach(function(t0e){var a0e=$P[t0e];isObservable$1(a0e)||(isPlainObject$d(a0e)||Array.isArray(a0e)?JSONTraverse(a0e,e0e,x_-1):e0e(a0e,t0e,$P))})}function JSONValueMap($P,e0e,x_,t0e){if(x_===void 0&&(x_=!1),t0e===void 0&&(t0e=[]),!isPlainObject$d($P)&&!Array.isArray($P))return $P;var a0e=function(s0e,l0e,c0e,d0e){var u0e,f0e;if(d0e===void 0&&(d0e=[]),x_){var p0e=JSONValueMap(s0e,e0e,x_,d0e);return(u0e=e0e(p0e,l0e,c0e,d0e))!==null&&u0e!==void 0?u0e:p0e}var h0e=(f0e=e0e(s0e,l0e,c0e,d0e))!==null&&f0e!==void 0?f0e:s0e;return h0e===s0e?JSONValueMap(s0e,e0e,x_,d0e):h0e};if(Array.isArray($P)){var n0e=!1,r0e=$P.map(function(s0e,l0e){var c0e=a0e(s0e,l0e,$P,[$P].concat(t0e));return n0e=n0e||c0e!==s0e,c0e});return n0e?r0e:$P}var o0e=!1,i0e={};return Object.keys($P).forEach(function(s0e){var l0e=$P[s0e],c0e=a0e(l0e,s0e,$P,[$P].concat(t0e));c0e!==l0e&&(o0e=!0,i0e[s0e]=c0e)}),o0e?__assign$5(__assign$5({},$P),i0e):$P}function convertArrayValueToMoment($P,e0e,x_){if($P.length===0)return x_;for(var t0e=0;t0e=-Number.MAX_SAFE_INTEGER&&t0e<=Number.MAX_SAFE_INTEGER){var r0e=Number(t0e);return isNaN$2(r0e)?t0e:r0e}return t0e});return x_}function parseQuery($P,e0e){var x_,t0e=e0e||{},a0e=t0e.parsePrimitive,n0e=a0e===void 0?!1:a0e,r0e=t0e.primitiveTypes,o0e=r0e===void 0?["boolean"]:r0e,i0e=$P&&!($P instanceof Location)&&($P==null?void 0:$P.query)||$P&&($P==null?void 0:$P.search)&&qsparse($P.search.substring(1))||window.location.search&&qsparse(window.location.search.substring(1)),s0e=isPlainObject$d(i0e)?n0e?parsePrimitiveQueryString(i0e,{primitiveTypes:o0e}):i0e:{},l0e=(x_=window.location)===null||x_===void 0?void 0:x_.hash,c0e={},d0e=-1;return typeof l0e=="string"&&~(d0e=l0e.indexOf("?"))&&(c0e=qsparse(l0e.substring(d0e+1))),merge$4(s0e,c0e)}var differenceFromAllCache={allOptions:null,options:null,res:[]};function differenceFromAll($P,e0e,x_){if($P===differenceFromAllCache.allOptions&&e0e===differenceFromAllCache.options)return differenceFromAllCache.res;var t0e=new Map($P.map(function(n0e){return[x_(n0e),n0e]})),a0e=e0e.filter(function(n0e){return!t0e.get(x_(n0e))});return differenceFromAllCache.allOptions=$P,differenceFromAllCache.options=e0e,differenceFromAllCache.res=a0e,a0e}function buildTrackExpression($P){if(!isPlainObject$d($P)&&!Array.isArray($P))return"";var e0e=[];return JSONTraverse($P,function(x_,t0e){typeof x_=="string"&&(t0e==="name"?e0e.push(isPureVariable(x_)?x_:"${".concat(x_,"}")):t0e==="source"?e0e.push(x_):t0e.endsWith("On")||t0e==="condition"||t0e==="trackExpression"?e0e.push(x_.startsWith("${")?x_:"